Answer the question
In order to leave comments, you need to log in
What are the algorithms for performing Boolean operations on surfaces?
I have arrays, which are a set of points with coordinates that form areas.
I need to perform boolean operations on them.
Advise what I need to study for this.
What algorithms are used for this?
What mathematical tools are used?
Answer the question
In order to leave comments, you need to log in
Have a look at CSG (Constructive Solid Geometry) algorithms. Of course, they concern voluminous bodies, but in general, if you understand the techniques, you can, I think, be easily transferred to the surface. And if your areas lie on a two-dimensional surface (I did not understand this from your question), then CSG is easily simplified to 2D in one second.
At one time, the three_csg.js library helped me deal with CSG algorithms. I've been working with three.js and this library essentially extends it to include boolean operations. It is quite small, it is easy to understand its work in its entirety.
Surely there are a bunch of CSG implementations in other languages, I just wrote about what I myself dealt with.
If you have purely 2D, then you can easily write such a library yourself in half a day. Even interesting. Here, special knowledge is not needed, except for the ability to solve a system of equations:
y \u003d k1 * x + b1
y \u003d k2 * x + b2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question