A shield or spider web?
Some time ago, I have seen cube frame animation in a gif file. I am not sure how that was created and using what software, but to me it is quite easy to do in VRMath2 Editor. In this blog, I only did the rotation. If translation (change of location) is also animated it would be more interesting. But I think I will leave it to my future blogs.
Below are 3D world and Logo programs. I started with creating just one cube frame with centre at coordinate (0,0,0). Then I published as a .x3d world and reused it 4 times in this 3D world.
Here is the Logo program for one cube frame.
; 1x1x1 cube frame with centre at 0,0,0 ; by Andy Yeh (2014) CS RESET BK 0.5 WEST 0.5 DN 0.5 PD REPEAT 4 [ FD 1 RT 90 ] UP 1 REPEAT 4 [ FD 1 RT 90 ] JF 1 DN 1 JE 1 UP 1 JB 1 DN 1 PU
And here is the file: cube_frame.logo.
When a cube frame was created, I published as a .x3d file without including background, viewpoint and navigationinfo. So it contains only the geometry information of a cube frame.
Then I wrote another Logo program (rotating_cube_frames.logo) and inserted the cube frame x3d file 4 times, each time with a different scale. After applying animation, it looks very ineresting.
; animating cube frame ; by Andy (2014) CS RESET CT REPEAT 4 [ MAKE "s 1 - (0.2 * REPCOUNT) SETSCALE :s :s :s WORLD "/sites/default/files/user/u3/world/cube_frame.x3d ] TIMESENSOR "ts 6 TRUE MAKE "key [ 0 0.1 0.2 0.3 0.4 1 ] MAKE "value_left [] REPEAT 4 [ QUEUE "value_left ORI LT 90 ] QUEUE "value_left ORI QUEUE "value_left ORI MAKE "value_right [] REPEAT 4 [ QUEUE "value_right ORI RT 90 ] QUEUE "value_right ORI QUEUE "value_right ORI ORIINT "oi_left :key :value_left ORIINT "oi_right :key :value_right ROUTE "r1 "ts "fraction_changed "oi_left "set_fraction ROUTE "r2 "ts "fraction_changed "oi_right "set_fraction ROUTE "r3 "oi_left "value_changed "obj_0 "rotation ROUTE "r4 "oi_left "value_changed "obj_2 "rotation ROUTE "r5 "oi_right "value_changed "obj_1 "rotation ROUTE "r6 "oi_right "value_changed "obj_3 "rotation SETBG 43 SHOWALL
Visualising and perceiving moving 3D objects can help develop spatial awareness and ability. You may also navigate while the cube frames are rotating. Did you notice that there are two directions that the cube frames are rotating? How many rotations do those cube frames rotate in each cycle?
Please leave me a comment and let me know if you have any ideas to do next.
- Andy's blog
- Login or register to post comments
- 7827 reads