Find Distance to Curve for Arbitrary Point - Nille

  • Thread starter Thread starter LostInSpace
  • Start date Start date
  • Tags Tags
    Curve
LostInSpace
Messages
21
Reaction score
0
Hi!

I have a bezier curve defined by:
<br /> \vec{b}(t) = (x(t), y(t))<br />
where
<br /> \begin{array}{lcl}<br /> x(t) &amp;=&amp; a_xt^3 + b_xt^2 + c_xt + x_0 \\<br /> y(t) &amp;=&amp; a_yt^3 + b_yt^2 + c_yt + y_0<br /> \end{array}<br />
for t \in \lbrack 0, 1 \rbrack. All constants are computed from vertices on the curve and control points associated with those vertices.

For an arbitrary point \vec{r}\in\mathbb{R}^2 I want to find all points \vec{b}_{t_0}\in\vec{b}(t) (if any) that satisfies
\vec{b}_{t_0} + \nabla\vec{b}(t_0)s = \vec{r}
for some s.

Not sure I'm correct here, but as fas as I remember, \nabla \vec{b}(t) is the normal to the curve, right?

I don't know how to explain this in a better way...
For any point \vec{r} I want to find all points \vec{b}(t_0) such that the normal to \vec{b}(t_0) intersects \vec{r}.

How can I do this?

Thanks in advance,
Nille
 
Physics news on Phys.org
LostInSpace said:
Not sure I'm correct here, but as fas as I remember, \nabla \vec{b}(t) is the normal to the curve, right?
No, \nabla \vec{b}(t) (or rather \frac{d \vec{b}}{dt}(t)) is the tangent vector to the curve. I suppose you're looking for all t_0 for which the vector \vec{b}(t_0)-\vec{r} is perpendicular to the tangent vector. This just means that there dotproduct is zero:

(\vec{b}(t_0)-\vec{r})\cdot\frac{d \vec{b}}{dt}(t_0)=0
 
Back
Top