2023-05-11 07:30 AM - edited 2023-05-11 07:30 AM
My wish is for the XFORM command in GDL to have a scaling factor for the bounding surface area.
Currently it can move the bounding planes in any (or all) of the 3 axis directions.
But I would like for it to also have a scaling factor so we could also reduce/enlarge the bounding planes.
I have 'faked' it in this example with a cone.
Barry.
2023-05-11 07:40 AM
Just imagine it was a single HPRISM with the Z-plane scaled so it is smaller than the base
The perfect bath or basin.
Barry.
2023-05-11 08:01 AM
Hi Barry, unfortunately this is not possible. XFORM is simply a matrix. When you apply a transformation matrix to an object what you effectively do is modifying the proportions, orientation, angles or scale of the xyz system used to represent it.
You have your usual xyz cartesian coordinates all with unit one and orthogonal to each other to start with. You apply a matrix to it and what it does is, transform that system and subsequently the whole field it represent.
What that mean is that every transformation made with a matrix can only be linear and homogenous across the whole field.
2023-05-11 08:40 AM - edited 2023-05-11 08:41 AM
I am not sure how it works, but thanks for explaining.
I don't even mind if it is a completely new command.
It is just a wish.
Barry.
2023-05-11 08:58 AM
It would have to be a whole new command yes.
The problem with your exemple is that the pyramid shape you want cannot be defined just by stretching the base plane as you suggest.
To make it simple, whatever you do with XFORM, the lines along an axis always stay parallel to each other. If you take your pyramid image in your original post, if you scale the base plane, it is not enough to define the transformation. Scaling the base plane would mean that every lines along the z axis would have to converge somwhere, but where? On the positive or negative side of z ? On the axis or offset from it ? It gets messy really quick.
The math behind matrices is called linear algrebra and its prettty fascinating. It is absolutely fundamental in computer science and you use it basically every time you use a command in archicad. If you are interested look at this it explains it extremely well https://www.youtube.com/watch?v=kjBOesZCoqc&list=PL0-GT3co4r2y2YErbmuJw2L5tW4Ew2O5B
2023-05-11 05:33 PM
Hey Barry,
If you or others want some more behind-the-scenes about what the XFORM does, see pages 2 and 3 of this article I wrote 19 (!) years ago for the GDL Cookbook 4:
Cheers,
Karl
2023-05-11 06:09 PM
It seems sweep might be what you are after. Ruled might work too
2023-05-12 03:10 AM
@SenecaDesignLLC wrote:
It seems sweep might be what you are after. Ruled might work too
Yes and no.
With those I will have to calculate the path and scale (SWEEP) or new node coordinates (RULED).
And I don't necessarily want the same polygon shape (SWEEP) or the same number of nodes (RULED) along the path.
I was hoping for something that basically places a bounding box around the elements and then reduces the scale to one end of that bounding box.
All points between the two opposite bounding box planes would be scales proportionally.
XFORM can move or skew all of the intermediate points and surfaces already, I am just hoping for some way to rescale them uniformly between the two bounding planes.
Barry.