Hello everyone,
I'm working with a primitive grid in Houdini and need to set its diagonal length to a specific value, say 10 units, while maintaining the grid's aspect ratio.
Is there a straightforward way to achieve this in Houdini? Any advice or solutions would be greatly appreciated.
Thank you!
How to Set the Diagonal Length of a Grid in Houdini
507 2 0- JosephH2024
- Member
- 11 posts
- Joined: July 2024
- Offline
- Konstantin Magnus
- Member
- 682 posts
- Joined: Sept. 2013
- Online
https://www.cuemath.com/diagonal-of-rectangle-formula/ [www.cuemath.com]
Put this in an attribute wrangle running over points:
Put this in an attribute wrangle running over points:
float diag = chf('diagonal_length'); vector s = getbbox_size(0); float d = sqrt(s.x * s.x + s.y * s.y); float f = diag / d; v@P *= f;
Edited by Konstantin Magnus - July 21, 2024 04:11:10
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- JosephH2024
- Member
- 11 posts
- Joined: July 2024
- Offline
Konstantin MagnusThanks. This is just what I was looking for. I appreciate your help.
https://www.cuemath.com/diagonal-of-rectangle-formula/ [www.cuemath.com]
Put this in an attribute wrangle running over points:float diag = chf('diagonal_length'); vector s = getbbox_size(0); float d = sqrt(s.x * s.x + s.y * s.y); float f = diag / d; v@P *= f;
-
- Quick Links