1beb58d7 |
1 | puts "==================================" |
2 | puts "Viewer animation - scale the view camera" |
3 | puts "==================================" |
4 | |
5 | pload MODELING VISUALIZATION |
6 | |
7 | vclear |
8 | vinit View1 |
9 | vaxo |
10 | vzbufftrihedron |
11 | |
12 | box b1 -50 -50 0 100 100 100 |
13 | vdisplay -noupdate -dispMode 1 b1 |
14 | vfit -noupdate |
15 | vzoom 0.2 |
16 | |
17 | vanimation anim -clear |
18 | vanimation anim/zoom -view -scale1 1.2 -scale2 4.8 -duration 2 |
19 | |
20 | vanimation anim -play 0.0 0.0 |
ba00aab7 |
21 | if {[vreadpixel 230 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 250 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" } |
1beb58d7 |
22 | vdump $imagedir/${casename}_0.png |
23 | |
24 | vanimation anim -play 1.0 0.0 |
ba00aab7 |
25 | if {[vreadpixel 250 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 270 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" } |
1beb58d7 |
26 | vdump $imagedir/${casename}_1.png |
27 | |
28 | vanimation anim -play 2.0 0.0 |
ba00aab7 |
29 | if {[vreadpixel 334 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 350 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" } |
1beb58d7 |
30 | vdump $imagedir/${casename}_2.png |
31 | |
32 | puts "Put the following command to start interactive animation:" |
33 | puts " vanimation anim -play" |