[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65362] patch may not produce a polygon
From: |
Liang Tang |
Subject: |
[Octave-bug-tracker] [bug #65362] patch may not produce a polygon |
Date: |
Sat, 24 Feb 2024 17:42:19 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65362>
Summary: patch may not produce a polygon
Group: GNU Octave
Submitter: lt1234
Submitted: Sat 24 Feb 2024 10:42:19 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: lt1234
Originator Email:
Open/Closed: Open
Release: 8.2.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 24 Feb 2024 10:42:19 PM UTC By: Liang Tang <lt1234>
Hi,
patch may not display a polygon. Pls see the attached figure files. Thanks,
The small example demonstrates a compatibility issue, or an error.
% CCW order, P0 is estimated from plane_1=@(x) [1 2 3 ]*x-06;
P0=[6 4 -4
0 -2 -4
0 -6 6
6 -6 3];
The P0 patch display, two triangles with one point intersection, is not a
polygon and is incompatible with matlab, i.e., two triangles with line 1-3
intersection. It does not matter if the intersection is line 1-3 or line
2-4, the output is a polygon.
figure; hold on;
for ii=1:size(P0,1), text(P0(ii,1), P0(ii,2), P0(ii,3), num2str(ii),
'fontsize', 20); end ;
patch(P0(:,1), P0(:,2), P0(:,3), 'r', 'facealpha', 0.1); xlabel('x');
ylabel('y');
saveas(gcf, 'patch_P0.ofig');
%view([235 30])
A minor modification to P0(1,2) (y=3, instead y=4) change the display
completely.
figure;
subplot(1,2,1); hold on;
for ii=1:size(P0,1), text(P0(ii,1), P0(ii,2), P0(ii,3), num2str(ii),
'fontsize', 20); end
patch(P0(:,1), P0(:,2), P0(:,3), 'r', 'facealpha', 0.1); hold on; xlabel('x');
ylabel('y');
subplot(1,2,2); hold on;
P0(1,2)=3;
for ii=1:size(P0,1), text(P0(ii,1), P0(ii,2), P0(ii,3), num2str(ii),
'fontsize', 20); end
patch(P0(:,1), P0(:,2), P0(:,3), 'r', 'facealpha', 0.1); hold on; xlabel('x');
ylabel('y'); title('Modified P0(1,2)')
saveas(gcf, 'patch_P0_update.ofig');
_______________________________________________________
File Attachments:
-------------------------------------------------------
Name: patch_p0.zip Size: 14KiB
<http://savannah.gnu.org/bugs/download.php?file_id=55743>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-fd9b348a8fcb146b565f753e2f7db1ab857a7bf6.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65362>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #65362] patch may not produce a polygon,
Liang Tang <=