7.3.0: faster rotations; improved compatibility with GlowScript VPython

27 views
Skip to first unread message

Bruce Sherwood

unread,
Dec 8, 2017, 6:50:28 PM12/8/17
to VPython-users
Update to VPython 7.3.0. Thanks to Matt Craig for building the 7.3.0 installers.

You can get the latest version this way: pip install vpython --upgrade
Or if using Anaconda, conda update -c vpython vpython

(1) Rotations of vectors and objects have been speeded up.

(2) The documentation for GlowScript/VPython 7 stated that changing the axis of a compound object affected size, as is the case with many objects. However, this was never true of compound objects in GlowScript VPython. Unfortunately, in the more recent development of VPython 7, this connection between axis and size was implemented, which meant that a program that worked correctly in GlowScript VPython behaved incorrectly in VPython 7, and vice versa. Version 7.3.0 follows the GlowScript behavior: compound objects no longer have a connection between axis and size. Alas, this may make a small number of existing VPython 7 programs misbehave, but given the newness of VPython 7 it seemed important to make this correction now. Bumping the version from 7.2.0 to 7.3.0 is intended to indicate that a significant change has occurred.

(3) I'll cite the following improved documentation on selecting a canvas:

Selecting a canvas: By default, any objects that you create go into the most recently created canvas, such as scene. If you create another canvas cvs, new objects will go into the cvs canvas. You can later execute scene.select() to make the scene canvas the one that new objects go into. You can find out which canvas is selected: current = canvas.get_selected() returns a reference to the canvas into which objects are currently being created. You can also specify which canvas to use when creating an object, as in box(canvas=cvs, .....).

In GlowScript VPython you can say canvas.selected = cvs, or current = canvas.selected, but unfortunately it doesn't seem possible to implement this syntax in VPython 7, so for compatibiity between GlowScript VPython and VPython 7 you may wish to use cvs.select() and canvas.get_selected() in GlowScript programs.

Bruce

Bruce Sherwood

unread,
Dec 9, 2017, 8:04:37 AM12/9/17
to VPython-users
Oops. I missed the fact that the situation with extrusion objects was exactly the same as with compound objects.

This is fixed in version 7.3.1, thanks to Matt Craig building installers.

Bruce
Reply all
Reply to author
Forward
0 new messages