[vtkusers] vtkSpline curve

dean.inglis at camris.ca dean.inglis at camris.ca
Fri Apr 27 12:57:22 EDT 2007


sure,

if p1 = {p1x, p1y, p1z}
and p2 = {p2x, p2y, p2z,}

the tangent vector at p1 using forward
finite differences is 
t1 = {p2x - p1x, p2y - p1y, p2z - p1z}

then you would normalize the vector t1
to be a unit vector having magnitude 1.

There are a number of ways to calculate the
normal to the curve: here is one approach:

form a unit vector from p1, say p1_hat,
and a unit vector from t1, say t1_hat,
then the normal vector is
n_hat = (t_hat x p1_hat) x t_hat
where "x" means vector cross product.

Please keep discussion to the vtkusers list
so that others can benefit from it

Dean


> 
> From: "abdou hassan" <misho1992 at hotmail.com>
> Date: 2007/04/27 Fri PM 12:32:11 EDT
> To: dean.inglis at camris.ca
> Subject: Re: [vtkusers] vtkSpline curve
> 
> Hi
> 
> Can you tell me more about the vector mathematics i can use as i cant get it
> 
> 
> >From: "Dean Inglis" <dean.inglis at camris.ca>
> >To: "vtkusers archive" <vtkusers at vtk.org>
> >Subject: Re: [vtkusers] vtkSpline curve
> >Date: Fri, 27 Apr 2007 10:09:28 -0400
> >
> >Hi
> >
> >how do you draw the spline?  Are you using one of the vtk widgets?
> >If you have the vtkPolyData that represents the spline,
> >you can get the points that make it up and then do basic vector
> >mathematics to calculate tangent and normal vectors.
> >
> > >The problem is i draw a spline curve on an image from points i give and i
> > >want to get the normal or tangent at point in the curve. i draw the curve
> > >using vtkSplineCurve.
> >
> >Not sure what you mean here...
> >
> > >another problem i have plane curve and i want roll it off on a plane.
> >
> >regards,
> >Dean
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at: 
> >http://www.vtk.org/Wiki/VTK_FAQ
> >Follow this link to subscribe/unsubscribe:
> >http://www.vtk.org/mailman/listinfo/vtkusers
> 
> _________________________________________________________________
> Download Messenger. Join the i’m Initiative. Help make a difference today. 
> http://im.live.com/messenger/im/home/?source=TAGHM_APR07
> 



More information about the vtkusers mailing list