PDA

View Full Version : Coordinate System for Curves


Debonaire
04-29-2008, 09:41 PM
Hi everyone. I am planning to implement a new 3d coordinate system hopefully to simplify curve operations and do it locally in that new coordinate space. Basically, I will have my first coordinate as the time 't' along the curve, the second coordinate will be 'd' or distance from that point on the curve perpendicular to the tangent along the point and the third coordinate 'r' a rotation along that curve who's axis will be the tangent to that point. I would like to have my own WorldToLocal and LocalToWorld matrix for this new space. Are there any related work on these matters? Is there an alternative for simplifying curve coordinates operations so that computations wont need to be done in euclidean space but in other coordinate space instead? What problem blocks, singularities, operation ambiguities will I encounter in this new space?

Thanks so much in advance for any advice,
D

Debonaire
05-01-2008, 08:37 PM
Basically I have a point Q near a curve that can be translated or oriented using an operation in curve space. This point is expressed in local coordinates of the curve space I described above. I want to find the most efficient way to convert it to world space, hmmm, or maybe if there is a better way to do things.

Anyway, the one I'm planning for is a little unconventional so I was thinking it might fail on some cases I'm unaware of. To construct my 3x3 LocalToWorld matrix would be something like...

| Tx Ty Tz |
| 0 Hcos(theta) Hsin(theta) |
| Px Py Pz |

where T is a euclidean point computed from the point along the curve at time t (well basically if I project Q to the curve perpendicularly it would hit a point at time t and I use that t to compute T), H is the perpendicular distance of the point Q from the curve point tangent, and P is the position of the curve in World Space, theta is some angle from the curve's local up vector and the curve's up vector is assumed to be constant and equal to [0, 1, 0] in local space.

Hmmm, well the matrix looks similar to those used with cylindrical coordinate system. Anyways, any advice about efficiently orienting/translating points near a curve will be greatly appreciated.

Thanks so much!

D

Debonaire
05-10-2008, 07:52 AM
Hi again everyone after reading more about the Frenet frame I have a clearer idea of my problem.

Anyhow I still have some questions though, suppose I have the following given, the TBN of the curve at point P (P is also given and it is a point inside the curve given in cartesian local spline space) and I have a point Q off the curve whose local cartesian coordinate is unknown and this Q is given to be H units away from P and lies along a vector that is Theta angle from N (Normal) clockwise

T B
| / .
| / / Q
| / /
|//_______N
.P

How can I compute for the local spline cartesian coordinates of Q?

Thanks so much in advance

Reedbeta
05-10-2008, 09:47 AM
If I understand what you're describing correctly, aren't the coordinates of P always (0, 0, 0) in the local spline space?

That's just basic trigonometry, the N-coordinate will be H*cos(theta) and the B-coordinate H*sin(theta). (You might have to flip the sign on the B-coordinate; I forget what order makes the Frenet frame right-handed.)