Grasshopper

algorithmic modeling for Rhino

Hello.

 

I trie to make Boxes on a curve, and then rotate them in the tangent of the centre point from the box. But then i have the problem with the angles, that a few boxes rotate in the false direction. Someone can help me to find a solution???

 

Thx

Views: 2659

Replies to This Discussion

When you measure the angle between vectors you always get the acute angle with no indication of direction. But if you use the cross product component of the two vectors you will get the direction of the normal (rotation access) and therefore you can get an indication as to which direction you need to rotate. I unitize the cross product and multiply the angle by the Z component.


Thx Danny for your reply.

I think that this is not the solution of my problem. Now I post my ghx file.

so you can have a look.

 

thx

With the Cross Product:

Without:

This is the method I use on a daily basis with plotting ship tracks, where Y is North and the angle to rotate is the heading.

Thx a lot Danny. Now it works perfect.

While the vector method gives way more control I think you can do the same thing with frames.
(majority of the definition is for the curve).

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