Jupyter VPython 0.3.11: improved graphing and trails

46 views
Skip to first unread message

Bruce Sherwood

unread,
May 21, 2016, 9:40:51 PM5/21/16
to VPython-users
New in Jupyter VPython 0.3.11:

Graph plotting with gcurve has been greatly speeded up in the case of plotting a very large number of points that are close together. Now a gcurve point that is within 2 pixels of the most recently plotted point is not sent to the Flot graph plotting package.

Also, there is a new plotting option, as now described in the Help as follows:

It is often the case that skipping points may hardly affect the display but will make graph plotting much faster, in which case it's useful to specify an interval between plotting of points (interval = -1 is the default):

interval If interval=10, a point is added to the plot only every 10th time you ask to add a point. If interval is 0, no plot is shown. If interval is -1, no points are skipped.


Also, trail behavior has been improved. By default, when you attached a curve-type trail to a moving object the radius of the curve was set to a fraction of the object's size. This had the bad effect of displaying nothing if the object was smaller than a few pixels. Now the default curve radius is 0, which means that a thin curve will be displayed even if the object itself is very small on the screen. This improvement was made in response to a user having difficulty importing an old VPython program that had very small objects and as a result had invisible trails.

The default for the "curve" option is 0, which makes a thin curve (this works best in the xy plain; if it doesn't give the result you want, set trail_radius to the desired value).

0.3.11 also fixes a typo that crept into 0.3.10 and made division of a vector by a scalar not work.
Reply all
Reply to author
Forward
0 new messages