Grasshopper

algorithmic modeling for Rhino

How can i avoid the twist of axis?

The have to be aligned in same direction.

Thx in advance

Views: 1474

Attachments:

Replies to This Discussion

It is impossible to have a consistent orientation for a set of planes in 3D space, there's always going to be some place where two planes have wildly different orientations no matter how close together you place them.* You can however reduce the amount of discontinuity amongst a set of planes.

One way is to use the [Align Planes] component, but that only works if your planes are sequential slices, ie. if a nice curve can be fitted through all their origin points.

If you have planes like in your image, I think a better way would be to use the Cross product to calculate the X and Y axis of a plane:

  1. Compute the cross product between your normal and WorldZ (note that this will fail if your normal is (anti)parallel to WorldZ. If that's the case you need to pick some other direction which is distinct from all your normals. This first cross product becomes your X-axis.
  2. Compute the cross product between your normal and your x-axis, this becomes your y-axis.

I think the above yields more consistently oriented planes.

* This is a direct consequence of the Hairy Ball theorem as I understand it.

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