Answer to Question #124363 in Algorithms for Chawal

Question #124363
a. Using Cohen-Sutherland algorithm,
Let, the rectangular window A (15, 15), B (80, 15), C (80, 60), D (15, 60). Find the region codes, slope, intersection points to clip the line with P1(10,20) and P2(70, 80).
b. Calculate the dot product of a= (22, 2, 7) & b= (12, -9, 11). And Cross Product of c= (4, 0, 3) & d= (3, 1, 7).
1
Expert's answer
2020-06-30T15:57:21-0400

a)

code for P1: LEFT   0001
code for P2: TOP    1000
Slope: 1.0
Intersecton point: (15.0, 25.0), code: 0
Slope: 1.0
Intersecton point: (50.0, 60.0), code: 0
Line accepted from 15.00, 25.00 to 50.00, 60.00

b)

Dot product of a and b: 323
Cross product of a and b: [ -3 -19   4]

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS