Re: Uniform scaling with gdisplay

"Poul Riis" <Poul.Riis-pIBpe43/vk1knbxzx/[email protected]> Sat, 13 Oct 2012 12:53:13 +0200
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>

[email protected] writes:
>so I assume you are asking whether there is a way to permit autoscaling
>but force the scale factors to be equal. 
Yes, that's what I want. I hope that someone can give me a hint on how to
do it. In the minimal example below I want the spiral to keep its shape
fixed, still autoscaling when points fall outside the actual window.

BTW, running the example results in the following error message on my
computer:
VPython WARNING: errors in shader program:
It does not seem to be fatal but I would like to know what the reason is
and how to get rid of it.


from visual import *
import visual.graph as visualgraph
from time import *

spiralgraph=visualgraph.gdisplay(title='Spiral', ytitle='x', xtitle='y',
                              x=0, y=0, width=800,
height=800,foreground=visualgraph.color.black,
background=visualgraph.color.white)
spiralplot =
visualgraph.gdots(color=visualgraph.crayola.blue,display=spiralgraph)

for i in range(0,3600):
    t=pi*i/360
    spiralplot.plot(pos=(t*cos(t),t*sin(t)))
    sleep(0.001)

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev

_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users