3D Graphing
There are many 3D visualisation software for mathematics. Most of them allow easy input of a function to create a 3D graph. VRMath2 also allows creation of 3D graphs. It may not be so easy if compared to other software. But I think that VRMath2 is better for learning because it provides more opportunities for construction throught programing. I call this the power of "Programming driven 3D modelling and visualisation".
I just had a quick idea to demonstrate about graphing or ploting in 3D space. I found a couple of interesting functions online, and thought I would like to try this function: z = x * y^3 - y * x^3. Just in few minutes, my experiment was quite successful.
And here are the Logo program for this 3D plot.
; 3D coordinate plotting ; By Andy Yeh CS RESET ; define a procedure to draw the three axes TO axes :length LINE METER SETPCNAME "red HOME WEST :length PD EAST :length * 2 PU SETPCNAME "blue HOME NORTH :length PD SOUTH :length * 2 PU SETPCNAME "green HOME UP :length PD DOWN :length * 2 PU END ; define the mathematical function to be plotted TO fn :x :y OUTPUT :x*:y^3 - :y*:x^3 END ; start creating objects axes 10 SETPCNAME "black HOME POINT PD REPEAT 20 [ MAKE "x repcount-10 REPEAT 20 [ MAKE "y repcount-10 MAKE "z fn :x :y SETXYZ :x :y :z/1000 ] ] PU
In the above program, you can change the mathematical function in the fn procedure to get a different plot. I hope in the future, community members will build up library of 3D artifacts including 3D virtual worlds and Logo programs so we can reuse them for other virtual worlds and applications.
Please leave me a comment below and let me know what you think.
Files: 3D_plot.x3d 3D_plot.logo
- Andy's blog
- Login or register to post comments
- 6065 reads