Skip to main content

spline_hermite3_bounds

spline_hermite3_bounds(result, result_offset, result_stride, p0, p1, m0, m1)

Compute bounds of a 3-rd degree hermite curve Note that this is a 1d case solver Lower bound will be written into result[offset], upper bounds will be written into result[offset+result_stride] Solution is based on https://stackoverflow.com/questions/24809978/calculating-the-bounding-box-of-cubic-bezier-curve Differentiation of hermite polynomial is done in WolframAlpha 0 = 3 t^2 (m0 + m1 + 2 p0 - 2 p1) - 2 t (2 m0 + m1 + 3 p0 - 3 p1) + m0

Kind: global function

ParamTypeDescription
resultArray.<number> | Float32Array
result_offsetnumberoffset into the result array
result_stridenumber
p0number
p1number
m0number
m1number