Magnificent Problem
Let the polygon have n sides
it has n corners
let the user pick any of the sides s
its starting point is s
its ending point is s+1
set y=0 to all corners of the polygon
get vertical distances between every pair of corners
let user set the slicing measurement, m
starting from s through n to s+1
drawing lines y=s(y)+m to cut across every sides in its path [any side can
zigzag up and down, or left and right]
tabulate all intersected point coordinates SIDE by SIDE
run across the table row by row, join the points pair by pair [ 1 and 2, but
not 2 and 3, then 3 and 4]
we need to set limits of starting point and ending point of each of these
procedure appropriately.
Good exercise for the mind.
--
Regards
PY & Associates
"PY & Associates" wrote in message
...
Please clarify the following
orients the polygon according to a selected side
You want to plot the polygon along x axis, or y axis, or ???
unit width
1 unit measurement or equal arbitrary units ?
plotting the resulting polygons
user selectively pick any of them to plot individually;
or plot them side by side as if sliced cake please?
Regards
PY & Associates
"Cody" wrote in message
...
I am trying to create code that takes a set of coordinates as corners of
a
polygon, orients the polygon according to a selected side, and divides
the
polygon into polygons of a unit width. The output would be the set of
values
of the corners of the resulting polygons for the purpose of plotting the
resulting polygons.
Please help me get control of this beast!!!
Thanks
|