The problem is that you have to specify colors with numbers in the range
0.0-1.0, not 0-255.
Bruce Sherwood
Mr Gerard Kelly wrote:
> In the Vpython tutorial it has instructions for making a red ball:
>
> ball = sphere(pos=(-5,0,0), radius=0.5, color=color.red)
>
> It mentions there are 8 colors easily accessible by color.xxx
>
> I can get other colors with color=(R,G,B) where each element is a number
> from 0 to 255, but then the shading doesn't work, so it just looks like
> a circle, not a sphere.
>
> Is there any way to have shaded 3D objects in colors other than the
> eight accessible by color.xxx?
>
|