61c421bf |
1 | puts "========" |
2 | puts "OCC349" |
3 | puts "1. Hidden line removal algorithm works incorrect in the perspective view" |
4 | puts "========" |
5 | |
6 | vinit |
7 | box b 100 900 300 |
8 | set 3dviewer 1 |
9 | vdisplay b |
10 | |
11 | OCC280 1 0 |
12 | |
13 | vfit |
14 | |
ccadc126 |
15 | set yellow_coords {{135 119} {387 33} {172 144} {28 190} {212 272} {60 343} {26 255} {389 113} {60 276}} |
16 | set black_coords {{160 257} {365 150} {353 99}} |
61c421bf |
17 | |
18 | # |
19 | # ___________2________________ |
20 | # /| /| |
21 | # / | / | |
22 | # / | / | |
23 | # / | / | |
24 | # / | / | |
25 | # 1 | 3 | |
26 | # / | / | |
27 | # / | / | |
28 | # / | / | |
29 | # / | / | |
30 | # ----------------4------------ | |
31 | # | | | | |
32 | # | | | | |
33 | # | | | | |
34 | # | 10 | 11 |
35 | # | | | | |
36 | # | | | | |
37 | # | | | | |
38 | # | | | | |
39 | # | | | | |
40 | # 9 | 12 | |
41 | # | |___________6____|__________| |
42 | # | / | / |
43 | # | / | / |
44 | # | / | / |
45 | # | / | / |
46 | # | 5 | / |
47 | # | / | 7 |
48 | # | / | / |
49 | # | / | / |
50 | # | / | / |
51 | # |/ |/ |
52 | # |--------------8------------| |
53 | # |
54 | # |
55 | |
ccadc126 |
56 | vaspects -setwidth 5 |
57 | |
58 | foreach i $yellow_coords { |
59 | if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "YELLOW" } { |
60 | puts "Error : ${i} is not yellow" |
61 | } |
62 | } |
63 | |
64 | foreach i $black_coords { |
65 | if {"[vreadpixel [lindex $i 0] [lindex $i 1] rgb name]" != "BLACK" } { |
66 | puts "Error : ${i} is not black" |
67 | } |
68 | } |
61c421bf |
69 | |
70 | set only_screen 1 |