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

Ignacio Vera commented on LUCENE-8136:
--------------------------------------

I have been looking into the issue and it is clear that the problen comes after 
normalizing the created Vector through the cross product. If the dot product is 
checked between the generated Vector and the given points, the method will fail 
if that value is higher the MINIMUM_RESOLUTION.

 

I have developed and algorithm based on the *Gram–Schmidt process*( 
[https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process)] which seems to 
work and provide the resolution 1e-12. It just iteratively adjust the normal 
vector in respect of the given points.

I attach a patch (It needs a bit more of work but there is enough to review the 
algorithm).

 

 

> 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, 
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to