Creating Colorful Shapes in
Python + VPython
planet = sphere(pos = (0,0,0), radius = 1, color = color.red) moon = sphere(pos = (10,0,0), radius = 0.1, color = color.white) moon2 = sphere(pos = (5, 0, 0), radius = 0.5, color = color.blue)
Lets read something about the Vpython sphere command
We may also control the Scene (the stage)
Oh, and look, we have other shapes to play with such as:
Box, Cone, Helix, Cylinder and Arrow
What other shapes does VPython provide?
IT HELPS TO REMEMBER...
Red Mars, Green Mars, Blue Mars (RGB)
PREV | NEXT | TOC | HOME