1. ## draw consecutive polygon

Hi,
I want to draw a consecutive polygon of similar side inside a given polygon (of any number of sides-regular or irregular) at a specified distance (varies).

When the space inside the polygon is not enough to draw another polygon, I should stop drawing polygon.

Can anyone tell me how to detect whether the a polygon at specified distance can be drawn inside the polygon or not.

Refer attached figure for more idea.

Thank you
Rajee

2. Originally Posted by mrajee
Hi,
I want to draw a consecutive polygon of similar side inside a given polygon (of any number of sides-regular or irregular) at a specified distance (varies).

When the space inside the polygon is not enough to draw another polygon, I should stop drawing polygon.

Can anyone tell me how to detect whether the a polygon at specified distance can be drawn inside the polygon or not.

Refer attached figure for more idea.

Thank you
Rajee
A regular polygon could be handled this way.
n = number of sides in the polygon (n>2)
s = the length of one side of the polygon.
d = the distance or offset of a parallel line for the next smaller polygon.

A regular polygon has a center point (or radius).

$\displaystyle \dfrac{2\pi}{n}$ = central angle for 1 side of the polygon.

The perpendicular distance from a side to the radius point:

$\displaystyle D = \left( \dfrac{s}{2 \tan \left( \dfrac{\pi}{n} \right) } \right)$

The maximum number of offsets possible in a regular polygon.

$\displaystyle \text{Offsets} = \dfrac{D}{d}$

An irregular polygon is complicated. (see attached image)
It is necessary to know the coordinates of each vertex. For each side the offset would have to be intersected with the offset to the side preceding and following. Those intersection points would have to be checked against ALL of the other intersection points to insure a "neat" reduction of the polygon.
Eventually this problem becomes two polytons that almost touch.

Should the procedure terminate?
Or should the routine continue with a left polygon and and right polygon?

An irregular polygon is not impossible -- just complicated.

3. Originally Posted by aidan
Should the procedure terminate?
Or should the routine continue with a left polygon and and right polygon?

An irregular polygon is not impossible -- just complicated.
Thank you for your solution. My routine of offsetting should continue with left polygon and right polygon.

In net, they have given using Minkowski addition it can be done.Can you give solution to offset using Minkowski addition. I dont know how to use that addition for my process.

I am drawing parallel lines for the given polygon and find the intersection point and draw polygon with all the intersection point as vertex of polygon. Refer Attachment.