[VPython] Why are some objects displayed and some are not?

F. GEIGER fgeiger at datec.at
Wed Dec 19 02:49:32 EST 2001


I wanted to display a pile of boxes of different sizes. So I tried the
2-liner of the tutorial:

redbox=box(pos=vector(4,2,3), size=(8.,4.,6.),color=color.red)
greenball=sphere(pos=vector(4,7,3), radius=2, color=color.green)

Worked: Displayed a red box with a green sphere upon it.

Then I tried

redbox=box(pos=vector(4,2,3), size=(8.,4.,6.),color=color.red)
#greenball=sphere(pos=vector(4,7,3), radius=2, color=color.green)

Did not work: The screnn stayed black. So I seem to miss something when
displaying objects. What does the sphere do, that the box does not?

Any hints?

Thanks in advance and best regards
Franz

P.S.: ASPython 2.1.1 on W2k Prof./SP2, VPython of 10. Dec. 2001






More information about the Python-list mailing list