get-medial-point-coeffs-bez2-same-curve
function getMedialPointCoeffsBez2_SameCurve(t: number, v: number[], ps: number[][]): { A: number[]; B: number[]; H: number[]; }
Defined in get-medial-points/double/get-medial-point-coeffs-bez2-same-curve.ts:26
Returns polynomial coefficients for the same-curve quadratic medial-point
case, where p = b(t) on the same quadratic bezier ps and v is normal
to the curve at that parameter t.
The returned coefficients encode:
A,B:E2(s, τ) = (s - t)^2⋅(A(s)⋅τ + B(s))// * *C,D:E1(s, τ) = C(s)⋅τ + D(s)H: the reduced eliminant ins
Here τ is the ray parameter in q(τ) = p + τ⋅v.
For a candidate root s of H, recover τ from
A(s)⋅τ + B(s) = 0, i.e. τ = -B(s)/A(s) when A(s) ≠ 0.
In this same-curve setup, the full eliminant has the form
H_full(s) = (s - t)^4*(l1*s + l0). This function returns only the reduced
factor H(s) = l1*s + l0 (the repeated (s - t)^4 factor is omitted).
Parameters:
| Name | Type | Description |
|---|---|---|
t | number | parameter on ps where p = b(t) |
v | number[] | ray direction from p; assumed normal to ps at t |
ps | number[][] | order 2 bezier control points, e.g. [[0,0],[1,1],[2,1]] |