Grasshopper

algorithmic modeling for Rhino

Hi All, I am stumped... at step 1... I am trying to simply make a mesh box orient itself toward a point using transformations/change of basis in Csharp grasshopper.

The ambition is to learn to do relative transformations (scale, move, rotate) and cobble together a simple L-system.

Might anyone have any advice on this, please?

Views: 393

Attachments:

Replies to This Discussion

Hi Lennard,

You should look at Rhino.Geometry.Transform. It contains a bunch of useful static methods.

For example, the equivalent of Rhino's orient3d is Rhino.Geometry.Transform.PlaneToPlane(p1,p2)

where p1 is plane from and p2 is the target plane.

You get back a Transformation matrix which you can then apply to your object via:

myObject.Transform(transformMatrix)

For translate use  Transfrom.Translation, for rotate use Transform.Rotation() etc.

Hope this helps!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service