5a19c303 |
1 | puts "========" |
2 | puts "OCC26401" |
3 | puts "========" |
4 | puts "" |
5 | ########################################################################################### |
6 | # Visualization - small boxes in front of big one disappear in perspective view |
7 | ########################################################################################### |
8 | |
9 | # Boxes {1 x 1 x 1} |
10 | box b0 0 0 0 1 1 1 |
11 | box b1 -1 0 0 1 1 1 |
12 | box b2 1 0 0 1 1 1 |
13 | box b3 0 1 0 1 1 1 |
14 | box b4 -1 1 0 1 1 1 |
15 | box b5 1 1 0 1 1 1 |
16 | |
17 | vinit View1 |
18 | vclear |
19 | vaxo |
20 | vsetdispmode 1 |
21 | vcamera -persp |
22 | vdisplay b0 b1 b2 b3 b4 b5 |
23 | vsetcolor b1 b2 GREEN |
24 | vsetcolor b4 b5 RED |
25 | vsetcolor b3 GRAY55 |
26 | vfit |
27 | vautozfit |
28 | vzrange |
29 | vtrihedron t |
30 | |
31 | set color "[vreadpixel 230 230 rgb]" |
32 | if { [lindex $color 0] == 0 && |
33 | [lindex $color 1] == 0 && |
34 | [lindex $color 2] == 0 } { |
35 | puts "Error : Boxes disappear." |
36 | } |
37 | |
38 | vdump $imagedir/${casename}_1.png |
39 | |
40 | # Boxes {0.01 x 0.01 x 0.01} |
41 | box b0 0.00 0.00 0.00 0.01 0.01 0.01 |
42 | box b1 -0.01 0.00 0.00 0.01 0.01 0.01 |
43 | box b2 0.01 0.00 0.00 0.01 0.01 0.01 |
44 | box b3 0.00 0.01 0.00 0.01 0.01 0.01 |
45 | box b4 -0.01 0.01 0.00 0.01 0.01 0.01 |
46 | box b5 0.01 0.01 0.00 0.01 0.01 0.01 |
47 | |
48 | vinit View2 |
49 | vclear |
50 | vaxo |
51 | vsetdispmode 1 |
52 | vcamera -persp |
53 | vdisplay b0 b1 b2 b3 b4 b5 |
54 | vsetcolor b1 b2 GREEN |
55 | vsetcolor b4 b5 RED |
56 | vsetcolor b3 GRAY55 |
57 | vfit |
58 | vautozfit |
59 | vzrange |
60 | vtrihedron t |
61 | |
62 | set color "[vreadpixel 230 230 rgb]" |
63 | if { [lindex $color 0] == 0 && |
64 | [lindex $color 1] == 0 && |
65 | [lindex $color 2] == 0 } { |
66 | puts "Error : Boxes disappear." |
67 | } |
68 | |
69 | vdump $imagedir/${casename}_2.png |