Search found 287 matches
- Tue Nov 01, 2022 4:15 pm
- Forum: Support and Development
- Topic: [SOLVED] Complete a list of vertices to form a polygonal shape with pathfinding
- Replies: 7
- Views: 3661
[SOLVED] Complete a list of vertices to form a polygonal shape with pathfinding
Hi there, I would need some clarification on a question, I have a shape I have triangulated then got each center of these triangles, now I would need to define a path between two of these points in order to complete a list of vertices outside the polygon and unite with the new shape but I'm lost, I ...
- Mon Oct 31, 2022 6:17 pm
- Forum: Support and Development
- Topic: [SOLVED] Get adjacent triangles from another from a return of love.math.triangulate
- Replies: 0
- Views: 9268
[SOLVED] Get adjacent triangles from another from a return of love.math.triangulate
Hello everyone! Here is the problem, I have a polygon that I triangulate with the 'love.math.triangulate' function and I am trying to get the adjacent triangles from one of them, so I wrote a function here : local function getAdjacentTris(index, tris) local adj = {} local tri2 = tris[index] for k, t...
- Mon Oct 24, 2022 8:05 pm
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
I finally found the solution! Already I realized at the end that my meshes could not be displayed in a "concave way", so I solved the problem temporarily by displaying polygon triangulations. Then I also noticed that polybool(pl1, pl2, "or") (coming from the library proposed by ...
- Mon Oct 24, 2022 11:30 am
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
Thank you very much for your help, to be able to properly merge the two polygons I found a function that could have done it properly in the Lua HC module (HC.polygon - https://github.com/vrld/HC/blob/master/polygon.lua) I therefore recovered the two functions mergedWith() and getSharedEdge() which I...
- Sun Oct 23, 2022 8:48 am
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
What makes that one more correct than for example this one? I agree that nothing makes it more correct than another objectively but this can be regulated by the alpha value given for example for the alphashape module in Python. There are many possible concave hulls. The convex hull (which is unique...
- Sat Oct 22, 2022 8:22 pm
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
How do you define the concave hull? This image shows very well what I would like: https://love2d.org/imgmirrur/hwxSW.jpg My problem, in details, is that first I have a list of vertices that represents an area (a polygon) and to enlarge this area I have another list of vertices that I merge with the...
- Sat Oct 22, 2022 4:34 pm
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
Small update I tried to take inspiration from this gist on GitHub: https://gist.github.com/dwyerk/10561690 And using this Lua adaptation of the Delaunay triangulation to replace the Python module scipy.spatial.Delaunay : https://github.com/Yonaba/delaunay I also reused the script from my first post...
- Sat Oct 22, 2022 12:56 pm
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
Re: Concave hull algorithm in lua
Yes this is where the piece of code that I presented originally comes from but it only serves to render only a convex shape and not concave as I explained.
- Sat Oct 22, 2022 11:23 am
- Forum: Support and Development
- Topic: [SOLVED] Concave hull algorithm in lua
- Replies: 13
- Views: 4755
[SOLVED] Concave hull algorithm in lua
Hello everyone ! I am looking for (if it already exists) an algorithm to obtain the concave envelope of a polygon, I explain myself: I have two lists of vertices that I "merge" to give a single polygon, the problem is that a number of the vertices are inside this polygon which causes probl...
- Thu Oct 20, 2022 3:42 pm
- Forum: Support and Development
- Topic: [SOLVED] Point in polygon collision
- Replies: 3
- Views: 1647
Re: Point in polygon collision
Thank you very much for your help it will surely help me in the future but I have just solved my problem, after modifying the little algorithm several times I finally understood and it's quite stupid, when I generate my mesh I don't pass no real coordinates given that I put them in 'love.graphics.dr...