[vtkusers] How to project a curve onto surface

Dženan Zukić dzenanz at gmail.com
Fri Nov 29 06:14:57 EST 2013


If your curve is a loop, you might want to do spherical projection.
Determine center of area of the curve. Then go through all the points in
your curve, for each cast a ray from center towards it, calculate
intersection of this ray with the surface and place the projected point on
this intersection. Lastly connect the projected points.

In case your curve and the surface are not concentric, you might want to
place the center of projection somewhere between them so the projection
ends up on the surface.


On Thu, Nov 28, 2013 at 1:24 PM, Green Hedgehog <yy198903 at 163.com> wrote:

> Dear Kenneth,
> Thanks a lot for your reply. I think I didn't describe the question
> clearly.
> a) The curve isn't planar. It isn't close to planar neither. It is a loop,
> an output of vtkSplineFilter.
> b) The surface isn't close to planar near the curve.
> c) I didn't get you quite well about this point. I mean I want the result
> just looks like you draw the curve on the surface, that means after
> projecting the result curve is totally *lying *on the surface. It needn't
> be accurate, just looks smooth.
>
> Regards,
> Yue
>
>
>
>
>
>
> At 2013-11-28 14:39:54,"Kenneth Sloan-3 [via VTK]" <[hidden email]<http://user/SendEmail.jtp?type=node&node=5724694&i=0>>
> wrote:
>
> A lot depends on the nature of the curve and the surface.
>
> a) is the curve (close to) planar?
> b) is the surface close to planar near the curve?
> c) do you want the curve literally "projected" onto the surface, or do
> want
>    the curve somehow "draped" over the surface?
>
> Easiest is probably the case where the surface is large and locally "flat"
> near the curve, and the curve
> itself is relatively flat.  Select a compromise plane (or, from another
> point of view, a compromise vector from the curve in the direction of the
> surface).  Sample the curve, and cast rays from curve sample points in the
> direction of the surface.  Find points of intersection and connect the
> dots.
>
> If both the surface and the curve are convoluted, then the problem becomes
> much harder, and the answer less well defined.
>
> Good luck!
> --
> Kenneth Sloan
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5724691&i=0>
>
>
> On Nov 28, 2013, at 05:49 , Green Hedgehog <[hidden email]<http://user/SendEmail.jtp?type=node&node=5724691&i=1>>
> wrote:
>
> > Dear all,
> >
> > There is a closed surface with a curve near it. I want to project the
> curve
> > onto the surface and then render . Does anyone have any suggestions?
> >
> > Yue
> >
> >
> >
> > --
> > View this message in context:
> http://vtk.1045678.n5.nabble.com/How-to-project-a-curve-onto-surface-tp5724690.html
> > Sent from the VTK - Users mailing list archive at Nabble.com.
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://vtk.1045678.n5.nabble.com/How-to-project-a-curve-onto-surface-tp5724690p5724691.html
>  To unsubscribe from How to project a curve onto surface, click here.
> NAML<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ------------------------------
> View this message in context: Re:Re: How to project a curve onto surface<http://vtk.1045678.n5.nabble.com/How-to-project-a-curve-onto-surface-tp5724690p5724694.html>
>
> Sent from the VTK - Users mailing list archive<http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html>at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131129/378e8fc6/attachment.htm>


More information about the vtkusers mailing list