1beb58d7 |
1 | puts "==================================" |
2 | puts "Viewer animation - animate object moving" |
3 | puts "==================================" |
4 | |
5 | pload MODELING VISUALIZATION |
6 | |
7 | vclear |
8 | vinit View1 |
9 | vaxo |
10 | |
11 | psphere s 50 |
12 | box b1 -50 -50 0 100 100 100 |
13 | vdisplay -dispMode 1 b1 s |
14 | |
15 | vviewparams -scale 2.499 -proj 0.546611 -0.600024 -0.584114 -up -0.411832 0.414728 -0.811415 -at -5.3425 -2.983 49.216 |
16 | |
17 | vanimation anim -clear |
18 | vanimation anim/obj1 -objectTrsf b1 -loc1 0 0 0 -loc2 -100 0 -100 -start 0 -duration 2 |
19 | vanimation anim/obj2 -objectTrsf s -loc1 0 0 0 -loc2 100 0 100 -start 1 -duration 2 |
20 | |
21 | vanimation anim -play 0.0 0.0 |
22 | vdump $imagedir/${casename}_0.png |
23 | |
24 | vanimation anim -play 1.0 0.0 |
25 | vdump $imagedir/${casename}_1.png |
26 | |
27 | vanimation anim -play 2.0 0.0 |
28 | vdump $imagedir/${casename}_2.png |
29 | |
ba00aab7 |
30 | if {[vreadpixel 270 20 rgb name] != "DARKGOLDENROD" } { puts "Error: Box moving result is wrong!" } |
1beb58d7 |
31 | if {[vreadpixel 120 255 rgb name] != "DARKGOLDENROD4"} { puts "Error: Sphere moving result is wrong!" } |
32 | |
33 | puts "Put the following command to start interactive animation:" |
34 | puts " vanimation anim -play" |