1
\$\begingroup\$

I recently asked a question at math stack exchange and realize a similar questions is more suited for this forum, but the original is here:

https://math.stackexchange.com/questions/1526601/terminology-for-transformation-matrices-update-or-rigid-body-transform

I'm attempting to describe transformation matrix operations within Sketchup's Ruby scripts, and I need some terminology.

Sketchup allows the selection of a group of "loose" drawing objects (i.e. edges and faces), and provides options to create a grouped object from them. The drawing elements inside the group have position data relative to the group's local coordinate system. The grouped objects respond to a getter "transformation" method that returns a transformation object that contains data representing the orientation, scale, and position of the group.

Sketchup's "world space" supports multiple grouped objects, and typically there are numerous grouped entities in the outer level entities, as well as loose drawing objects. Each grouped object has a separate transformation that determines their position, orientation, and scaling in world space.

The transformation can be altered or replaced with methods that include:

a) The "transform" method: Applies a transformation (i.e. like a rotation) to rotate the group; and

b) The "transformation=" setter method: Replaces the existing transformation with the supplied argument.

Lets say I have a grouped object called "entity1" and rotation transformation object called "rotation". To provide the same rotation effect I could perform either of the following in Sketchup's Ruby programming:

entity1.transform!( rotation )
    OR
entity1.transformation= rotation * entity1.transformation

Only groups and components support the "transformation=" setter method, while fundamental Point3d & Vector3d object provide "transform!" kind of methods. It is obvious, at least from within Sketchup (which uses OpenGL internally), that transformation matrix internal data can be treated as either:

Relative: A transformation performs an incremental operation (Example "entity1.transform! identity" does not have an affect on the grouped model); or

Absolute: The data inside a transformation is treated as absolute position, orientation, and scaling of the grouped object. (Example "entity1.transformation= IDENTITY" sets the model to Sketchup's origin position, the model is de-rotated to the orientation it was when first grouped, and it is descaled)

Questions:

1) What is the terminology for the type of transformation that is supplied to the "transform!" method? I was calling it an "affine", now want to call it an "update transformation".

2) What is the terminology for the type of transformation that is the argument to the setter "transformation="? I have been calling it a "rigid body transformation", and sometimes "absolute transform". It appears that OpenGL is calling this the "model matrix".

3) If I call it "model matrix", is more than one model matrix transform allowed in world space?

A previous english stack exchange article for a word to mean "position and orientation" is at: https://english.stackexchange.com/questions/119883/word-for-position-and-orientation The article responses recommend to use "pose matrix".

\$\endgroup\$
2
\$\begingroup\$

I think you're overthinking it.

In Ruby, the ! is conventionally attached to methods to indicate that the method modifies the object in some way (see this SO thread).

From the documentation of SketchUp's Group class, transform! applies a given transformation to the group whereas setting transformation just replaces the existing transformation with the new one.

Looking at it another way, transform! multiples the current transformation with the provided transformation (it's a *= operation) and transformation= sets the current transform to the provided transformation (it's = operation).

Fundamentally these transformations are just matrices (which are encoding a translation, rotation and scale). They are the same transformation with the same meaning, the different methods are simply giving you different ways of interacting.


As to your specific questions:

1) What is the terminology for the type of transformation that is supplied to the "transform!" method? I was calling it an "affine", now want to call it an "update transformation".

It's just a transformation. It's probably an affine transformation because that's usually what we use in 3D graphics. An "update transformation" is not really a generally-accepted piece of terminology, but it is true that transform! is updating the existing transformation of the group (of course, so is transformation=).

2) What is the terminology for the type of transformation that is the argument to the setter "transformation="? I have been calling it a "rigid body transformation", and sometimes "absolute transform". It appears that OpenGL is calling this the "model matrix".

Nope, it's just a transformation. It's not any different. A rigid body is a physical body that does not deform. A "rigid body transformation" would be what you might call a transformation that is conceptually associated with a rigid body (such as the one used to place it in a world), but they are otherwise orthogonal concepts.

What OpenGL calls the "model matrix" is specifically a transformation matrix it intends to be used to move from a specific coordinate system (the coordinate frame in which model geometry is provided) to the next system in the graphics pipeline (the world coordinate system).

"Absolute transformation" is not a generally accepted term either, but in context one would probably expect it to be a matrix that transformed a thing from a well-defined origin instead of relative to some other transformation.

3) If I call it "model matrix", is more than one model matrix transform allowed in world space?

Not in OpenGL, but you could just concatenate multiple transformations via multiplication.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.