You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ignacio Vera (JIRA)" <ji...@apache.org> on 2018/01/24 12:10:00 UTC

[jira] [Comment Edited] (LUCENE-8136) Planes constructed with two points are wrong when points are close

    [ https://issues.apache.org/jira/browse/LUCENE-8136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337443#comment-16337443 ] 

Ignacio Vera edited comment on LUCENE-8136 at 1/24/18 12:09 PM:
----------------------------------------------------------------

You are right, they are not wrong, but down the line the lack of precision produces an error when constructing polygons that gives wrong information. 

 I think it is a numerical problem using doubles, the logic is fine. I tried the same calculations with BigDecimals and it works using them.

I guess there are two options:

a) disallow such planes which is very limiting.

b) teach Vector class to handle those small values e.g. increase precision of maths.

 

 


was (Author: ivera):
You are right, they are not wrong, but down the line the produce an error when constructing polygons that gives wrong information. I guess there are two options:

It is a numerical problem using doubles I think, logic is fine. I tried the same calculations with BigDecimals and it works using them.

a) disallow such planes which is very limiting.

b) teach Vector class to handle those small values e.g. increase precision of maths.

 

 

> Planes constructed with two points are wrong when points are close
> ------------------------------------------------------------------
>
>                 Key: LUCENE-8136
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8136
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>            Priority: Major
>         Attachments: LUCENE-8136-RandomTest.patch
>
>
> Whenever a plane is constructed with two points (and the center of the planet), and those points are close to each other,it might happen that the final plane does not contain all points used for the construction. The issue seems to happen when the resulting magnitude of the normal vector of the new plane (calculated using cross product) is lower that 1e-5.
> This is a follow up of issue LUCENE-8133.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org