What is the method behind the Compound Transformations component?
I have 5 transforms to combine before multiplying. Many thanks!
Transformations in Grasshopper are a bit different than Rhino or the usual mathematical approach (see below). However the Compound Transformations component takes a bunch of successive transformations and creates a single transformation which does the same thing. This means you only have to perform a potentially expensive (in terms of memory and processor cycles and inaccuracies) process only once.
Not important but maybe interesting:
Transformations in Rhino (and every other 3D software I know) are represented by 4x4 matrices. These matrices of 16 numbers can encode all possible linear transformations and combinations thereof. That is: translation (moving), dilation (scaling), reflection (mirroring), rotation, shearing and tapering (perspective shortening).
If you have one matrix which encodes a certain movement, another matrix which encodes a rotation about a specific axis, and a third matrix which encodes a scaling step, youād be wasting time if you applied them all three in succession. Instead, youād multiply the matrices together first, giving you a single matrix which does the exact same thing as all three. This is more efficient.
However when you combine matrices it becomes impossible to peel them apart again. Even a matrix representing a single operation (such as a rotation about 2 axes) is difficult to reverse engineer into meaningful individual steps. This is why Grasshopper āhidesā the matrix part and instead has different types of transformations that all retain all the meaningful data (axes and angles, centre-points and scale-factors, shearing-planes, etc.). When you compound these grasshopper transformations what you get is a list of successive individual transformations that can be easily segregated again. Of course behind the scenes matrices are kept and used, but on the user-interface level the transformations are presented as collections of meaningful operations.
The compound transformation component description āCompound two transformationsā. Is this an old description? It takes more than two.
Either that, or it was always a typo.
Thanks David, and yes, big data going into optimisation routine so will need to have the compound first. Will have to apply elsewhere and the operation order will be translation, quaternion and dilation. Dusting off matrices maths. Thanks any ways. BTW compound component takes at least 7 ( max I tested ) and computes in less than 1 ms.
Iām having an issue with attaching transformations to an object and using āSeries Moveā in Grasshopper. At a certain point, merging multiple compound transformations just stops working for me, and Iām starting to wonder if the mental gymnastics of dealing with matrix transformations is something Iām simply incapable of controlling.
Hereās my scenario: I have an asymmetrical object positioned at X = -1000 from the origin. I need to mirror this object once about the YZ Plane, then array it along the Y-axis a given number of times using Series Move. After that, I need to array the resulting objects in the Z direction, also a set number of times. Once thatās done, I have to array them along the X-axis. This is where things start to break down for me.
Finally, I want to mirror the entire set of objects again across the XZ plane. The goal is to attach numerous transformations to a single object, ultimately expressing both the object and its reflection. Is this approach possible, or am I missing something fundamental? Any insights would be greatly appreciated!
If anyone has tutorials or resources that could help me understand how to properly manage grafting in Series Moves within a matrix transformation attachment context, that would be incredibly helpful.
Thank you in advance!