1 puts "=================================="
2 puts "Viewer animation - translate the view camera"
3 puts "=================================="
5 pload MODELING VISUALIZATION
10 vzbufftrihedron -position right_lower
12 box b1 -50 -50 0 100 100 100
13 vdisplay -noupdate -dispMode 1 b1
14 vviewparams -scale 1.156 -up -0.3588 0.3458 0.867 -at 116 355 327 -eye 225 253 413
16 # Animation simulates the following panning:
18 # vviewparams -scale 1.156 -up -0.3588 0.3458 0.867 -at -174 47 330 -eye -65 -55 415
19 vanimation anim -clear
20 vanimation anim/movecam -view -at1 116 355 327 -at2 -174 47 330 -eye1 225 253 413 -eye2 -65 -55 415 -duration 2
22 vanimation anim -play 0.0 0.0
23 if {[vreadpixel 60 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
24 vdump $imagedir/${casename}_0.png
26 vanimation anim -play 1.0 0.0
27 if {[vreadpixel 160 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
28 vdump $imagedir/${casename}_1.png
30 vanimation anim -play 2.0 0.0
31 if {[vreadpixel 260 360 rgb name] != "GOLDENROD3"} { puts "Error: Camera translation result is wrong!" }
32 vdump $imagedir/${casename}_2.png
34 puts "Put the following command to start interactive animation:"
35 puts " vanimation anim -play"