Hello,
Please I need help trying to figure out how to inscribe equal sized circles in a polygon in such a way that all sides would touch.
Picture attached is closest i could find online describing my request. In the image you can see 6 equal sized circles drawn inside a triangle with each circle touching its neighbor and the side of the triangle. I would like to be able to do the same for any number of circles and any kind of polygon.
I've explored tiled cloning, snaping, aligning etc but not successful. I understand some geometry is involved but would appreciate any insights with using inkscape to do same
How do i inscribe circles in polygon with sides touching
How do i inscribe circles in polygon with sides touching
 Attachments

 polycircl.PNG (23.04 KiB) Viewed 1362 times
Re: How do i inscribe circles in polygon with sides touching
Hi.
There is no trivial solution for a random polygon.
Not just with inkscape, in geometry in general.
For a triangle alike, the construction is quite simple though, as with a few more shapes.
Is there a special pattern you would like to draw?
There is no trivial solution for a random polygon.
Not just with inkscape, in geometry in general.
For a triangle alike, the construction is quite simple though, as with a few more shapes.
Is there a special pattern you would like to draw?
Re: How do i inscribe circles in polygon with sides touching
Thanks for the reply.
The pattern i'd like to draw is circles bounded by an hexagon. See attached picture for the closest I was able to come up with using inkscape patterns. As you can see a number of the circles crossing the hexagon edges gets chopped off but I would however want the circles to be tangent to the edge of the hexagon and not cut off as in the triangle diagram previously shared. I figure if there is a way to do it for one type o f polygon then the same can be done for others as well.
The pattern i'd like to draw is circles bounded by an hexagon. See attached picture for the closest I was able to come up with using inkscape patterns. As you can see a number of the circles crossing the hexagon edges gets chopped off but I would however want the circles to be tangent to the edge of the hexagon and not cut off as in the triangle diagram previously shared. I figure if there is a way to do it for one type o f polygon then the same can be done for others as well.
 Attachments

 path9597.png (4.26 KiB) Viewed 1325 times
Re: How do i inscribe circles in polygon with sides touching
You can do it by creating a hex pack of tiles clone circles, then scaling them to fit your hex,
Creating the tiled clones (P1 SImple Translation, shift each row by 50%x and 14.6%y) The 14.6% is the best you can do in Inkscape to get the trig derived offset needed to pack the circles.
Unlink the clones and remove all but 6, then group them.
Draw a hex poly oriented the same way, then copy the hex poly and paste the height onto the group (with preserve proportions checked).
Alternately, if you really want a pattern, use the hex pack and follow this tutorial http://www.silent9.com/blog/archives/14 ... scape.html
Rob A>
Creating the tiled clones (P1 SImple Translation, shift each row by 50%x and 14.6%y) The 14.6% is the best you can do in Inkscape to get the trig derived offset needed to pack the circles.
Unlink the clones and remove all but 6, then group them.
Draw a hex poly oriented the same way, then copy the hex poly and paste the height onto the group (with preserve proportions checked).
Alternately, if you really want a pattern, use the hex pack and follow this tutorial http://www.silent9.com/blog/archives/14 ... scape.html
Rob A>
Re: How do i inscribe circles in polygon with sides touching
bios wrote:I figure if there is a way to do it for one type of polygon then the same can be done for others as well.
This is not true at all. An equilateral triangle has a solution, and a regular hexagon has a solution. Tat's pretty much it for regular packing of circles into a polygon, although I suppose squares qualify too in that a single square can contain a circle, and a larger square or rectangle is an arrangement of squares etc. but even these can have random arrangements that are more efficient when the numbers are large.
Only polygons that can be tiled across a plane can be expected to have a regular packing solution. Everything else will have to be irregular in some way and usually unpredictable and hard to calculate.
When Lazur said, "There is no trivial solution for a random polygon," I think this is pretty much what he meant.
Your mind is what you think it is.
Re: How do i inscribe circles in polygon with sides touching
Hi.
Have a look at this for the mathematics involved. Mathworld
Programming solution: http://gis.stackexchange.com/questions/54727/maximumcircleinsideanirregularpolygonfromarandompoint
Have a look at this for the mathematics involved. Mathworld
Programming solution: http://gis.stackexchange.com/questions/54727/maximumcircleinsideanirregularpolygonfromarandompoint
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Return to “Help with using Inkscape”
Who is online
Users browsing this forum: No registered users and 5 guests