HW 2D CGA - PPT 8 - Polygon Fill


Question
Solution:
First of all, we need to know the element to be inserted into SET and AEL. The element must contain \(y_{max}\), \(x \ of \ y_{min}\), \(dx\), and \(dy\). Also carry but only in AEL, carry doesn't need to be inserted into SET. With that said, let's begin with the first polygon.
Polygon 1
A(1, 6), B(5,4), C(3,1)
From these 3 vertices we need to find the edges element containing \(y_{max}\), \(x \ of \ y_{min}\), \(dx\), and \(dy\). Let's take a look at edge AB, the \(y_{max}\) is 6, the \(x \ of \ y_{min}\) is 5, the \(dx\) is 4, and the \(dy\) is -2. Now if we found \(dy < 0\) we need to make it positive, by multiplying \(dx\) and \(dy\) with -1, so we got \(dx\) = -4 and \(dy\) = 2. The same rule applies with edges BC and CA. After we've found all of the elements then, we put it into the SET just like below.
SET
yEdges
\(y_{max}\)6
5
4
\( \rightarrow AB \)
65-42
3
2
\(y_{min}\)1
\( \rightarrow BC \)
4323
\( \rightarrow CA \)
63-25

After finishing the SET, we can continue to the AEL. There are some rules to follow in calculating AEL as written below.
if \( dx \lt 0 \) if \( dx \gt 0 \)
carry += \(dx\)
loop (carry \( \times (-2) \ge dy \))
carry += \( dy\)
\(x of y_{min}\) -= 1
carry += \(dx\)
loop (carry \( \times 2 \ge dy \))
carry -= \( dy\)
\(x of y_{min}\) += 1

AEL
y=1
\(BC\)
43230
\( \rightarrow CA\)
63-250
y=2
\( 0+2=2 \left\lvert \times 2\right\rvert 4 \ge 3 \)
\( 2-3=-1 \)
\( 3+1=4 \)
\( -1 \left\lvert \times 2\right\rvert -2 \lt 3 \)
\( - \)
\( 0+(-2)=-2 \left\lvert \times (-2)\right\rvert 4 \lt 5 \)
\( - \)
\(BC\)
4423-1
\( \rightarrow CA \)
63-25-2
y=3
\( -1+2=1 \left\lvert \times 2\right\rvert 2 \lt 3 \)
\( - \)
\( -2+(-2)=-4 \left\lvert \times (-2)\right\rvert 8 \ge 5 \)
\( -4+5=1 \)
\( 3-1=2 \)
\( 1 \left\lvert \times (-2)\right\rvert -2 \lt 5 \)
\( - \)
\(BC\)
44231
\( \rightarrow CA \)
62-251
y=4
BC has reached y=5 and AB starts \( 1+(-2)=-1 \left\lvert \times (-2)\right\rvert 2 \lt 5 \)
\( - \)
\(AB\)
65-420
\( \rightarrow CA \)
62-25-1
y=5
\( 0+(-4)=-4 \left\lvert \times (-2) \right\rvert 8 \ge 2 \)
\( -4+2=-2 \)
\( 5-1=4 \)
\( -2 \left\lvert \times (-2)\right\rvert 4 \ge 2 \)
\( -2+2=0 \)
\( 4-1=3 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 2 \)
\( - \)
\( -1+(-2)=-3 \left\lvert \times (-2)\right\rvert 6 \ge 5 \)
\( -3+5=2 \)
\( 2-1=1 \)
\( 2 \left\lvert \times (-2)\right\rvert -4 \lt 5 \)
\( - \)
\(AB\)
63-420
\( \rightarrow CA \)
61-252
y=6 AB and CA both ended in y=6


Now let's continue to the second polygon.
Polygon 2
A(0, 0), B(5, 3), C(10, 0), D(5, 10)
 From these 4 vertices we need to find the edges element containing \(y_{max}\), \(x \ of \ y_{min}\), \(dx\), and \(dy\). Let's take a look at edge AB, the \(y_{max}\) is 3, the \(x \ of \ y_{min}\) is 0, the \(dx\) is 5, and the \(dy\) is 3. The same rule applies with edges BC, CD, and DA. After we've found all of the elements then, we put it into the SET just like below.
