[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting TODO



On Fri, Feb 11, 2000 at 11:44:31AM -0500, Nils Barth wrote:
> hehe -- well, you wanted a challenge, eh?
> re: vector fields.
> computing them is trivial:
> given two functions (the x-component and the y-component):
> (f(x,y),g(x,y)), just evaluate f and g at a bunch of points.
> For example, if f(x,y)=sin(x), g(x,y)=cos(x*y), to plot the vector
> field, just choose a bunch of points
> (say, (0,0), (1,0), (2,0), ... (5,0), (0,1), ... (5,1), ... (0,2)
> .. (5,2), ... (5,5))
> and then at the point (x,y), put the vector (f(x,y),g(x,y))

Would also be nice to specify not just the x and y component, but just write
the dy/dx of the function to get a vector field.

I don't think that this should do anything with vectors really :)  the canvas
can calculate and graph these just like any other function.

> Is this what you're looking for w/r/t `computing vector fields'?
> 
> The other concerns with plotting vector fields are the assorted
> scaling options (this is easy to add in later -- for instance, you
> might ask to scale all vectors by a factor of 1/2 so they don't crash
> into each other or something), and rotated arrowheads (which is a bit
> harder, but should be easy with any library that offers affine
> transforms -- what's the GNOME replacement for Imlib?)

I think with gnome-canvas, graphing vector fields would be extremely trivial
including any scaling and arrowheads and such.

George