From: Bruce S. <Bru...@nc...> - 2012-10-14 20:12:17
|
What did you change? That is, what do you mean by "now"? Presumably you didn't get such a very strange message before making some change. Maybe you need to reinstall visual? Bruce Sherwood On Sun, Oct 14, 2012 at 12:32 PM, Poul Riis <Pou...@sk...> wrote: > Even worse now: > > Running the program below now results in the following error message: > > Traceback (most recent call last): > File "C:\pr\python\spiral.py", line 11 > spiralplot = > visualgraph.curve(color=visualgraph.crayola.magenta,display=spiralgraph) > File "C:\Python32\lib\site-packages\vis\primitives.py", line 82, in > __init__ > if not _other: self.init_defaults(keywords) > File "C:\Python32\lib\site-packages\vis\primitives.py", line 175, in > init_defaults > self.material = self.display.material > AttributeError: 'gdisplay' object has no attribute 'material' > > > > > > import visual.graph as visualgraph > from time import * > from math 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.curve(color=visualgraph.crayola.magenta,display=spiralgraph) > spiralplot.plot(pos=(-15,-15)) > spiralplot.plot(pos=(15,-15)) > spiralplot.plot(pos=(15,15)) > spiralplot.plot(pos=(-15,15)) > spiralplot.plot(pos=(-15,-15)) > for i in range(0,3600): > t=pi*i/360 > x=t*cos(t) > y=t*sin(t) > spiralplot.plot(pos=(x,y)) > sleep(0.001) > > > > > Poul Riis |