You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 5: Texture Mapping (20)
RCD-Y

Recall that [-y, x] is perpendicular to [x, y]. This is doing such a projection onto the perpendicular of PQ with origin P

briana-jin-zhang

Adding onto RCD's comment, the reason why (y,x)(-y, x) is perpendicular to (x,y)(x, y) is because the dot product is 0.

Let n\vec n be the normal vector to PQ\vec{PQ} and x\vec x be the vector (x,y)(x, y) relative to PP. Then, the shown equation is essentially the dot product of x and n, xn\vec x \cdot n.

If you were to draw line from P to (x,y)(x, y), then you end up with a triangle where the bracket is essentially xcosθ||\vec x|| cos \theta where θ\theta is the angle at point P.

So the dot product is proportional to the distance from line PQ since it is xncosθ||\vec x|| ||\vec n|| cos \theta.

briana-jin-zhang

oof my latex doesn't render as pretty as I would like

yang991178

A quick note for the project implementation: ABC may be either clockwise or counterclockwise. As a result, you need to check for it or the equation here may give the inverse of the correct value.

You must be enrolled in the course to comment