Answer the question
In order to leave comments, you need to log in
How to organize the storage structure of polygon divisors data?
The task is this. There is a polygon (I'll call the original one). The coordinates of its nodes are absolute values relative to the coordinate plane.
You need to divide the polygon by divisors. The coordinates of the divisors are relative. For example, it could be a percentage or a distance from the first point of the polygon. As long as it doesn't matter. But definitely not relative to the coordinate plane.
Dividers during division divide the polygon into subpolygons - Openings. Opening coordinates must be calculated based on divisors.
I know how to store this structure as a tree. For example, a divider divides an opening into two openings, each opening can be divided by another divider into openings, and so on, as a result, an opening or divider refers to a parent opening, each opening can have two child openings and one divider. But in such a structure, the problem of deleting dividers is that you can delete a divider if there are no child openings. If so, then the operation is undefined.
I want a different structure. Where everything is on the same level.
Question - how to organize such a structure in the computer's memory?
Answer the question
In order to leave comments, you need to log in
You need to divide the polygon by divisors. The coordinates of the divisors are relative. For example, it could be a percentage or a distance from the first point of the polygon. As long as it doesn't matter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question