-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meshes and borders overlapping due to clustering of Control Points #1
Comments
Solution 1 seems wasteful and solution 2 might generate meshes which are too simple, so I went with solution 3. I created a small workaround: This doesn't completely solve the problem: I'm using pairwise points comparison and pushing the points away from the midpoint, but it doesn't solve everything. A better solution might be to perform clustering, and displace the points belonging to the group away from the group's center, but I'm still unsure if this is sufficient, I'll update this issue later once I've made the changes. Please let me know if you fixed this issue on your side. The tracks generated are incredibly versatile, it's a really great idea |
After some work, I realized there was a "Try to fix" button (not sure how I missed that one), but I wasn't too satisfied by the results. So I continued my work and the best solution really seems to be using iterative cluster creation based on a threshold distance, and then again iteratively displacing the points away from the cluster center. See the result below on a complex track: the initial track generated has a lot of overlap, while the fixed version shows no such thing and is smooth. I can also confirm that sharp turns can be preserved by this approach. I need to do some refactoring, then I'll upload my code on another repo for everybody. Lemme know if you found a better solution |
@Wally869 Sorry to only just getting around to this. The overlapping issue has always been there unfortunately. From the screen shots you have posted, your solution looks very nice and I would be one I'm interested to see how it has been implemented. |
Thanks for sharing your work, it's really great stuff! I found a small problem for which I'm working on a solution, I wanted to share it with other users of your code
Problem Encountered
Mesh can overlap itself.
This is likely due to control points being created on edges intersections and forming a cluster.
Potential Fixes
I see 3 solutions to this:
1- Perform a check on the Voronoi diagram to avoid diagrams where too many intersections are clustered
2- Prune control points which are too close to one another when generating the spline
3- Perform displacement on control points which are too close to each other, and recompute spline
The text was updated successfully, but these errors were encountered: