D
D
dimas_242014-12-22 20:42:42
Programming
dimas_24, 2014-12-22 20:42:42

How to write a program to split a polygon?

The essence of the problem: the program enters the coordinates of the vertices of a convex polygon, the number of pieces into which this polygon must be divided. At the output, the program gives the coordinates of the segments dividing the polygon (the beginnings and ends of the segments lie on the sides of the polygon). Segments can have 1 common point only on the sides of the polygon (they cannot intersect inside it). Write a solution to the problem, preferably in C++, or provide links to resources that will cover this issue. The second is even better, but literature is needed for "dummies", schoolchildren, because I'm still in school.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-12-22
Protko @Fesor

1) Find the vertices of the rectangle in which our object is inscribed.
2) We set the section of the rectangle in the amount we need
3) We are looking for intersections of the sections with the faces of the polygon
4) ???
5) profit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question