[Scilab-users] Regression: Fac3d direct surfaces along cartesian axis, no matter user definition
Pierre Payen
payen.pierre at gmail.com
Fri Sep 8 11:11:21 CEST 2017
Answering this stackoverflow question
<https://stackoverflow.com/questions/46050997/how-do-i-determine-orientation-of-vertices-in-scilab-3dplot>
, when using plot3d to plot a custom surface, if this surface is directed
along x (respectively y or z) meaning that any vector collinear to x
(respect to y or z) is normal to the surface, then the outside color will
always be in the direction of the axis.
Bugzilla beeing down, i could not see if this bugs was already know.
below a small testscript to replicate the problem.
/////////////////////////////////////////////////////////////////////////////////////////////////////////
clc
clear
xdel(winsid())
figure(1)
set(gcf(),'background',-2)
cr=color('red') // color of the outside surface
P1 = [0,0,0] //
P2 = [0,1,0]
P3 = [1,0,0]
F1 = [P1;P2;P3] // defining surface clockwise
F2 = [P1;P3;P2] // counterclockwise
subplot(2,2,1)
plot3d(F1(:,1),F1(:,2),list(F1(:,3),cr*ones(F1(:,3))))
xstring(F1(:,1),F1(:,2),['P1','P2','P3'])
title('surface is [P1,P2,P3] with z_P3=0')
set(gca(),'data_bounds',[0,1,0,1,-1,1])
subplot(2,2,2)
plot3d(F2(:,1),F2(:,2),list(F2(:,3),cr*ones(F2(:,3))))
xstring(F2(:,1),F2(:,2),['P1','P3','P2'])
title('surface is [P1,P3,P2] with z_P3=0, broken with Scilab 6.0.0')
set(gca(),'data_bounds',[0,1,0,1,-1,1])
subplot(2,2,3)
plot3d(F2(:,1),F2(:,2),list(F2(:,3)+[0;0;10^-7],cr*ones(F2(:,3))))
xstring(F2(:,1),F2(:,2),['P1','P3','P2'])
title('surface is [P1,P3,P2] with |z_P3| < 10^-8')
set(gca(),'data_bounds',[0,1,0,1,-1,1])
subplot(2,2,4)
plot3d(F2(:,1),F2(:,2),list(F2(:,3)+[0;0;10^-8],cr*ones(F2(:,3))))
xstring(F2(:,1),F2(:,2),['P1','P3','P2'])
title('surface is [P1,P3,P2] with |z_P3| = 10^-8, broken in 6.0.0')
set(gca(),'data_bounds',[0,1,0,1,-1,1])
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
and the outputs
Scilab 5.5.1
<http://mailinglists.scilab.org/file/t497474/7Dgik.png>
Scilab 6.0.0
<http://mailinglists.scilab.org/file/t497474/aIZXv.png>
--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
More information about the users
mailing list