I have lot of points (which together form a 3d ellipse) in a given frame (X, Y, Z) and then I have vector (u,v,w). What I want is to orient the ellipse along the vector (u,v,w) . Anyone has useful thoughts on how to go about doing that?
+1
A:
Well I assume you can reverse engineer the ellipse equation by seeing what fits into either 4 or 5 points (I can't remember which -- but it should be easy to figure out from the equations.) Once you have that you can know the two major axes, and center point for the ellipse and the transformation should be straight forward.
Paul Hsieh
2009-12-15 23:18:38
Also, if you already have the frame for the ellipse, you can get the ellipse equation from that instead of a series of surface points
whybird
2009-12-15 23:33:07
A:
Although I support @Paul Hsieh's mathematical approach (and have upvoted it), an alternative brute-force approach which will work for many arbitrary elongated shapes is:
- Define the origin as the center of your frame
- Find the most distant point from the origin.
- Determine rotation that will bring that point into line with your vector.
- Apply that rotation to all other points.
whybird
2009-12-15 23:37:23