[vtkusers] VTK- shift plane along spline, perpendiculary at each point of curve
MarWas18
marcinwas94 at interia.pl
Mon Apr 3 12:34:20 EDT 2017
Cory,
>Calling vtkParametricSpline::Evaluate(double u[3], double Pt[3],
>double Du[9]) will give you arbitrary points along the spline. u's
>first element should contain parametric value. The returned point will
>be stored in Pt. Du is not modified with this call, so you can ignore
>that.
May you give me some simple example of code, please? Let's say that we have
vtkPlane and vtkParametricSpline defined on 5 points. Let's say:
vtkSmartPointer<vtkPlane> plane =
vtkSmartPointer<vtkPlane>::New();
vtkSmartPointer<vtkParametricSpline> spline =
vtkSmartPointer<vtkParametricSpline>::New();
//splinePoints are those 5 points that I want to use
spline->SetPoints(splinePoints);
//What to do now? How to set that origin of plane should be point of spline
after arbitrary shift?
plane->SetOrigin(.....) ???
>You want the normal of the plane to equal the tangent of the spline.
>There is nothing built in that gives you the tangent, but you could
>use some simple finite differences of points along the spline to
>approximate it.
Got it, thank you!
Best regards,
Marcin Wasiucionek
--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-shift-plane-along-spline-perpendiculary-at-each-point-of-curve-tp5742707p5742710.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list