I'm a newbie too grasshopper and am currently an architecture student.
I've been trying to figure this out for hours and have searched the forum and the internet.
What I want to do is create a script that will allow me to specify the area of a rectangle but be able to adjust the sides by pulling or pushing it in where the rectangle would adapt on the other side while the opposite sides get smaller or larger to keep the total square foot the same.
For example. Say my classroom size has to be 400 square feet. I would like to have two sliders for the x and the y that start at the square root of that being 20 x 20, but if I started to pull the slider up on one of the axis, it would adjust the other automatically so that now a 40' foot long length on one side would adjust the other side to 10' keeping the square footage locked.
I don't have a start yet I've been trying to learn this program as fast as possible. I don't expect anyone to do it for me but a point in the right direct would be awesome..
Thanks!
John
David Rutten
Hi John,
this is not possible in regular Grasshopper. You can set it up so that you can change the width of a rectangle while keeping the same area, or the height, but Grasshopper is not an iterative solver where you can change some of the properties some of the time and expect other ones to follow suit.
You may be able to achieve this with the Kangaroo plugin, but I'm afraid that's well beyond my skill level.
--
David Rutten
david@mcneel.com
Apr 20, 2014
Vicente Soler
If it's just a rectangle and you are changing the height or width, I don't think you need Kangaroo, but you can't automatically change slider values on the fly unless you use scripting. I guess the best way would be to use events, but this also seems to work.
Apr 20, 2014
Juan Stefani
Hello there, these is possible without a script, heres an example
Jan 14, 2015