dotProductsToHalfAngleTrigValues MethodStatic
Return the half angle cosine, sine, and radians for the given vector dot products.
- These values arise e.g. in the computation performed in
Arc3d.toScaledMatrix3d
. - Let vectors U and V define the ellipse x(t) = c + U cos(t) + V sin(t). We seek an angle t0 such that the radial vector W(t0) := x(t0) - c is perpendicular to the ellipse.
- Then 0 = W(t0).x'(t0) = (U cos(t0) + V sin(t0)).(V cos(t0) - U sin(t0)) = U.V cos(2t0) + 0.5 (V.V - U.U) sin(2t0) implies tan(2t0) = sin(2t0) / cos(2t0) = 2 U.V / (U.U - V.V), i.e., t0 can be computed given the input dot products. Math details can be found at docs/learning/geometry/Angle.md
dotProductsToHalfAngleTrigValues(dotUU: number, dotVV: number, dotUV: number, favorZero: booleantrue): TrigValues
@returns the angle t0 and its cosine and sine.
Returns - TrigValues
the angle t0 and its cosine and sine.
Defined in
- geometry3d/Angle.ts Line 472
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.