algorithmic modeling for Rhino
Tags:
My apologies.
Hi Eleanor,
You are rotating the first panel only about all the other panels, which I don't think is intentional. Also you are basing the rotation on distance from the attractor rather that direction. If you want the panels to face the attractor point, like the other post, then you need to:
1) create a Vector between two points. Vector>Vector>Vector2Pt
2) create a reference vector to measure against. Vector>Vector>Unit X
3) Measure the angle between vectors. Vector>Vector>Angle
because the angle between two vectors is always shown as the reflex angle you will need to calculate the direction of rotation separately.
4) Calculate the Cross Product of the two vectors. Vector>Vector>Cross Product
5) Unitize the Cross Product. Vector>Vector>Unit Vector
6) Extract the Z component of the Unit Cross Product. Vector>Vector>Decompose
7) Multiply the Z component (either 1 or -1) with the Angle. Maths>Operators>Multiplication
8) Rotate each panel about its base point by the angle to the attractor. Transform>Euclidean>Rotate
Dear Danny
I have using your example here to calculate a similiar scenario. It works! BUT
i dont really understand a few steps or why it works.
Would it be possible to explain the "why" for steps 3,4,5 and especially 7
Would be awesome if you can help me understand this
Kind regards
Gordon
In this example the vectors are in the xy plane and the cross product for two vectors in this plane will either be up or down. It will be +ve Z if the angle between them is going anti-clockwise and -ve Z when going clockwise. So unit-izing the result will give either a 1 or -1 in the Z component which can be applied to the actual angle and give direction for rotation in the world axis.
More about the cross product and right hand rule http://en.wikipedia.org/wiki/Right-hand_rule
Correction to the above post should be acute angle instead of reflex.
Danny,
I am trying to do something similar except I'm trying to rotate the scaled surface in relation to the attractor point in the XYand Z direction. If there is any advice you can give on my scrip that would be great.
I'm trying to create something similar to this project:http://www.dezeen.com/2009/05/20/3d2real-by-ilek-students/
Thanks
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by