Update to GlowScript 2.7

24 views
Skip to first unread message

Bruce Sherwood

unread,
Feb 28, 2018, 3:54:00 PM2/28/18
to Glowscript Users
There's good news and bad news about GlowScript. First the good news:

Version 2.7 introduced the ability to use Plotly-based graphs, but it was discovered that some computationally intensive programs ran much more slowly than in version 2.6. This has now been fixed in 2.7.

There were numerous errors in the curve and points objects and their methods. These have now been corrected.

The example program 


had a typo that associated the wrong bumpmap with the texture. Take a look at what a bumpmap can do in terms of making a 2D surface look three-dimensional. It's also interesting to rotate the cube and then drag the light.

Now the bad news, closely related to the good news about performance:

In the continuing attempt to make GlowScript VPython mimic standard Python as closely as possible while maintaining good performance, 2.7 introduced the ability to say 3*[10,20] to produce [10,20,10,20,10,20]. Alas, the contortions required to make this work turned out to be far more expensive in time than I had realized from the measurements I had made, and it now gives, oddly, NaN ("not a number"). It does however still work to say [10,20]*3. The asymmetry is that number*list has to go through the same machinery that is used by the far more frequent number*number or number*vector, which drastically slows down these common kinds of multiplications, whereas list*number goes to list-processing code and doesn't interfere with number*number.

I also tried to take advantage of an option in RapydScript-NG to make Python dictionaries behave exactly like true Python dictionaries, with all of the standard Python dictionary methods. Alas, this also leads to a BIG hit in performance and had to be abandoned. It will not be introduced into GlowScript VPython. Ordinary basic dictionary options continue to work without change.

Bruce

Reply all
Reply to author
Forward
0 new messages