0

In 2d and 3d environment we can select primitives like lines and polygons by performing point/ray intersection test with the respective primitive. However how does one approach the selection of quadratic/cubic spline curves?

Is this problem often dealt by using an approximate solution, where we perform an intersection test with lines formed by control points of the spline curve? Or is there a more precise solution to the problem?

Lenny White
  • 516
  • 2
  • 13
  • Ray tracing has to deal with this and there are some good papers out there on ray surface intersection with cubic patches, both analytical and numeric. The Glassner book gives some references. – pmw1234 Jun 11 '21 at 14:33
  • There are multiple ways of selecting Items (geometry) by clicking on screen. One very simple to implement way is to use a Frame Buffer Object (FBO) where you add a second texture inside. This texture will be filled with the item-ID due to the render step. When clicking on a geometry you only need to check out the pixel value of the second texture within the FBO. This technique works for all kind of splines, polygons, lines, etc. – Thomas Jun 15 '21 at 14:43

0 Answers0