algorithmic modeling for Rhino
Hi,
One last question for the night. I have a grid on a surface (like using the divide surface component) and thus I have the normal and the frame at that point. The frame is tangent to the surface at that point, but it looks like the "X" on the frame is aligned with the surface U direction.
In order to get the "down" direction, I need to find the projection of the normal vector at the point onto the surface in the Z direction. I have tried several ways and do have a method that works more or less with about 10 components, but I have to think there's a better way... Problem is at the edge of the surface where the projections "fall off" the surface mostly...
Is there an easy way I'm missing...?
Thanks, --Mitch
Tags:
Mitch, you can use the Flip Direction Vector, so if it goes Up, this will make it go in the appositive direction...
Hope this helps!
Andres
Hi all,
Thanks for the ideas and help!
@ David - as always, you come up with the simple elegant solutions...
As soon as I left the computer for the night I came up with another method - get the normal vector, and make a 3 point plane with the origin as the surface point, the X axis as the end of the normal vector and a 3rd point that is the same as the second but a bit lower in Z (I just added an inverted unit Z vector). The Y axis of that plane is the downhill vector. It's still 10 components, though... :) Interesting thing is if you use a positive unit Z vector, you get the uphill direction...
I guess another observation is that all the methods except David's depend on the surface direction being "up", David's is surface direction independent.
Ciao, --Mitch
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