bugGNU Octave - Bugs: bug #50361, [octave forge] (geometry)...

 
 

bug #50361: [octave forge] (geometry) Incorrect result in intersectLinePlane function

Submitted by:  None
Submitted on:  Mon 20 Feb 2017 03:16:09 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Mike BloomOriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 13 Aug 2017 09:51:24 PM UTC, comment #5:

@devs: Please close this bug.

Juan Pablo Carbajal <juanpi>
Project Member
Tue 21 Mar 2017 06:20:06 PM UTC, comment #4:

Hi,

It wasn't a problem with argument checking but actually a bug on the origina code.

When function cross is used, the dimension is not specified (should be 2) and then when the input is 3x3 the 1st dimension was used instead of the 2nd.

I grep for 'cross[[:space:]]\([[:alum:]]+,[[:space:]][[:alum:]]+\)' and found some functions that still call cross without specifying dimension, which are potential bugs. However these functions are not yet added to geometry.

@devs: Please close this bug.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 06 Mar 2017 08:00:02 PM UTC, comment #3:

Hi,

Yes, geometry is not doing a lot of checking regarding the inputs. It assumes that data is always in columns. I will fix this.

Thanks for the reports.

Juan Pablo Carbajal <juanpi>
Project Member
Mon 06 Mar 2017 03:09:50 PM UTC, comment #2:

Original poster here. I believe I also found an identical issue with the function normalizePlane on line 51. Again the dimension 2 is not specified in the cross function. So when you pass 3 inputs are row vectors the cross product is calculated on dim 1 instead of 2. There are other instances where dimension of 2 is specified so I think it has been omitted in this function and the original posted one.

Mike Bloom <mbloom>
Mon 20 Feb 2017 03:37:51 PM UTC, comment #1:

cc'ing package maintainer.

Setting release -> other, OS -> any

Philip Nienhuis <philipnienhuis>
Project Member
Mon 20 Feb 2017 03:16:09 PM UTC, original submission:

Hi all,

I noticed an error with the result of the intersectLinePlane function in the geometry package when the inputs are 3 lines and 3 planes. This code reproduces the issue:

Looking at the function code, the problem seems to lie with line 82. The function should always be done along dim 2, but when a 3x3 matrix is provided it incorrectly is done on dim 1. Adding dim argument of 2 corrects the issue.

I attached the code to reproduce and the corrected function. Thanks

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39800:  bugReproduce.m added by None (759B - application/octet-stream)
file #39801:  intersectLinePlane.m added by None (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by juanpi (Posted a comment)
  • -unavailable- added by mbloom (Posted a comment)
  • -unavailable- added by philipnienhuis
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Aug 2017 03:33:56 AM UTCjuanpiStatusNone=>Fixed
    Mon 14 Aug 2017 01:07:33 PM UTCjweOpen/ClosedOpen=>Closed
    Sat 12 Aug 2017 07:17:42 PM UTCjweSummaryIncorrect result in geometry package intersectLinePlane function=>[octave forge] (geometry) Incorrect result in intersectLinePlane function
    Mon 20 Feb 2017 03:37:51 PM UTCphilipnienhuisRelease4.2.0=>other
      Operating SystemMicrosoft Windows=>Any
      Carbon-Copy-=>Added -unavailable-
    Mon 20 Feb 2017 03:16:09 PM UTCNoneAttached File-=>Added bugReproduce.m, #39800
      Attached File-=>Added intersectLinePlane.m, #39801

    Back to the top


    Powered by Savane 3.1-cleanup1