1 puts "=================================="
2 puts "Viewer animation - scale the view camera"
3 puts "=================================="
5 pload MODELING VISUALIZATION
12 box b1 -50 -50 0 100 100 100
13 vdisplay -noupdate -dispMode 1 b1
17 vanimation anim -clear
18 vanimation anim/zoom -view -scale1 1.2 -scale2 4.8 -duration 2
20 vanimation anim -play 0.0 0.0
21 if {[vreadpixel 230 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 250 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
22 vdump $imagedir/${casename}_0.png
24 vanimation anim -play 1.0 0.0
25 if {[vreadpixel 250 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 270 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
26 vdump $imagedir/${casename}_1.png
28 vanimation anim -play 2.0 0.0
29 if {[vreadpixel 334 220 rgb name] != "DARKGOLDENROD" || [vreadpixel 350 220 rgb name] != "BLACK"} { puts "Error: Camera scale result is wrong!" }
30 vdump $imagedir/${casename}_2.png
32 puts "Put the following command to start interactive animation:"
33 puts " vanimation anim -play"