[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50361] Incorrect result in geometry package i
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #50361] Incorrect result in geometry package intersectLinePlane function |
Date: |
Mon, 20 Feb 2017 10:16:10 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 |
URL:
<http://savannah.gnu.org/bugs/?50361>
Summary: Incorrect result in geometry package
intersectLinePlane function
Project: GNU Octave
Submitted by: None
Submitted on: Mon 20 Feb 2017 03:16:09 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Mike Bloom
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.0
Operating System: Microsoft Windows
_______________________________________________________
Details:
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:
line = [1611.1586, 384.0586, 175.7812, -18.5273, -12.4366, 2.9297; ...
1708.1188, 453.5282, 136.7188, -14.9586, -11.1981, 2.4414; ...
1782.0696, 511.4073, 241.6992, -2.9366, -2.3760, -46.3867];
plane = [1.6233e+003, 3.9252e+002, 1.0000e+002, 0.0000e+000, -3.8123e-005,
-1.0000e+000, -5.6653e-001, 8.2404e-001, -3.1415e-005; ...
1.7045e+003, 4.5089e+002, 9.9996e+001, 0.0000e+000, -1.5495e-005,
-1.0000e+000, -5.9962e-001, 8.0028e-001, -1.2401e-005; ...
1.7833e+003, 5.1241e+002, 9.9998e+001, 0.0000e+000, 3.9994e-005,
-1.0000e+000, -6.1524e-001, 7.8834e-001, 3.1528e-005];
incorrectResult = intersectLinePlane(line, plane);
for i=1:3
correctResult(i,:) = intersectLinePlane(line(i, :), plane(i, :));
end
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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 20 Feb 2017 03:16:09 PM UTC Name: bugReproduce.m Size: 759B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=39800>
-------------------------------------------------------
Date: Mon 20 Feb 2017 03:16:09 PM UTC Name: intersectLinePlane.m Size: 4kB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=39801>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50361>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50361] Incorrect result in geometry package intersectLinePlane function,
anonymous <=