algorithmic modeling for Rhino
Hello,
Is there a way to find the maximum circle in a simple polygon (4 or 5 vertices) ?
Circle can be tangent or not, but always inside the polygon.
Thanks on advance,
JL
Tags:
This old discussion might help: http://www.grasshopper3d.com/forum/topics/maximum-inscribed-circle
I think solving this exactly for general cases is not trivial, but practically it should be fairly easy to find a good enough solution.
Well i read this discussion and i did not found the solution. It seems that the circle computed are not inside but around the polygon, as in gen_max_circle_2_polyline.gh definition.
The approach Mateusz showed in that discussion seems to work fine.
Accuracy is determined by how finely you sample your curve for the Delaunay.
For a polygon you could use crest of medial axis, the heighest crest could be place where there is the biggest circle.
http://www.grasshopper3d.com/forum/topics/sand-dune-medial-axis-sam...
For general curves the approximation of medial axis using Voronoi could be another to do it. There are many discussions on that.
Here I filter Vertex with their Z value the highest is used to get the the point where the maximum circle inscribed is. The radius of circle is depending on the height and on the slope of the roof.
Et voilà
PS : My script has some problem with 1 curve and work more well with 2 or more. A tree problem :-(
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