GithubHelp home page GithubHelp logo

geometricalpredicates.jl's People

Contributors

bjarthur avatar blegat avatar catawbasam avatar dkarrasch avatar femtocleaner[bot] avatar joshchristie avatar juliatagbot avatar juliohm avatar nlaws avatar rdeits avatar robertdj avatar sjkelly avatar skariel avatar swt30 avatar tkelman avatar wookay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geometricalpredicates.jl's Issues

Limitation 1.0<=x<=2.0

I understand the reasoning for the 1.0<=x<=2.0 limitation given the BigInt-fallback for exact calculation. There are potential alternatives, e.g. expansion arithmetic (https://www.cs.cmu.edu/afs/cs/project/quake/public/code/predicates.c) with Float64, which would at least work for numbers in a reasonable range (roughly n-th root of the largest representable number, where n is the degree of the polynomial in the predicate), or expansion arithmetic with BigFloat which should work for arbitrary inputs.

This would come at the slight performance cost of losing the static filters with only the absolute error bound. I'd expect that to be around ~2-5% based on tests in C++. I'd be willing to prepare a PR but since this is non-negligible work, I wanted to ask first whether this compromise, loss of purely static filtering to overcome the limitation of a fixed coordinate range, is compatible with the goals of this library.

incricle for zero oriented primitives

a = Point(1.1, 1.1)
b = Point(1.2, 1.2)
c = Point(1.3, 1.3)
mytriangle = Primitive(a, b, c)
incircle(mytriangle, Point(1.25, 1.25))

gives 2, should give 0

Problems on Travis

I'm experiencing a weird problem with the testing on Travis.

GeometricalPredicates imports ! from Base. It used to be with import Base.! that does not work in Julia v0.5, but recently it was changed to import Base: ! that works in both Julia v0.4 and v0.5.

On my local, newly compiled Julia v0.5 with a freshly added GeometricalPredicates everything works as expected, but when testing the VoronoiCells package on Travis it fails for Julia v0.5 because

ERROR: LoadError: syntax: invalid operator ".!" (Line 366)

I updated the REQUIRE for VoronoiCells to explicitly include GeometricalPredicates v0.0.5, but this did not help. The only directly required package is VoronoiDelaunay.

Have I overlooked something?

Check many points in one given triangle

Dear all, I just want to ask a simple question that if I want to check many points in one given triangle, what is the best way to implement it? It seems that there is no method matching Point(::Array{Float64,1}, ::Array{Float64,1}). The only way now I can try is giving a naive "for" loop.

Possible bug in intriangle.

Let's define a triangle with two vertices on the x-axis:

a = Point(0.0, 0.0)
b = Point(0.0175751,0.0)
c = Point(0.0110023,0.0115932)

tri = Primitive(a, b, c)

Clearly any point on the x axis between the x-coordinate of a and b should be on the triangle and intriangle should return a positive number.

However, only points with an x-axis of less than b.x / 2.0 return a positive number:

# Slightly to the left of b.x / 2.0
julia> intriangle(tre, Point(getx(b) / 2.0 - 1e-7, 0.0))
4

# Slightly to the right of b.x / 2.0
julia> intriangle(tre, Point(getx(b) / 2.0 + 1e-7, 0.0))
-1

Here are for example two points that show different value for intriangle and the triangle:

figure_2

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

What does -3 returned from function intriangle means

Documentation only explains what -1, -2, and -4 mean.
Example code:

julia> trb = Primitive(Point2D(1.6068, 1.0115), Point2D(1.157, 1.8638), Point2D(1.5, 1.0))
GeometricalPredicates.UnOrientedTriangle{Point2D}(Point2D(1.6068, 1.0115), Point2D(1.157, 1.8638), Point2D(1.5, 1.0), -0.4498, 0.8522999999999998, -0.1068, -0.011500000000000066, -0.020514711322000057, 0.09399892044199996, -0.09619834000000002, 1)

julia> pp = Point2D(1.6, 1.0392)
Point2D(1.6, 1.0392)

julia> intriangle(trb, pp)
-3

@skariel I know it's been a long time since you've updated this section of README.md in commit b8a7abfca01b723d0cfb39e8c743dd2368f0afb3, but maybe you can help me?

Cast ints as floats?

I forgot to use floats instead of ints and stumbled upon the following:

a = Point(0, 0)
b = Point(1, 1)
l = Line(a, b)

orientation(l, Point(0, 0))
# 0

orientation(l, Point(0, 0.))
# 1

orientation(l, Point(2, 2))
# -1

Should it give a warning/error when given ints?

Update of code is needed

Simply running

using GeometricalPredicates

gives

WARNING: deprecated syntax "abstract AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:63.
Use "abstract type AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractPoint2D<:AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:64.
Use "abstract type AbstractPoint2D<:AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractPoint3D<:AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:65.
Use "abstract type AbstractPoint3D<:AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractLine2D" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:67.
Use "abstract type AbstractLine2D end" instead.

WARNING: deprecated syntax "abstract AbstractPolygon2D" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:68.
Use "abstract type AbstractPolygon2D end" instead.

WARNING: deprecated syntax "abstract AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:70.
Use "abstract type AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractUnOrientedPrimitive<:AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:71.
Use "abstract type AbstractUnOrientedPrimitive<:AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractOrientedPrimitive<:AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:72.
Use "abstract type AbstractOrientedPrimitive<:AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedPrimitive<:AbstractOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:73.
Use "abstract type AbstractPositivelyOrientedPrimitive<:AbstractOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedPrimitive<:AbstractOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:74.
Use "abstract type AbstractNegativelyOrientedPrimitive<:AbstractOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractTriangleUnOriented<:AbstractUnOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:76.
Use "abstract type AbstractTriangleUnOriented<:AbstractUnOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractTetrahedronUnOriented<:AbstractUnOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:77.
Use "abstract type AbstractTetrahedronUnOriented<:AbstractUnOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedTriangle<:AbstractPositivelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:78.
Use "abstract type AbstractPositivelyOrientedTriangle<:AbstractPositivelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedTriangle<:AbstractNegativelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:79.
Use "abstract type AbstractNegativelyOrientedTriangle<:AbstractNegativelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedTetrahedron<:AbstractPositivelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:80.
Use "abstract type AbstractPositivelyOrientedTetrahedron<:AbstractPositivelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedTetrahedron<:AbstractNegativelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:81.
Use "abstract type AbstractNegativelyOrientedTetrahedron<:AbstractNegativelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "typealias TriangleTypes Union{AbstractTriangleUnOriented,AbstractPositivelyOrientedTriangle,AbstractNegativelyOrientedTriangle}" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:83.
Use "const TriangleTypes = Union{AbstractTriangleUnOriented,AbstractPositivelyOrientedTriangle,AbstractNegativelyOrientedTriangle}" instead.

WARNING: deprecated syntax "typealias TetrahedronTypes Union{AbstractTetrahedronUnOriented,AbstractPositivelyOrientedTetrahedron,AbstractNegativelyOrientedTetrahedron}" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:84.
Use "const TetrahedronTypes = Union{AbstractTetrahedronUnOriented,AbstractPositivelyOrientedTetrahedron,AbstractNegativelyOrientedTetrahedron}" instead.

WARNING: deprecated syntax "abstract AbstractOrientation" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:224.
Use "abstract type AbstractOrientation end" instead.

WARNING: deprecated syntax "abstract AbstractCoordinate" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:1053.
Use "abstract type AbstractCoordinate end" instead.

WARNING: deprecated syntax "abstract AbstractDirection" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:1069.
Use "abstract type AbstractDirection end" instead.
INFO: Precompiling module GeometricalPredicates.

WARNING: deprecated syntax "abstract AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:63.
Use "abstract type AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractPoint2D<:AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:64.
Use "abstract type AbstractPoint2D<:AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractPoint3D<:AbstractPoint" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:65.
Use "abstract type AbstractPoint3D<:AbstractPoint end" instead.

WARNING: deprecated syntax "abstract AbstractLine2D" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:67.
Use "abstract type AbstractLine2D end" instead.

WARNING: deprecated syntax "abstract AbstractPolygon2D" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:68.
Use "abstract type AbstractPolygon2D end" instead.

WARNING: deprecated syntax "abstract AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:70.
Use "abstract type AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractUnOrientedPrimitive<:AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:71.
Use "abstract type AbstractUnOrientedPrimitive<:AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractOrientedPrimitive<:AbstractPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:72.
Use "abstract type AbstractOrientedPrimitive<:AbstractPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedPrimitive<:AbstractOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:73.
Use "abstract type AbstractPositivelyOrientedPrimitive<:AbstractOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedPrimitive<:AbstractOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:74.
Use "abstract type AbstractNegativelyOrientedPrimitive<:AbstractOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractTriangleUnOriented<:AbstractUnOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:76.
Use "abstract type AbstractTriangleUnOriented<:AbstractUnOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractTetrahedronUnOriented<:AbstractUnOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:77.
Use "abstract type AbstractTetrahedronUnOriented<:AbstractUnOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedTriangle<:AbstractPositivelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:78.
Use "abstract type AbstractPositivelyOrientedTriangle<:AbstractPositivelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedTriangle<:AbstractNegativelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:79.
Use "abstract type AbstractNegativelyOrientedTriangle<:AbstractNegativelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractPositivelyOrientedTetrahedron<:AbstractPositivelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:80.
Use "abstract type AbstractPositivelyOrientedTetrahedron<:AbstractPositivelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "abstract AbstractNegativelyOrientedTetrahedron<:AbstractNegativelyOrientedPrimitive" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:81.
Use "abstract type AbstractNegativelyOrientedTetrahedron<:AbstractNegativelyOrientedPrimitive end" instead.

WARNING: deprecated syntax "typealias TriangleTypes Union{AbstractTriangleUnOriented,AbstractPositivelyOrientedTriangle,AbstractNegativelyOrientedTriangle}" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:83.
Use "const TriangleTypes = Union{AbstractTriangleUnOriented,AbstractPositivelyOrientedTriangle,AbstractNegativelyOrientedTriangle}" instead.

WARNING: deprecated syntax "typealias TetrahedronTypes Union{AbstractTetrahedronUnOriented,AbstractPositivelyOrientedTetrahedron,AbstractNegativelyOrientedTetrahedron}" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:84.
Use "const TetrahedronTypes = Union{AbstractTetrahedronUnOriented,AbstractPositivelyOrientedTetrahedron,AbstractNegativelyOrientedTetrahedron}" instead.

WARNING: deprecated syntax "abstract AbstractOrientation" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:224.
Use "abstract type AbstractOrientation end" instead.

WARNING: deprecated syntax "abstract AbstractCoordinate" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:1053.
Use "abstract type AbstractCoordinate end" instead.

WARNING: deprecated syntax "abstract AbstractDirection" at /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:1069.
Use "abstract type AbstractDirection end" instead.

WARNING: deprecated syntax "inner constructor Line2D(...) around /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:118".
Use "Line2D{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor Polygon2D(...) around /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl:171".
Use "Polygon2D{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor UnOrientedTriangle(...) around none:9".
Use "UnOrientedTriangle{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor PositivelyOrientedTriangle(...) around none:9".
Use "PositivelyOrientedTriangle{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor NegativelyOrientedTriangle(...) around none:9".
Use "NegativelyOrientedTriangle{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor UnOrientedTetrahedron(...) around none:10".
Use "UnOrientedTetrahedron{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor PositivelyOrientedTetrahedron(...) around none:10".
Use "PositivelyOrientedTetrahedron{T}(...) where T" instead.

WARNING: deprecated syntax "inner constructor NegativelyOrientedTetrahedron(...) around none:10".
Use "NegativelyOrientedTetrahedron{T}(...) where T" instead.
WARNING: Array{T, N}(::Type{T}, d::NTuple{N, Int}) is deprecated, use Array{T}(d) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] Array(::Type{Int64}, ::Tuple{Int64,Int64}) at ./deprecated.jl:57
 [3] include_from_node1(::String) at ./loading.jl:569
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
 [6] eval(::Module, ::Any) at ./boot.jl:235
 [7] process_options(::Base.JLOptions) at ./client.jl:286
 [8] _start() at ./client.jl:371