SET
\(y\)Edges
\(y_{max}\)10
9
8
7
6
5
4
3
2
1
\(y_{min}\)0
\( \rightarrow \) AB
3053
\( \rightarrow \) BC
310-53
\( \rightarrow \) CD
1010-510
\( \rightarrow \) DA
100510

Now for the AEL. Remember the rule for AEL? Here are the rules to follow in calculating AEL as written below.
if \( dx \lt 0 \) if \( dx \gt 0 \)
carry += \(dx\)
loop (carry \( \times (-2) \ge dy \))
carry += \( dy\)
\(x of y_{min}\) -= 1
carry += \(dx\)
loop (carry \( \times 2 \ge dy \))
carry -= \( dy\)
\(x of y_{min}\) += 1

AEL
y=0
AB
30530
\( \rightarrow \)BC
310-530
\( \rightarrow \)CD
1010-5100
\( \rightarrow \)DA
1005100
y=1
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 3 \)
\( 5-3=2 \)
\( 0+1=1 \)
\( 2 \left\lvert \times 2\right\rvert 4 \ge 3 \)
\( 2-3=-1 \)
\( 1+1=2 \)
\( -1 \left\lvert \times 2\right\rvert -2 \lt 3 \)
\( - \)
\( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 3 \)
\( -5+3=-2 \)
\( 10-1=9 \)
\( -2 \left\lvert \times (-2)\right\rvert 4 \ge 3 \)
\( -2+3=1 \)
\( 9-1=8 \)
\( 1 \left\lvert \times (-2)\right\rvert -2 \lt 3 \)
\( - \)
\( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 10 \)
\( -5+10=5 \)
\( 10-1=9 \)
\( 5 \left\lvert \times (-2)\right\rvert -10 \lt 10 \)
\( - \)
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 10 \)
\( 5-10=-5 \)
\( 0+1=1 \)
\( -5 \left\lvert \times 2\right\rvert -10 \lt 10 \)
\( - \)
AB
3253-1
\( \rightarrow \)BC
38-531
\( \rightarrow \)CD
109-5105
\( \rightarrow \)DA
101510-5
y=2
\( -1+5=4 \)
\( 4 \left\lvert \times 2\right\rvert 8 \ge 3 \)
\( 4-3=1 \)
\( 2+1=3 \)
\( 1 \left\lvert \times 2\right\rvert 2 \lt 3 \)
\( - \)
\( 1+(-5)=-4 \)
\( -4 \left\lvert \times (-2)\right\rvert 8 \ge 3 \)
\( -4+3=-1 \)
\( 8-1=7 \)
\( -1 \left\lvert \times (-2)\right\rvert 2 \lt 3 \)
\( - \)
\( 5+(-5)=0 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 10 \)
\( - \)
\( -5+5=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 10 \)
\( - \)
AB
33531
\( \rightarrow \)BC
37-53-1
\( \rightarrow \)CD
109-5100
\( \rightarrow \)DA
1015100
y=3
AB popped BC popped \( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 10 \)
\( -5+10=5 \)
\( 9-1=8 \)
\( 5 \left\lvert \times (-2)\right\rvert -10 \lt 10 \)
\( - \)
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 10 \)
\( 5-10=-5 \)
\( 1+1=2 \)
\( -5 \left\lvert \times 2\right\rvert -10 \lt 10 \)
\( - \)
CD
108-5105
\( \rightarrow \)DA
102510-5
y=4
\( 5+(-5)=0 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 10 \)
\( - \)
\( -5+5=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 10 \)
\( - \)
CD
108-5100
\( \rightarrow \)DA
1025100
y=5
\( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 10 \)
\( -5+10=5 \)
\( 8-1=7 \)
\( 5 \left\lvert \times (-2)\right\rvert -10 \lt 10 \)
\( - \)
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 10 \)
\( 5-10=-5 \)
\( 2+1=3 \)
\( -5 \left\lvert \times 2\right\rvert -10 \lt 10 \)
\( - \)
CD
107-5105
\( \rightarrow \)DA
103510-5
y=6
\( 5+(-5)=0 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 10 \)
\( - \)
\( -5+5=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 10 \)
\( - \)
CD
107-5100
\( \rightarrow \)DA
1035100
y=7
\( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 10 \)
\( -5+10=5 \)
\( 7-1=6 \)
\( 5 \left\lvert \times (-2)\right\rvert -10 \lt 10 \)
\( - \)
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 10 \)
\( 5-10=-5 \)
\( 3+1=4 \)
\( -5 \left\lvert \times 2\right\rvert -10 \lt 10 \)
\( - \)
CD
106-5105
\( \rightarrow \)DA
104510-5
y=8
\( 5+(-5)=0 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 10 \)
\( - \)
\( -5+5=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 10 \)
\( - \)
CD
106-5100
\( \rightarrow \)DA
1045100
y=9
\( 0+(-5)=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 10 \)
\( -5+10=5 \)
\( 6-1=5 \)
\( 5 \left\lvert \times (-2)\right\rvert -10 \lt 10 \)
\( - \)
\( 0+5=5 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 10 \)
\( 5-10=-5 \)
\( 4+1=5 \)
\( -5 \left\lvert \times 2\right\rvert -10 \lt 10 \)
\( - \)
CD
105-5105
\( \rightarrow \)DA
105510-5
y=10
CD popped DA popped

