BruceSherwood / glowscript

This repository has been moved to https://github.com/vpython/glowscript
50 stars 17 forks source link

Possible bug with simple_sphere axis #204

Closed dmishins closed 5 years ago

dmishins commented 5 years ago

Hi, I believe there may be a bug with the simple_sphere object when it is set to a non-standard axis. The following code produces a vertically compressed ellipsoid, when I believe the object should still be spherical:


GlowScript 2.7 VPython

ball = simple_sphere(radius = 4)

ball.axis = vec(sin(0),cos(0),0)
BruceSherwood commented 5 years ago

You're right. The simple_sphere should indeed follow the rules for sphere, namely that changing axis should not affect size (unlike most objects such as box or arrow). Thanks for the report. Of course it must be rather rare to change the axis of a simple_sphere. What is the situation to needing to change the axis?

dmishins commented 5 years ago

I posted more details about my goals in the google glowscript forums. I tried to use a simple sphere hoping to get the animation to display smoothly, but it didn't seem to help so I returned to using a regular sphere.

BruceSherwood commented 5 years ago

Understood. Thanks. I'll fix the simple_sphere bug.

BruceSherwood commented 5 years ago

Fixed by commit #205