Grasshopper

algorithmic modeling for Rhino

Hi all, I've trying to transform a rectangle as shown so that the top is at a 30 degree angle to the horizontal. I've tried moving the original point, and creating an interpolated curve with 0 degree but that didn't work. Also rotated the top line at 30 degrees but then the line needs extending. Is there a simple way to do this that I'm overlooking?

thanks, much appreciated..

Views: 1166

Replies to This Discussion

Hi Woodduck,

technically it's not transforming as you cannot make a 4x4 transformation matrix that performs this operation (well, you could, but not using Grasshopper components).

I think the best way to approach this is to create an angled line at 30 degrees and then intersect it with the vertical line it is supposed to touch.

I made a cluster that does this (I'm not proud about how bloody complex it turned out to be, but I couldn't figure out a simpler way).

The cluster algorithm is simple at heart. It takes a rectangle and four numbers. These four numbers are the angles of each edge (in degrees). The edges are then rotated according to their angles and intersected to find the new corner points. Unfortunately a boatload of data matching logic is needed to pull it all together if you want multiple rectangles at once:

From the outside at least it's easy to use:

--

David Rutten

david@mcneel.com

Tirol, Austria

Attachments:

thanks David, it works perfectly. I like how I can set the actual angle and on all the sides.

In the meantime I came up with this method that moves the top left point and re builds the rectangle. You can't set the angle directly as with yours but it may be useful to someone.

thanks again.

btw David, is there a way to type exact numbers into gene pool as in the number slider?

If not, is there a chance it could make it into a future release?

There isn't. But you can zoom in for finer control.

--

David Rutten

david@mcneel.com

Tirol, Austria

Hi David
I appreciate a lot your definition , even if ,
for a beginner like me, it is to  study
carefully.......
That I send you is a way,  more simply, I think  ,
in order to reach the same result-

Sorry for me bad English
al

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service