Skip to content
This repository has been archived by the owner on Jan 23, 2020. It is now read-only.

scene.up = vector(0,0,1) doesn't work #15

Open
BruceSherwood opened this issue May 28, 2015 · 2 comments
Open

scene.up = vector(0,0,1) doesn't work #15

BruceSherwood opened this issue May 28, 2015 · 2 comments

Comments

@BruceSherwood
Copy link
Owner

scene.up = vector(0,0,1)

scene.forward = vector(-1,0,0) # without this, the camera doesn't see the scene

arrow(axis=vector(1,0,0), color=color.red)
arrow(axis=vector(0,1,0), color=color.green)
arrow(axis=vector(0,0,1), color=color.blue)
sphere(pos=vector(0,0,1), radius=0.05, color=color.cyan)

Setting scene.up to vector(1,0,0) or vector(0,1,0) is okay. It's just z that misbehaves. It also misbehaves in classic VPython, but not so drastically. The fix by using scene.forward seems very odd.

@BruceSherwood
Copy link
Owner Author

And Craig Wiegert reports this:

I'm encountering a couple of problems when setting scene.up to something
other than the default, vec(0,1,0). The more serious of the two
problems is that labels don't appear in the correct places and don't
rotate correctly with the rest of the objects. The other problem is
more of a minor annoyance: if scene.up and scene.forward are exactly
parallel or anti-parallel directions, the canvas doesn't appear to be
rotatable.

(Neither of these problems crop up in standard VPython.)

The program below demonstrates the weird label behavior. The red arrow
along the x-axis should have an "x" label at its tip.

http://www.glowscript.org/#/user/cwiegert/folder/Public/program/testLabelUp.VPython

@BruceSherwood
Copy link
Owner Author

Craig's program now works thanks to a fix that he provided for the positioning of labels. The other problems remain.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant