algorithmic modeling for Rhino
Dear Remy,
You can already achieve this by a small modification to your optimization problem: Take the single-valued output of your Grasshopper definition, subtract it from the target value, and minimize/maximize the square of the difference. Alternatively, you may also minimize or maximize the absolute value of the distance, but it is more save to square.
As this sounds quite technical, have a look at at the attached example. There, I optimize for the radius of a circle such that the circle's area is 1.5.
Above technique of optimizing the square of the difference to a target value is a very common and powerful technique in optimization.
Please let me know if I can help you any further,
best, simon
Thank you, that's what I wanted.
It might be useful to integrate directly in goat in a future version.
Regards
Welcome to
Grasshopper
© 2024 Created by Scott Davidson. Powered by