<p>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?</p>
<p>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?</p>

CC BY-SA 4.0
2021-06-11T14:33:02.483Z
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
CC BY-SA 4.0
2021-06-15T14:43:40.213Z
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
<bezier-curve>
Dealing with selection of spline/bezier curves in graphical software
Lenny White
# Dealing with selection of spline/bezier curves in graphical software

(Asked by: username_0 on 2021-06-11)

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?

**Tags:** bezier-curve

> **Comments:**
> **username_1**: 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.  
> **username_2**: 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.  

---

## 0 answers

