Grasshopper

algorithmic modeling for Rhino

Well friends,

Here's 3 examples related with that mysterious shear thingy (play the "point-to-point" wmv attached).

The first is a point to point shear.

The second is like the first but a bit more complex. Includes a challenge as well.

The third works via the classic shear transformation 4*4 Matrix. Also includes a challenge.

PS: Prizes for the brave winners are the usual:

He, he

Views: 2570

Attachments:

Replies to This Discussion

Hi Peter, in an attempt to wake my brain up today I chose to accept your 2nd shear-challenge, here's what I did:

Attachments:

Excellent: you are T2CBW (The 2nd Challenge Brave Winner). Provide some address for the hot (literally) stuff.

BTW: shown the orthodox Shear Matrix deployment. Rhino does the other way round (hence the shear = shear.Transpose();).

More stuff (and challenges + yummy sardines) soon

best, Lord of Darkness

BTW: the 3 first values in the last horizontal row are not Mirror related: they are "perspective" related values.

More soon with the ultra mysterious perspective transformation (Note: that thing without the transpose becomes the humble translate transformation [move, that is]).

The first three elements on the diagonal are indeed scaling related. The topmost three elements in the last column are translation, the leftmost three elements on the bottom-most row are taper (or perspective projection, it's the same thing), the bottom right element is not really used and the remaining elements around the diagonal are rotation/shear controls. Rotation is just a special case of shearing, where the shearing angles are complimentary.

So my transformation matrix image above is wrong (don't recall where I got it from back then, or if I made it myself), and I was lucky to get at least the 'scaling cells' correct? Hmmn ~:|

In a nutshell (For the orthodox left to right, top to bottom deployment):

M00,M01,M02,M03

M10,M11,M12,M13

M20,M21,M22,M23

M30,M31,M32,M33

Hence: a "perspective" transposed transformation becomes a "translation" transformation.

This is flipped with respect to translation and taper. Note that both act-on-the-left and act-on-the-right matrices are used in the world at large. Rhino uses the opposite of the standard mathematical kind for computational purposes (but I can't remember which is which). I do know you almost never have to deal with matrices yourself, the sdk provides a lot of methods for setting up a transform from more understandable data (vectors, points, planes, factors and angles), and you can always multiply two or more matrices together to combine them.

Well ... the "standard format" is as in the captured Image above.

Other than that ... personally I prefer to deal directly with trans matrices especially when "custom" transformations are in the pipeline (I'll post soon some similar test examples for having some "math fun").

uh?

Can someone/peter explain what is the challenge(s)?

I'm completely missing that point here... :P

The second (addressed successfully by Pieter) is an invitation to dig in into trans Matrices (and what their 16 values actually mean).

The first asks for adding some code in order to control that "point-to-point" (so to speak) shear with the other missing "From" point (Point3d pEndX).

Both are strictly code related.

Hi Riccardo,
the challenges are in the gh file that Peter posted, but I'd say a new challenge arose: get the transformation matrix image correct (for Rhino/Grasshopper)

I made a definition to fill a transformation matrix with 16 values to check (which I think I did some years ago too). I think I got it right, but the discussion has me confused... Am I missing something here?

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service