-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Area of 2D triangle can be negative #121
Comments
Good point!
Probably not :D |
Looks like the negative area was intentional: GeometryBasics.jl/src/triangulation.jl Line 127 in 24d0ee5
Should we leave it like this (and document it)? |
Oh, good catch :D Yeah, I guess the area function is mostly used inside GeometryBasics to figure out the winding order. |
I made the PR for the doc change, but it is a bit inconsistent to return a signed area for 2D an a positive area for 3D... Instead, we could have |
For example:
The relevant
area
method is here:GeometryBasics.jl/src/triangulation.jl
Line 36 in 24d0ee5
I think there are two issues with this method:
cross
exists and returns a scalar.abs
call on the result.Regarding the first point: there's already a specific method for N=3, and we can make one for N=2. Do we need a generic method for N>3?
The text was updated successfully, but these errors were encountered: