Attaching trails or arrows

344 views
Skip to first unread message

Bruce Sherwood

unread,
May 22, 2017, 12:29:57 PM5/22/17
to Glowscript Users
There is now improved documentation on attaching trails or arrows to moving objects:

moca...@gmail.com

unread,
Aug 20, 2017, 9:40:48 AM8/20/17
to Glowscript Users
Dear Bruce

I have tried the command attach_arrow under a Jupyter notebook in my Debian system and it does nothing: no trail shows up for a moving ball :-( Does it only work under Glowscript?

Best

Bruce Sherwood

unread,
Aug 20, 2017, 8:20:59 PM8/20/17
to Glowscript Users, moca...@gmail.com
Thanks for your report. Consider the following program:

b = box()
attach_arrow(b, "axis", scale=3,
         shaftwidth=0.3, color=color.green)
b.pos = vec(1,0,0)
print(b.axis)
scene.pause()
b.axis = vec(1,1,0)
print(b.axis)

I find that this works properly in GlowScript. In Jupyter and IDLE VPython 7 displays the arrow but in the direction of "up" instead of the specified "axis"! Very strange. And it always displays the direction of "up" no matter what object vector I name. So there is a serious bug in VPython 7.

You say that there is no trail, but there shouldn't be a trail if you specify attach_arrow. Instead, there should be an arrow attached to the moving object.
Reply all
Reply to author
Forward
0 new messages