Now for the third polygon.
Polygon 3
A(7, 1), B(13, 5), C(13, 11), D(7, 7), E(2, 9), F(2, 3)
From these 6 vertices we need to find the edges element containing \(y_{max}\), \(x \ of \ y_{min}\), \(dx\), and \(dy\). Let's take a look at edge AB, the \(y_{max}\) is 5, the \(x \ of \ y_{min}\) is 7, the \(dx\) is 6, and the \(dy\) is 4. The same rule applies with edges BC, CD, DE, EF, and FA. After we've found all of the elements then, we put it into the SET just like below.
SET
\(y\)Edges
\(y_{max}\)11
10
9
8
7
\( \rightarrow \)CD
11764
\( \rightarrow \)DE
97-52
6
5
\( \rightarrow \)BC
111306
4
3
\( \rightarrow \)EF
9206
2
\(y_{min}\)1
\( \rightarrow \) AB
5764
\( \rightarrow \) FA
37-52
Now for the AEL. Remember the rule for AEL? Here are the rules to follow in calculating AEL as written below.
if \( dx \lt 0 \) if \( dx \gt 0 \)
carry += \(dx\)
loop (carry \( \times (-2) \ge dy \))
carry += \( dy\)
\(x of y_{min}\) -= 1
carry += \(dx\)
loop (carry \( \times 2 \ge dy \))
carry -= \( dy\)
\(x of y_{min}\) += 1

