-
Notifications
You must be signed in to change notification settings - Fork 65
Evaluating cotan
keenancrane edited this page Dec 6, 2017
·
2 revisions
Given two vectors in , and , how do we evaluate the cotangent of the angle between these vectors?
We could do this explicitly, by using inverse trig functions to find the angle between the vectors, then taking the cotangent of that angle. However, with some derivation we can find an alternate approach, which is simpler, more efficient, and more numerically robust.
Of course, the cotangent is given by
Recall that the dot product is given by . The magnitude of the cross product is given by . We can use these to evaluate !
This "dot over cross" expression is thus equivalent to the cotangent of the angle, yet does not require evaluating any trig functions. It also avoids having to normalize the vectors.
- Task 1: Camera Rays
- Task 2: Intersecting Primitives
- Task 3: BVH
- Task 4: Shadow Rays
- Task 5: Path Tracing
- Task 6: Materials
- Task 7: Environment Light
Notes:
- Task 1: Spline Interpolation
- Task 2: Skeleton Kinematics
- Task 3: Linear Blend Skinning
- Task 4: Physical Simulation
Notes: