Skip to main content
http -> https (the question was bumped anyway)
Source Link
Martin Sleziak
  • 4.7k
  • 4
  • 35
  • 40

Given a two-dimensional cubic Bézier spline defined by 4 control-points as described in the Wikipedia entrythe Wikipedia entry, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where $\mathbf P_0$, $\mathbf P_1$, $\mathbf P_2$, and $\mathbf P_3$ are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty…

Given a two-dimensional cubic Bézier spline defined by 4 control-points as described in the Wikipedia entry, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where $\mathbf P_0$, $\mathbf P_1$, $\mathbf P_2$, and $\mathbf P_3$ are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty…

Given a two-dimensional cubic Bézier spline defined by 4 control-points as described in the Wikipedia entry, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where $\mathbf P_0$, $\mathbf P_1$, $\mathbf P_2$, and $\mathbf P_3$ are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty…

Bezier -> Bézier, while this is on the front page
Source Link
LSpice
  • 12.9k
  • 4
  • 45
  • 69

Closest point on BezierBézier spline

Given a two-dimensional cubic BezierBézier spline defined by 4 control-points as described in herethe Wikipedia entry, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where P0$\mathbf P_0$, P1$\mathbf P_1$, P2$\mathbf P_2$, and P3$\mathbf P_3$ are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty...dirty…

Closest point on Bezier spline

Given a two-dimensional cubic Bezier spline defined by 4 control-points as described here, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where P0, P1, P2 and P3 are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty...

Closest point on Bézier spline

Given a two-dimensional cubic Bézier spline defined by 4 control-points as described in the Wikipedia entry, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where $\mathbf P_0$, $\mathbf P_1$, $\mathbf P_2$, and $\mathbf P_3$ are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty…

Improved formatting, replaced inappropriate tags with appropriate ones
Source Link
gmvh
  • 3.1k
  • 6
  • 27
  • 45

Given a two-dimensional cubic bezierBezier spline defined by 4 control-points as described here, is there a way to solve analytically for the parameter along the curve (0.0ranging from 0 to 1.0 parameter domain) which isyields the point closest to an arbitrary point in space?

B(t) = (1-t)3 P0 + 3(1-t)2 tP1 + 3(1-t) t2P2 + t3P3, t E [0,1]

where$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where P0, P1, P2 and P3 are the 4four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty...

-- David Rutten

Given a two-dimensional cubic bezier spline defined by 4 control-points as described here, is there a way to solve analytically the parameter along the curve (0.0 to 1.0 parameter domain) which is closest to an arbitrary point in space?

B(t) = (1-t)3 P0 + 3(1-t)2 tP1 + 3(1-t) t2P2 + t3P3, t E [0,1]

where P0, P1, P2 and P3 are the 4 control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty...

-- David Rutten

Given a two-dimensional cubic Bezier spline defined by 4 control-points as described here, is there a way to solve analytically for the parameter along the curve (ranging from 0 to 1) which yields the point closest to an arbitrary point in space?

$$ \mathbf{B}(t) = (1-t)^3 \,\mathbf{P}_0 + 3(1-t)^2 t\,\mathbf{P}_1 + 3(1-t) t^2\,\mathbf{P}_2 + t^3\,\mathbf{P}_3, ~~~~~ t \in [0,1] $$ where P0, P1, P2 and P3 are the four control-points of the curve.

I can solve it pretty reliably and quickly with a divide-and-conquer algorithm, but it makes me feel dirty...

Source Link
David Rutten
  • 243
  • 1
  • 2
  • 6
Loading