AEL
y=1
AB
57640
\( \rightarrow \) FA
37-520
y=2
\( 0+6=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 4 \)
\( 6-4=2 \)
\( 7+1=8 \)
\( 2 \left\lvert \times 2\right\rvert 4 \ge 4 \)
\( 2-4=-2 \)
\( 8+1=9 \)
\( -2 \left\lvert \times 2\right\rvert -4 \lt 4 \)
\( - \)
\( 0-5=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 2 \)
\( -5+2=-3 \)
\( 7-1=6 \)
\( -3 \left\lvert \times (-2)\right\rvert 6 \ge 2 \)
\( -3+2=-1 \)
\( 6-1=5 \)
\( -1 \left\lvert \times (-2)\right\rvert 2 \ge 2 \)
\( -1+2=1 \)
\( 5-1=4 \)
\( 1 \left\lvert \times (-2)\right\rvert -2 \lt 2 \)
\( - \)
AB
5964-2
\( \rightarrow \) FA
34-521
y=3
\( -2+6=4 \)
\( 4 \left\lvert \times 2\right\rvert 8 \ge 4 \)
\( 4-4=0 \)
\( 9+1=10 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 4 \)
\( - \)
FA popped, insert EF
AB
510640
\( \rightarrow \) EF
92060
y=4
\( 0+6=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 4 \)
\( 6-4=2 \)
\( 10+1=11 \)
\( 2 \left\lvert \times 2\right\rvert 4 \ge 4 \)
\( 2-4=-2 \)
\( 11+1=12 \)
\( -2 \left\lvert \times 2\right\rvert -4 \lt 4 \)
\( - \)
EF dx=0 so no need
to calculate this one
AB
51264-2
\( \rightarrow \) EF
92060
y=5
EF dx=0 so no need
to calculate this one
AB popped, insert BC
EF
92060
\( \rightarrow \) BC
1113060
y=6
EF dx=0 so no need
to calculate this one
BC dx=0 so no need
to calculate this one
EF
92060
\( \rightarrow \) BC
1113060
y=7
EF dx=0 so no need
to calculate this one
BC dx=0 so no need
to calculate this one
insert CD insert DE
EF
92060
\( \rightarrow \) BC
1113060
\( \rightarrow \) CD
117640
\( \rightarrow \) DE
97-520
y=8
EF dx=0 so no need
to calculate this one
BC dx=0 so no need
to calculate this one
\( 0+6=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 4 \)
\( 6-4=2 \)
\( 7+1=8 \)
\( 2 \left\lvert \times 2\right\rvert 6 \ge 4 \)
\( 2-4=-2 \)
\( 8+1=9 \)
\( -2 \left\lvert \times 2\right\rvert -4 \lt 4 \)
\( - \)
\( 0-5=-5 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 2 \)
\( -5+2=-3 \)
\( 7-1=6 \)
\( -3 \left\lvert \times (-2)\right\rvert 6 \ge 2 \)
\( -3+2=-1 \)
\( 6-1=5 \)
\( -1 \left\lvert \times (-2)\right\rvert 2 \ge 2 \)
\( -1+2=1 \)
\( 5-1=4 \)
\( 1 \left\lvert \times (-2)\right\rvert -2 \lt 2 \)
\( - \)
EF
92060
\( \rightarrow \) BC
1113060
\( \rightarrow \) CD
11964-2
\( \rightarrow \) DE
94-521
y=9
EF popped BC dx=0 so no need
to calculate this one
\( -2+6=4 \)
\( 4 \left\lvert \times 2\right\rvert 10 \ge 4 \)
\( 4-4=0 \)
\( 9+1=10 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 4 \)
\( - \)
DE popped
BC
1113060
\( \rightarrow \) CD
1110640
y=10
BC dx=0 so no need
to calculate this one
\( 0+6=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 4 \)
\( 6-4=2 \)
\( 10+1=11 \)
\( 2 \left\lvert \times 2\right\rvert 4 \ge 4 \)
\( 2-4=-2 \)
\( 11+1=12 \)
\( -2 \left\lvert \times 2\right\rvert -4 \lt 4 \)
\( - \)
BC
1113060
\( \rightarrow \) CD
111264-2
y=11
BC popped CD popped

