Comments (4)
Anyway, for other people reading this, I found the answer:
- All triangles are counter-clockwise.
locatePointTriangle()
is processed in order: v1, v2, v3.- "Right" to the line (negative result) is considered outside of the triangle.
(p.X - v1.X) * (v1.Y - v2.Y) + (p.Y - v1.Y) * (v2.X - v1.X)
returned the same asorient2D()
Therefore the system is X right, Y up. Visualisation:
On DirectX and similar APIs, Y is down, therefore the triangles will be clockwise. Closing this for now.
from cdt.
The predicates are robust adaptive predicates that use extended precision computations when necessary to guarantee a correct result for every possible floating-point input.
More details can be found in the paper: https://link.springer.com/content/pdf/10.1007/PL00009321.pdf
from cdt.
Ah I see. I'm porting the library to C# and was trying to find out how many methods can be stripped off. I keep getting point-out-of-triangle errors around the triangle walk stage and thought this was the issue. I'd like to post the results in here once I'm done fixing the bugs (a lot of typo-hunting is involved).
from cdt.
Thanks, @MWstudios. This is correct. I have slightly updated the README to clarify coordinate system the winding applies to.
from cdt.
Related Issues (20)
- insertEdge can get stuck in an infinite loop HOT 2
- How to compile and use under windows ? Thank you HOT 2
- triangulate a very small domain HOT 1
- Retain order of edges. HOT 5
- conformToEdges Infinite loop HOT 5
- Would you please illustrate the algorithm of eraseOuterTriangles() and eraseOuterTrianglesAndHoles() HOT 2
- Triangulation and holes are inverted for certain meshes HOT 3
- Make it possible to add non-boundary constraints that don't affect hole detection
- Is it true that all triangles have same direction? HOT 2
- Some triangles have circumcenters of other triangles HOT 1
- how can I control vertex count? HOT 3
- Callback for `addNewVertex`? HOT 2
- Could not find vertex triangle intersected by edge HOT 4
- Bug in resolving constraint edges intersection when there is a hanging edge
- Assert during triangulation HOT 8
- Missing inline HOT 4
- [1.3.3] Issue with edge insertion (CDT::IntersectingConstraintEdges::Resolve) HOT 6
- Port to C# [link in description]
- Some inputs that trigger failure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdt.