[Scilab-users] Punch a hole into a facet

classic Classic list List threaded Threaded
7 messages Options
Jens Jens
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Punch a hole into a facet

Hallo Scilab friends,
Is there a way to punch a peak through hole into a rectangle?

The result below  looks like a hole but it is just white intransparent color.
xdel();
xf=[1;-1;-1;1]; yf=[1;1;-1;-1]; zf=[0;0;0;0];     
plot3d(xf,yf,list(zf,5))//Facet
  ce=gce(); ce.hiddencolor = 5;
xf=0.5*[1;-1;-1;1]; yf=0.5*[1;1;-1;-1]; zf=[0;0;0;0];
plot3d(xf,yf,list(zf,8))//Hole
  ce=gce(); ce.hiddencolor = 8;

Cheers

Jens


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Jens Jens
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Punch a hole into a facet

Hallo Scilab friends,
Is there a way to punch a peak through hole into a rectangle?

The result below  looks like a hole but it is just white intransparent color.
xdel();
xf=[1;-1;-1;1]; yf=[1;1;-1;-1]; zf=[0;0;0;0];     
plot3d(xf,yf,list(zf,5))//Facet
  ce=gce(); ce.hiddencolor = 5;
xf=0.5*[1;-1;-1;1]; yf=0.5*[1;1;-1;-1]; zf=[0;0;0;0];
plot3d(xf,yf,list(zf,8))//Hole
  ce=gce(); ce.hiddencolor = 8;

Cheers

Jens

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Punch a hole into a facet

Hello Jens,

%nan are often used to do so: As soon as at least one coordinate of a vertex is equal to %nan, the vertex and all lines and facets going through it are skipped/not rendered.

HTH
Samuel


Le 30/09/2018 à 23:35, Jens Simon Strom a écrit :
Hallo Scilab friends,
Is there a way to punch a peak through hole into a rectangle?

The result below  looks like a hole but it is just white intransparent color.
xdel();
xf=[1;-1;-1;1]; yf=[1;1;-1;-1]; zf=[0;0;0;0];     
plot3d(xf,yf,list(zf,5))//Facet
  ce=gce(); ce.hiddencolor = 5;
xf=0.5*[1;-1;-1;1]; yf=0.5*[1;1;-1;-1]; zf=[0;0;0;0];
plot3d(xf,yf,list(zf,8))//Hole
  ce=gce(); ce.hiddencolor = 8;

Cheers

Jens


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Jens Jens
Reply | Threaded
Open this post in threaded view
|

Re: Punch a hole into a facet

Thanks Samuel,
%nan works with surf, not with plot3d. The latter is attractive because it can handle polygons - but unfortunately  not those with embayments:  Facet coloring exeeds the contour (Vers. 5.5.2)
I have to assemble my facet with several windos from partially overlapping rectangles

Cheers
Jens

--------------------------------------------------------------------------------------------------------------


Am 01.10.2018 08:28, schrieb Samuel Gougeon:
Hello Jens,

%nan are often used to do so: As soon as at least one coordinate of a vertex is equal to %nan, the vertex and all lines and facets going through it are skipped/not rendered.

HTH
Samuel


Le 30/09/2018 à 23:35, Jens Simon Strom a écrit :
Hallo Scilab friends,
Is there a way to punch a peak through hole into a rectangle?

The result below  looks like a hole but it is just white intransparent color.
xdel();
xf=[1;-1;-1;1]; yf=[1;1;-1;-1]; zf=[0;0;0;0];     
plot3d(xf,yf,list(zf,5))//Facet
  ce=gce(); ce.hiddencolor = 5;
xf=0.5*[1;-1;-1;1]; yf=0.5*[1;1;-1;-1]; zf=[0;0;0;0];
plot3d(xf,yf,list(zf,8))//Hole
  ce=gce(); ce.hiddencolor = 8;

Cheers

Jens


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users




_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Punch a hole into a facet

Le 01/10/2018 à 16:35, Jens Simon Strom a écrit :
Thanks Samuel,
%nan works with surf, not with plot3d. The latter is attractive because it can handle polygons - but unfortunately  not those with embayments:  Facet coloring exeeds the contour (Vers. 5.5.2)

This is fixed in Scilab 6.

I have to assemble my facet with several windos from partially overlapping rectangles

You may use this:
xf = [1  -1 -1 1  1  0.5 0.5 -0.5 -0.5  0.5]'; 
yf = [-1 -1  1 1 -1 -0.5 0.5  0.5 -0.5 -0.5]'; 
zf = zeros(yf);
red = color("red");
plot3d(xf, yf, list(zf, red))//Facet
set(gce(), "foreground", red, "hiddencolor", red);




_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Jens Jens
Reply | Threaded
Open this post in threaded view
|

Re: Punch a hole into a facet

Thanks Samuel,
I would use Vers. 6 if I could use variable names containing an exlamation mark ("!"). All my several hundreds of function names contain that character. The bug is announced to be fixed  - but is it also fixed if I download the recent Version of Scilab?
Cheers
Jens
----------------------------------------------------------------------

Am 02.10.2018 21:27, schrieb Samuel Gougeon:
Le 01/10/2018 à 16:35, Jens Simon Strom a écrit :
Thanks Samuel,
%nan works with surf, not with plot3d. The latter is attractive because it can handle polygons - but unfortunately  not those with embayments:  Facet coloring exeeds the contour (Vers. 5.5.2)

This is fixed in Scilab 6.

I have to assemble my facet with several windos from partially overlapping rectangles

You may use this:
xf = [1  -1 -1 1  1  0.5 0.5 -0.5 -0.5  0.5]'; 
yf = [-1 -1  1 1 -1 -0.5 0.5  0.5 -0.5 -0.5]'; 
zf = zeros(yf);
red = color("red");
plot3d(xf, yf, list(zf, red))//Facet
set(gce(), "foreground", red, "hiddencolor", red);





_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Punch a hole into a facet

Le 03/10/2018 à 14:07, Jens Simon Strom a écrit :
> Thanks Samuel,
> I would use Vers. 6 if I could use variable names containing an
> exlamation mark ("!"). All my several hundreds of function names
> contain that character. The bug is announced to be fixed  - but is it
> also fixed if I download the recent Version of Scilab?

It is fixed only in the master branch, for 6.1.0, not for 6.0.2:
http://www.scilab.org/en/development/nightly_builds/master

Samuel

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users