We have two points (x1,y1,z1) and (x2,y2,z2) in 3d space. We have a curve of fixed length which is to be connected (not with a straight line) between these points. How to proceed with the code in Matlab?
views:
887answers:
2Without knowing how far you've gotten trying to use snakes (i.e. active contours), the best I can do is suggest these links:
- Active Contours, Deformable Models, and Gradient Vector Flow.
- Some active-contour modeling by Bregler and Slaney.
- Active Contour Segmentation by Shawn Lankton.
- Active Contour Toolbox by Eric Debreuve.
Most applications of active contours I've come across appear to be more for 2-D image segmentation, but hopefully these links will give you some jumping off points.
If you are trying to minimize the bend angles at your robot's joints, then the best curve would be a circular arc.
Let L be the length of the arc, d be the distance between the endpoints, theta be half the angle of the arc, and r be the radius of the arc. Then:
d/L = sin(theta)/theta ==> solve this numerically for theta using one of Matlab's solvers
Once you have theta, the radius of the arc is: r = L / (2 * theta)
There are still an infinite number of arcs between the two endpoints with this r and theta. You'll have to use some other criteria to select what roll angle about the points to use.