Now let's continue to the fourth polygon.
Polygon 4
A(3, 3), B(10, 5), C(14, 5), D(8, 1), E(21, 10), F(13, 10), G(3, 17)
From these 7 vertices we need to find the edges element containing \(y_{max}\), \(x \ of \ y_{min}\), \(dx\), and \(dy\). Let's take a look at edge AB, the \(y_{max}\) is 5, the \(x \ of \ y_{min}\) is 3, the \(dx\) is 7, and the \(dy\) is 2. The same rule applies with edges BC, CD, DE, EF, FG, and GA. After we've found all of the elements then, we put it into the SET just like below.
SET
\(y\)Edges
\(y_{max}\)17
16
15
14
13
12
11
10
\( \rightarrow \)FG
1713-107
9
8
7
6
5
4
3
\( \rightarrow \) AB
5372
\( \rightarrow \) GA
173014
2
\(y_{min}\)1
\( \rightarrow \) CD
518-44
\( \rightarrow \) DE
101839
Notice that out of 7 pairs of edges we only insert 5 of them, that is because we don't need to include horizontal edges where dy=0 such as BC and EF. Now for the AEL. Remember the rule for AEL? Here are the rules to follow in calculating AEL as written below.
if \( dx \lt 0 \) if \( dx \gt 0 \)
carry += \(dx\)
loop (carry \( \times (-2) \ge dy \))
carry += \( dy\)
\(x of y_{min}\) -= 1
carry += \(dx\)
loop (carry \( \times 2 \ge dy \))
carry -= \( dy\)
\(x of y_{min}\) += 1
AEL
y=1
CD
5 18 -4 4 0
\( \rightarrow \) DE
10 18 3 9 0
y=2
\( 0-4=-4 \)
\( -4 \left\lvert \times (-2)\right\rvert 8 \ge 4 \)
\( -4+4=0 \)
\( 18-1=17 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 4 \)
\( - \)
\( 0+3=3 \)
\( 3 \left\lvert \times 2\right\rvert 6 \lt 9 \)
\( - \)
CD
5 17 -4 4 0
\( \rightarrow \) DE
10 18 3 9 3
y=3
\( 0-4=-4 \)
\( -4 \left\lvert \times (-2)\right\rvert 8 \ge 4 \)
\( -4+4=0 \)
\( 17-1=16 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 4 \)
\( - \)
\( 3+3=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 9 \)
\( 6-9=-3 \)
\( 18+1=19 \)
\( -3 \left\lvert \times 2\right\rvert -6 \lt 9 \)
\( - \)
insert AB insert GA
CD
5 16 -4 4 0
\( \rightarrow \) DE
10 19 3 9 -3
\( \rightarrow \) AB
5 3 7 2 0
\( \rightarrow \) GA
17 3 0 14 0
y=4
\( 0-4=-4 \)
\( -4 \left\lvert \times (-2)\right\rvert 8 \ge 4 \)
\( -4+4=0 \)
\( 16-1=15 \)
\( 0 \left\lvert \times (-2)\right\rvert 0 \lt 4 \)
\( - \)
\( -3+3=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 9 \)
\( - \)
\( 0+7=7 \)
\( 7 \left\lvert \times 2\right\rvert 14 \ge 2 \)
\( 7-2=5 \)
\( 3+1=4 \)
\( 5 \left\lvert \times 2\right\rvert 10 \ge 2 \)
\( 5-2=3 \)
\( 4+1=5 \)
\( 3 \left\lvert \times 2\right\rvert 6 \ge 2 \)
\( 3-2=1 \)
\( 5+1=6 \)
\( 1 \left\lvert \times 2\right\rvert 2 \ge 2 \)
\( 1-2=-1 \)
\( 6+1=7 \)
\( -1 \left\lvert \times 2\right\rvert -2 \lt 2 \)
\( - \)
GA dx=0 so no need
to calculate this one
CD
5 15 -4 4 0
\( \rightarrow \) DE
10 19 3 9 0
\( \rightarrow \) AB
5 7 7 2 -1
\( \rightarrow \) GA
17 3 0 14 0
y=5
CD popped \( 0+3=3 \)
\( 3 \left\lvert \times 2\right\rvert 3 \lt 9 \)
\( - \)
AB popped GA dx=0 so no need
to calculate this one
DE
10 19 3 9 3
\( \rightarrow \) GA
17 3 0 14 0
y=6
\( 3+3=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 9 \)
\( 6-9=-3 \)
\( 19+1=20 \)
\( -3 \left\lvert \times 2\right\rvert -6 \lt 9 \)
\( - \)
GA dx=0 so no need
to calculate this one
DE
10 20 3 9 -3
\( \rightarrow \) GA
17 3 0 14 0
y=7
\( -3+3=0 \)
\( 0 \left\lvert \times 2\right\rvert 0 \lt 9 \)
\( - \)
GA dx=0 so no need
to calculate this one
DE
10 20 3 9 0
\( \rightarrow \) GA
17 3 0 14 0
y=8
\( 0+3=3 \)
\( 3 \left\lvert \times 2\right\rvert 6 \lt 9 \)
\( - \)
GA dx=0 so no need
to calculate this one
DE
10 20 3 9 3
\( \rightarrow \) GA
17 3 0 14 0
y=9
\( 3+3=6 \)
\( 6 \left\lvert \times 2\right\rvert 12 \ge 9 \)
\( 6-9=-3 \)
\( 20+1=21 \)
\( -3 \left\lvert \times 2\right\rvert -6 \lt 9 \)
\( - \)
GA dx=0 so no need
to calculate this one
DE
10 21 3 9 -3
\( \rightarrow \) GA
17 3 0 14 0
y=10
DE popped, insert FG GA dx=0 so no need
to calculate this one
FG
17 13 -10 7 0
\( \rightarrow \) GA
17 3 0 14 0
y=11
\( 0-10=-10 \)
\( -10 \left\lvert \times (-2)\right\rvert 20 \ge 7 \)
\( -10+7=-3 \)
\( 13-1=12 \)
\( -3 \left\lvert \times (-2)\right\rvert 6 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 12 -10 7 -3
\( \rightarrow \) GA
17 3 0 14 0
y=12
\( -3-10=-13 \)
\( -13 \left\lvert \times (-2)\right\rvert 26 \ge 7 \)
\( -13+7=-6 \)
\( 12-1=11 \)
\( -6 \left\lvert \times (-2)\right\rvert 12 \ge 7 \)
\( -6+7=1 \)
\( 11-1=10 \)
\( 1 \left\lvert \times (-2)\right\rvert -2 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 10 -10 7 1
\( \rightarrow \) GA
17 3 0 14 0
y=13
\( 1-10=-9 \)
\( -9 \left\lvert \times (-2)\right\rvert 18 \ge 7 \)
\( -9+7=-2 \)
\( 10-1=9 \)
\( -2 \left\lvert \times (-2)\right\rvert 4 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 9 -10 7 -2
\( \rightarrow \) GA
17 3 0 14 0
y=14
\( -2-10=-12 \)
\( -12 \left\lvert \times (-2)\right\rvert 24 \ge 7 \)
\( -12+7=-5 \)
\( 9-1=8 \)
\( -5 \left\lvert \times (-2)\right\rvert 10 \ge 7 \)
\( -5+7=2 \)
\( 8-1=7 \)
\( 2 \left\lvert \times (-2)\right\rvert -2 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 7 -10 7 2
\( \rightarrow \) GA
17 3 0 14 0
y=15
\( 2-10=-8 \)
\( -8 \left\lvert \times (-2)\right\rvert 16 \ge 7 \)
\( -8+7=-1 \)
\( 7-1=6 \)
\( -1 \left\lvert \times (-2)\right\rvert 2 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 6 -10 7 -1
\( \rightarrow \) GA
17 3 0 14 0
y=16
\( -1-10=-11 \)
\( -11 \left\lvert \times (-2)\right\rvert 22 \ge 7 \)
\( -11+7=-4 \)
\( 6-1=5 \)
\( -4 \left\lvert \times (-2)\right\rvert 8 \ge 7 \)
\( -4+7=3 \)
\( 5-1=4 \)
\( 3 \left\lvert \times (-2)\right\rvert -6 \lt 7 \)
\( - \)
GA dx=0 so no need
to calculate this one
FG
17 4 -10 7 3
\( \rightarrow \) GA
17 3 0 14 0
y=17
FG popped GA popped

And that's that is all the solution for this question.

Comments

Post a Comment

Popular posts from this blog

2D CGA - Midtest 2014

HW 2D CGA - PPT 5 - Clipping 2