Location, Orinetation, Frames blog
Posted: Tue Jul 30, 2024 1:09 am
Hello friends
This is a restoration of another important thread containing informal discussion of frames. It is likely will be done is several passes.
In DGK we use Frame notion to represent and manipulate the very important location and orientation. Other software often use quaternions and/or matrixes for the same thing. We chose frames because of its intuitive nature.
A 3D frame is a set of 3D axes defined by a 3D location and orientation. Orientation is defined by a set of mutually perpendicular vectors for each axis. IFrame_DG is the interface.
We think of 3D space as defined relative to a single set of main axes called global. By default, any frame is global. This means its origin coincides with the origin of the global axes (all coordinates are zero) and axes are: (1,0,0), (0,1,0), (0,01).
IFrame_DG.Translate*() methods modify the location only. IFrame_DG.Rotate*() methods modify the orientation only.
When we say a point has coordinates pt(x,y,z) without mentioning anything else, we mean the coordinates are relative to the global axes. When we have another frame fr, we can define coordinates of the same point relative to this new frame. They will be different, of course. fr.ToLocal(pt) returns coordinates relative to fr. IFrame_DG.ToGlobal() does the reverse.
Notice that vectors have their own implementation of these operations.
This is a restoration of another important thread containing informal discussion of frames. It is likely will be done is several passes.
In DGK we use Frame notion to represent and manipulate the very important location and orientation. Other software often use quaternions and/or matrixes for the same thing. We chose frames because of its intuitive nature.
A 3D frame is a set of 3D axes defined by a 3D location and orientation. Orientation is defined by a set of mutually perpendicular vectors for each axis. IFrame_DG is the interface.
We think of 3D space as defined relative to a single set of main axes called global. By default, any frame is global. This means its origin coincides with the origin of the global axes (all coordinates are zero) and axes are: (1,0,0), (0,1,0), (0,01).
IFrame_DG.Translate*() methods modify the location only. IFrame_DG.Rotate*() methods modify the orientation only.
When we say a point has coordinates pt(x,y,z) without mentioning anything else, we mean the coordinates are relative to the global axes. When we have another frame fr, we can define coordinates of the same point relative to this new frame. They will be different, of course. fr.ToLocal(pt) returns coordinates relative to fr. IFrame_DG.ToGlobal() does the reverse.
Notice that vectors have their own implementation of these operations.