Tuesday, December 6, 2011

3D Syntax

Since last week, Yingfu has been changing the syntax of 3D-visualization. Instead of requiring the user to declare 5 display3d_... variables, now there is only one variable named _3D is required.  It looks like:
     _3D = [["Sphere", [2,0,0], 0.2*2, [2,0,2],[0,0,0]],
                 ["Box", [0,0,2], [0.5,0.5,0.5], [1,1,1],[0,0,0]],
                 ["Sphere", [0,2,0], 0.2*2, [0,2,2],[0,0,0]]]
One can create multiple objects in one class, and the size, color or even type of a object can variate dynamically.