while loading /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl, in expression starting on line 984
WARNING: Array{T, N}(::Type{T}, d::NTuple{N, Int}) is deprecated, use Array{T}(d) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] Array(::Type{Int64}, ::Tuple{Int64,Int64}) at ./deprecated.jl:57
 [3] include_from_node1(::String) at ./loading.jl:569
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
 [6] eval(::Module, ::Any) at ./boot.jl:235
 [7] process_options(::Base.JLOptions) at ./client.jl:286
 [8] _start() at ./client.jl:371
while loading /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl, in expression starting on line 985
WARNING: Array{T, N}(::Type{T}, d::NTuple{N, Int}) is deprecated, use Array{T}(d) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] Array(::Type{Int64}, ::Tuple{Int64,Int64}) at ./deprecated.jl:57
 [3] include_from_node1(::String) at ./loading.jl:569
 [4] include(::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
 [6] eval(::Module, ::Any) at ./boot.jl:235
 [7] process_options(::Base.JLOptions) at ./client.jl:286
 [8] _start() at ./client.jl:371
while loading /Users/Azamat/.julia/v0.6/GeometricalPredicates/src/GeometricalPredicates.jl, in expression starting on line 986

Support x86?

Hello! One of the CI runs for a project I'm working on uses Julia built for x86, where the default integer type is Int32. It failed to precompile GeometricalPredicates with the following error:

ERROR: LoadError: MethodError: no method matching quadrants(::Int32, ::Int32, ::Int32, ::Int32)
Stacktrace:
 [1] _init_inv_peano_3d()
   @ GeometricalPredicates ~/.julia/packages/GeometricalPredicates/1dBKW/src/GeometricalPredicates.jl:998

Why this happens is pretty clear in the source:

function _init_inv_peano_3d()
for rotation in 0:23
for bitx in 0:1
for bity in 0:1
for bitz in 0:1
quad = quadrants(rotation, bitx, bity, bitz)
quadrants_inverse_x[rotation+1, quad+1] = bitx;
quadrants_inverse_y[rotation+1, quad+1] = bity;
quadrants_inverse_z[rotation+1, quad+1] = bitz;
end
end
end
end
end

and could be fixed by just adding type annotations for rotation::Int64, bitx::Int64, etc..

I don't know if x86 is something you want to support? But if not, could you maybe add a line about that in the readme, or get the precompile to fail with a more meaningful message?

I'm also happy to contribute a PR if that would be helpful.

Thanks!

Bug in `intriangle`

The following code incorrectly returns 2, which according to the documentation means that the point is in the triangle:

using GeometricalPredicates

a = Point(1.1, 1.1)
b = Point(1.1,1.3)
c = Point2D(1.1, 1.4)

mytriangle = Primitive(a, b, c)
intriangle(mytriangle, Point(1.5, 1.8))

Lines

@skariel thank you for publishing this package. I am really excited about contributing some additional algorithms and features. I would like to work on adding support for Line primitives. Do you think adding orientation (http://www.cs.cmu.edu/~quake/robust.html) and line intersections would be good to have in this package? I am currently dealing with a lot of geometry code that has floating point error and this package might help.

New tag?

It seems that GeometricalPredicates.jl requires a new tag to work under Julia v1.0.

inpolygon algorithm may incorrect?

polygon and point

points = Array{Point2D, 1}(undef, 4)
points[1] = Point(0.0,0.0)
points[2] = Point(6.0,0.0)
points[3] = Point(2.0,2.0)
points[4] = Point(0.0,6.0)

poly = Polygon(points...)
inpolygon(poly, Point(1.0, 3.0))

 # return false

Tag a new version

Could your please tag a new version? It seems that the deprecation warnings I am having have all been addressed in master

Reconsider Point behavior

The following behavior seems super odd:

using GeometricalPredicates

p = Point(1,1)
gety(p)
# 1.5

I always disliked this min_coord=1, max_coord=2 constraint, it is very unpleasant both mathematically speaking and programming-wise, but I believe there is a very good numerical reason for it.

This issue, however, is about the odd behavior of the point type regardless of numerics, can you please reconsider the design?

Given e.g. a tetrahedron and a point, how do I know the vertices of the face which the point is outside?

Consider the following example:

tetra = Primitive(Point(1.1,1.1,1.1), Point(1.9,1.1,1.1), Point(1.5,1.9,1.1), Point(1.5,1.34,1.9))
point = Point(1.7,1.6,1.5)
intriangle(tetra, point) # -1

Given that I know intriangle(tetra,point) == -1, can I know which of the four corners of the tetrahedron are vertices of the face outside which the point is? In other words, can I, given just the output of intriangle(tetra, point), know which ones of geta, getb, getc and getd I should look at to find a plane which point is above, given outward-directed plane normals for all faces?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.