|
From: David S. <dsc...@vi...> - 2002-08-12 00:11:04
|
Just in case anyone is interested in extending VPython to make it more
useful for drawing things such as Mandelbrot sets, I will suggest that
it might be more useful to add texture support (for example, a textured
plane object) than to add a point() or points() primitive. VPython's
coordinate system and some lower level details will make it awkward to
draw an image on the screen using points (quite apart from the
performance issues).
For example:
p = plane( texture = array( (500,500,3), Float ) )
for x in range(500):
for y in range(500):
p.texture[x,y,:] = mandelbrot(x,y)
The coordinate system issue would still have to be addressed if you want
exact pixel results.
Dave
> -----Original Message-----
> From: vis...@li...
> [mailto:vis...@li...] On
> Behalf Of Bruce Sherwood
> Sent: Sunday, August 11, 2002 2:27 PM
> To: vpusers
> Cc: mi...@co...
> Subject: Re: [Visualpython-users] pixel plotting
>
>
> There are no pixel-oriented options in VPython. The only
> thing you could do to paint a dot-oriented picture would be
> to use tiny boxes (or better,
> faces) that tile the space.
>
> The gdots option on the graph plot is a kludge which uses the
> letter "o" from a font (and as a result doesn't work properly
> on all platforms). The reason for this kludge is the need for
> plotting a small circle on a graph whose x and y axes may
> differ enormously (so that a ring object for example would
> display as an ellipse).
>
> There is no formal description of VPython routines, but the
> online reference manual does attempt to list all attributes
> of VPython objects. An exception is the graphing routine,
> which probably should list all of the attributes of a graph
> object, since occasionally it is useful to refer directly to
> some of the VPython objects that graph.py uses. You might
> like to just look at graph.py to see what's there. However,
> this isn't a useful place to find something for pixel plotting.
>
> Bruce Sherwood
>
> ----- Original Message -----
> From: "Gregor Lingl" <gl...@ao...>
> To: "vpusers" <vis...@li...>
> Cc: <mi...@co...>
> Sent: Sunday, August 11, 2002 2:07 PM
> Subject: [Visualpython-users] pixel plotting
>
>
> > I've forwarded this message of LANEY MILLS originally sent
> > to tu...@py....
> > Laney, if you are using vpython heavily, have a look at this list!
> >
> > vis...@li...
> >
> > The vpython library has wonderful plotting routines. One of them is
> gdots.
> > Gdots plots points on a graph. Although one can control
> the color of
> > the dots, one apparently cannot control the size of the dots.
> >
> > Suppose I wanted to write Python program to create the Mandelbrot
> > set, which has hundreds of thousands of dots. One needs to plot
> > individual pixels.
> >
> > Here are my two questions then:
> >
> > Is there a formal description of the various vpython
> routines? There
> > is a wonderful tutor, but no formal description with list all the
> > attributes ascribable to gdots.
> >
> > If gdots can't be made to plot individuals at a given (x,y)
> point, is
> there
> > some other way to do it?
> >
> > Thanks
> >
> > Laney Mills
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Visualpython-users mailing list
> Vis...@li...
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
|