Hi André

André Wobst venit, vidit, dixit 06.06.2008 17:51:
> Hi,
> 
> I haven't jet managed to take a look at your patch, but for the moment  
> I do not fully understand what you want to do. You want to create some  
> data which you can use in a surface plot, right? I do not consider  

All I wanted (originally) was making something like the following work:

g = graph.graphxyz(size=1.5)
g.plot(graph.data.functionxy("z(x,y)=x**2+y**2", xmin=-1, xmax=1, 
ymin=-1, ymax=1, points=25), [graph.style.surface()] )


> Regarding paramfunction I think you can already do a x(t), y(t), z(t)  
> where t is a parameter. paramfunction is not limited to 2d, but it has  
> a single parameter (like t here) only. We could generalize that like  
> creating a paramsfunction with a list of parameters. However, I do not  
> yet think that the implicit resolution (due to points) is a good way  
> to create a grid. A function does not create grid data.

I don't know the underlying grid and hidden surface code. But I noticed 
that it's difficult to produce e.g. a sphere by providing the points in 
an obvious way (using a regular grid "in spherical coordinates").

> Beside that you are right, function indeed is a 2d only data source.  
> However, if we want to change that the discussion quickly gets  
> identical to what I wrote about the multi parameter paramfunctions and  
> its implicit grid like-behaviour (which I don't like).
> 
> Still there is plenty of room for creating a grid data source.
> 
> Beside that: there is graphxy and graphxyz. graph is an abstract base  
> class.

Yes, I'm sorry, that's where my detour began...

> Note that I'm not sure whether a grid data source could in the end be  
> a function ... I just don't know yet ... I need to think about it.

I really appreciate the possibility to use my own grid, you're right. In 
fact I thought about submitting a simple example which shows how 
powerful PyX is in this regard.

I just thought that having a simple method for "standard" 3D surface 
plots would be nice, at least for the people who use PyX for 
illustrations of text books/homework sheets and the like, where your 
input consists of "advanced functions" like the one above, not numbers 
crunched by your programmes.

Even for 2D plots a non-standard grid can help, and one could argue for 
the removal of the standard graph.data.function(). Maybe one should just 
use numpy or something similar rather than the cumbersome

xs = [ xmin+i*(xmax-xmin)/(N-1) for i in range(N) ]
ps = [ [x,f(x)] for x in xs ]

and similar for 3D.

Cheers,
Michael


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to