I would like to know the best representation of 3D curves for my application. The application works as follows:
- A virtual scene is represented as wire mesh, with lots of 3D curves (some of which are straight lines).
- The game will project these curves into the 2D coordinate frame of a photograph or video frame (using a pinhole camera model, i.e. perspective projection) of a similar, but real, scene (like augmented reality). These lines are not to be rendered, so they have no thickness - they simply have a parametric representation in 2D.
- It will then have to compute the 2D distances of points in the image to the closest point on a given curve. It will need to do this for lots of points.
- It will then iterate this pipeline (projection followed by computing lots of distances) in order to minimize those distances.
The curve representation should be compact, and model the true curves well. The projection should take as input a parametric 3D curve and the coordinate frame of projection, and return a parametric 2D curve. If the projection can be parallelized that's a bonus. Shortest distances to the parametric 2D curve should be fast to compute.
An example of such a representation is a set of control points connected by straight line segments, but one issue with this is that high curvature is not well modelled without many control points.
I'd be interested in hearing of any good representations, or equally of any online resources which list such representations.