Asymptote using solids.asy – fig0140

Category: Asymptote,Examples 3D,solids.asyPh. Ivaldi @ 15 h 56 min

Figure 0014
(Compiled with Asymptote version 2.14svn-r5318)
    
/*
Author: Jens Schwaiger	
With its pleasant authorization.
*/

size(10cm,0);
import bsp;

currentprojection=perspective(10,3,-2);
guide achteck=polygon(8);
real lge=length(point(achteck,1)-point(achteck,0));
int n=8;
face[] faces;
guide3[] sq;
guide3[] tr;
triple a,b,c,d;

a=(point(achteck,0).x,point(achteck,0).y,-lge/2);
b=(point(achteck,1).x,point(achteck,1).y,-lge/2);
c=(point(achteck,1).x,point(achteck,1).y,lge/2);
d=(point(achteck,0).x,point(achteck,0).y,lge/2);

sq[0]=a--b--c--d--cycle;
for(int i=1;i<n;i=i+1) sq[i]=rotate(45*i,Z)*sq[0];
for(int i=0;i<3;i=i+1) sq[n+i]=rotate(90,Y)*sq[i];
for(int i=4;i<7;i=i+1) sq[n-1+i]=rotate(90,Y)*sq[i];
for(int i=2;i<3;i=i+1) sq[12+i]=rotate(90,X)*sq[i];
sq[14]=rotate(90,X)*sq[2];
sq[15]=rotate(90,X)*sq[4];
sq[16]=rotate(90,X)*sq[6];
sq[17]=rotate(90,X)*sq[0];

tr[0]=point(sq[2],3)--point(sq[2],2)--point(sq[14],1)--cycle;
for(int i=1;i<4;i=i+1) tr[i]=rotate(90*i,Z)*tr[0];
tr[4]=reverse(point(sq[2],0)--point(sq[2],1)--point(sq[9],2)--cycle);
for(int i=5;i<8;i=i+1) tr[i]=rotate(90*(i-4),Z)*tr[4];

real hgtsq=3;
triple[][][] pyrsq=new triple[18][4][3];
path3[] pyrsqfc=new path3[4*18];
int nofface=0;
for(int i=0;i<18;i=i+1){
  triple cog=0.5(point(sq[i],0)+point(sq[i],2));
  triple sp=cog+
    hgtsq*unit(cross(point(sq[i],1)-point(sq[i],0),point(sq[i],3)-point(sq[i],0))); 
  for(int j=0;j<3;j=j+1){
    pyrsq[i][j][0]=point(sq[i],j);
    pyrsq[i][j][1]=point(sq[i],j+1);
    pyrsq[i][j][2]=sp;
    pyrsqfc[nofface]=pyrsq[i][j][0]--pyrsq[i][j][1]--pyrsq[i][j][2]--cycle;
    nofface=nofface+1;
  }
  pyrsq[i][3][0]=point(sq[i],3);
  pyrsq[i][3][1]=point(sq[i],0);
  pyrsq[i][3][2]=sp;    
  pyrsqfc[nofface]=pyrsq[i][3][0]--pyrsq[i][3][1]--pyrsq[i][3][2]--cycle;
  nofface=nofface+1;
 }

for(int i=0;i<18*4;i=i+1) faces.push(pyrsqfc[i]);
for(int i=0;i<18*4;i=i+1) filldraw(faces[i],project(pyrsqfc[i]),yellow,black+2.5bp);

path3[] pyrtrfc=new path3[3*8];
real hgttr=2;
int nuoftr=0;

for(int i=0;i<8;i=i+1){
  triple cog=(1/3)*(point(tr[i],0)+point(tr[i],1)+point(tr[i],2));
  triple sp=cog+hgttr*unit(cross(point(tr[i],1)-point(tr[i],0),point(tr[i],2)-point(tr[i],0)));
  pyrtrfc[nuoftr]=point(tr[i],0)--point(tr[i],1)--sp--cycle;
  pyrtrfc[nuoftr+1]=point(tr[i],1)--point(tr[i],2)--sp--cycle;
  pyrtrfc[nuoftr+2]=point(tr[i],2)--point(tr[i],0)--sp--cycle;
  nuoftr=nuoftr+3;
 }

for(int j=0;j<24;j=j+1) faces.push(pyrtrfc[j]);
for(int j=0;j<24;j=j+1) filldraw(faces[4*18+j],project(pyrtrfc[j]),orange+yellow,black+2bp);

add(faces);
shipout(defaultfilename,bbox(0.2cm,black,RadialShade(paleblue,darkblue)));

Étiquettes : , ,


Asymptote using solids.asy – fig0150

Category: Asymptote,Examples 3D,solids.asyPh. Ivaldi @ 16 h 56 min

Figure 0015
(Compiled with Asymptote version 2.14svn-r5318)
    
/*
Author: Jens Schwaiger
With its pleasant authorization.
*/
// PRC/OpenGL version

size(10cm,0);
import graph3;

currentprojection=orthographic(10,3,-2);
// currentlight=nolight;

guide achteck=polygon(8);
real lge=length(point(achteck,1)-point(achteck,0));
int n=8;
guide3[] sq;
guide3[] tr;
triple a,b,c,d;

a=(point(achteck,0).x,point(achteck,0).y,-lge/2);
b=(point(achteck,1).x,point(achteck,1).y,-lge/2);
c=(point(achteck,1).x,point(achteck,1).y,lge/2);
d=(point(achteck,0).x,point(achteck,0).y,lge/2);

sq[0]=a--b--c--d--cycle;
for(int i=1;i<n;i=i+1) sq[i]=rotate(45*i,Z)*sq[0];
for(int i=0;i<3;i=i+1) sq[n+i]=rotate(90,Y)*sq[i];
for(int i=4;i<7;i=i+1) sq[n-1+i]=rotate(90,Y)*sq[i];
for(int i=2;i<3;i=i+1) sq[12+i]=rotate(90,X)*sq[i];
sq[14]=rotate(90,X)*sq[2];
sq[15]=rotate(90,X)*sq[4];
sq[16]=rotate(90,X)*sq[6];
sq[17]=rotate(90,X)*sq[0];

tr[0]=point(sq[2],3)--point(sq[2],2)--point(sq[14],1)--cycle;
for(int i=1;i<4;i=i+1) tr[i]=rotate(90*i,Z)*tr[0];
tr[4]=reverse(point(sq[2],0)--point(sq[2],1)--point(sq[9],2)--cycle);
for(int i=5;i<8;i=i+1) tr[i]=rotate(90*(i-4),Z)*tr[4];

real hgtsq=3;
triple[][][] pyrsq=new triple[18][4][3];
path3[] pyrsqfc=new path3[4*18];
int nofface=0;
for(int i=0;i<18;i=i+1){
  triple cog=0.5(point(sq[i],0)+point(sq[i],2));
  triple sp=cog+
    hgtsq*unit(cross(point(sq[i],1)-point(sq[i],0),point(sq[i],3)-point(sq[i],0)));
  for(int j=0;j<3;j=j+1){
    pyrsq[i][j][0]=point(sq[i],j);
    pyrsq[i][j][1]=point(sq[i],j+1);
    pyrsq[i][j][2]=sp;
    pyrsqfc[nofface]=pyrsq[i][j][0]--pyrsq[i][j][1]--pyrsq[i][j][2]--cycle;
    nofface=nofface+1;
  }
  pyrsq[i][3][0]=point(sq[i],3);
  pyrsq[i][3][1]=point(sq[i],0);
  pyrsq[i][3][2]=sp;
  pyrsqfc[nofface]=pyrsq[i][3][0]--pyrsq[i][3][1]--pyrsq[i][3][2]--cycle;
  nofface=nofface+1;
 }

for(int i=0;i<18*4;i=i+1)
  draw(surface(pyrsqfc[i]),yellow,black+2.5bp);

path3[] pyrtrfc=new path3[3*8];
real hgttr=2;
int nuoftr=0;

for(int i=0;i<8;i=i+1){
  triple cog=(1/3)*(point(tr[i],0)+point(tr[i],1)+point(tr[i],2));
  triple sp=cog+hgttr*unit(cross(point(tr[i],1)-point(tr[i],0),point(tr[i],2)-point(tr[i],0)));
  pyrtrfc[nuoftr]=point(tr[i],0)--point(tr[i],1)--sp--cycle;
  pyrtrfc[nuoftr+1]=point(tr[i],1)--point(tr[i],2)--sp--cycle;
  pyrtrfc[nuoftr+2]=point(tr[i],2)--point(tr[i],0)--sp--cycle;
  nuoftr=nuoftr+3;
 }

for(int j=0;j<24;j=j+1)
  draw(surface(pyrtrfc[j]),orange+yellow,black+2bp);

Étiquettes : , ,


Unofficial package polyhedron_js.asy – fig0010

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 23 h 46 min

Figure 0001
(Compiled with Asymptote version 2.14svn-r5318)
    
import polyhedron_js;

// comment the following line for OpenGl
// settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

polyhedron pyramid;
real sq2=sqrt(2)/2;
pyramid[0]=(-sq2,-sq2,0)--(-sq2,sq2,0)--(sq2,sq2,0)--(sq2,-sq2,0)--cycle;
pyramid[1]=(sq2,-sq2,0)--(sq2,sq2,0)--(0,0,1)--cycle;
pyramid[2]=(sq2,sq2,0)--(-sq2,sq2,0)--(0,0,1)--cycle;
pyramid[3]=(-sq2,sq2,0)--(-sq2,-sq2,0)--(0,0,1)--cycle;
pyramid[4]=(-sq2,-sq2,0)--(sq2,-sq2,0)--(0,0,1)--cycle;
size(10cm);
polyhedron[] parr={pyramid};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D())
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue))); 

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0020

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 0 h 46 min

Figure 0002
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={cube};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("Cube",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0030

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 1 h 46 min

Figure 0003
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={tetrahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("Tetrahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0040

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 2 h 46 min

Figure 0004
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,1); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={dodecahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("Dodecahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0050

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 3 h 46 min

Figure 0005
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,1); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={icosahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("Icosahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0060

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 4 h 46 min

Figure 0006
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,1); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={octahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("Octahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0070

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 5 h 46 min

Figure 0007
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

currentprojection=orthographic(0.5,0.5,0.5); //if you want othographic look

size(16cm);

polyhedron Plane;
Plane[0]=(-2,-2,-1.5)--(2.5,-2,-1.5)--(2.5,2.5,-1.5)--(-2,2.5,-1.5)--cycle;
Plane[1]=(-2,-2,-1.5)--(-2,2.5,-1.5)--(-2,2.5,0)--(-2,-2,0)--cycle;

pen[] drawcol={black+1bp};
pen[] fcol1={0.8*red,0.8*blue,0.8*green,orange,heavycyan,gray};

triple[] posofsolids;
for(int i=0;i<5;++i) posofsolids[i]=(1.7*cos(2pi/5*i)+1,1.7*sin(2pi/5*i)+1,0);
polyhedron[] parr={ shift(posofsolids[0])*icosahedron,
                    shift(posofsolids[1])*dodecahedron,
                    shift(posofsolids[2])*cube,
                    shift(posofsolids[3])*rotate(45,Z)*octahedron,
                    shift(posofsolids[4])*rotate(90,Z)*tetrahedron,
                    Plane };

filldraw(parr,fcol=fcol1,dcol=drawcol,op=0.9);

if(!is3D()) {
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0080

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 6 h 46 min

Figure 0008
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncTetraRight};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncTetraRight",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0090

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 7 h 46 min

Figure 0009
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={cubooctahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("cubooctahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0100

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 8 h 46 min

Figure 0010
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncCube};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncCube",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0110

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 9 h 46 min

Figure 0011
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
// settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncOctahedron};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncOctahedron",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0120

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 10 h 46 min

Figure 0012
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={rhombiCuboocta};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("rhombiCuboocta",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0130

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 11 h 46 min

Figure 0013
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncCuboocta};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncCuboocta",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0140

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 12 h 46 min

Figure 0014
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={snubCubeRight};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("snubCubeRight",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0150

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 13 h 46 min

Figure 0015
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={snubCubeLeft};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("snubCubeLeft",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0160

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 14 h 46 min

Figure 0016
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={icosDod};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("icosDod",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0170

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 15 h 46 min

Figure 0017
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncateDodeca};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncateDodeca",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0180

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 16 h 46 min

Figure 0018
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={truncIcos};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("truncIcos",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0190

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 17 h 46 min

Figure 0019
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={rhombicosDodec};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("rhombicosDodec",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0200

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 18 h 46 min

Figure 0020
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={snbDdcleft};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("snbDdcleft",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0210

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 19 h 46 min

Figure 0021
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={snbDdcright};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("snbDdcright",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Unofficial package polyhedron_js.asy – fig0220

Category: Asymptote,polyhedron_js.asy,Unofficial packagesPh. Ivaldi @ 20 h 46 min

Figure 0022
(Compiled with Asymptote version 2.14svn-r5318)
    
//Author Jens Schwaiger.
import polyhedron_js;

// comment the following line for OpenGl
settings.render=0;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity

size(10cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,1,0.5); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

polyhedron[] parr={greatRhombicosDodec};
filldraw(parr,new pen[]{0.8green},op=0.9);

if(!is3D()) {
  label("greatRhombicosDodec",point(S),align=3S);
  shipout(bbox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));
}

Étiquettes : ,


Animation with Asymptote – fig0060

Category: Animation,AsymptotePh. Ivaldi @ 13 h 20 min

Figure 0006
(Compiled with Asymptote version 1.86svn-r4626)
Movie flash (swf)
This animation is available in the Syracuse web site.
    
//Author Jens Schwaiger.
import polyhedron_js;
import animate;
settings.render=0;
settings.tex="pdflatex";
settings.outformat="pdf";

size(16cm);
currentprojection=perspective(5,4,2);
currentlight=(5,4,2);

polyhedron Plane;
Plane[0]=(-2,-2,-1.5)--(2.5,-2,-1.5)--(2.5,2.5,-1.5)--(-2,2.5,-1.5)--cycle;
Plane[1]=(-2,-2,-1.5)--(-2,2.5,-1.5)--(-2,2.5,0)--(-2,-2,0)--cycle;

int n=180;
pen[] drawcol={black+1bp};
pen[] fcol1={0.8*red,0.8*blue,0.8*green,orange,heavycyan,gray};

animation anim;

triple[] posofsolids;
real angle;
for(int janim=0; janim < n; ++janim){
  for(int i=0; i < 5; ++i) {
    angle=2pi/5*i+2pi*janim/n;
    posofsolids[i]=(1.7*cos(angle)+1,1.7*sin(angle)+1,0);
  }
  transform3 T=rotate(-degrees(2*angle),Z);
  polyhedron[] parr={ shift(posofsolids[0])*T*icosahedron,
                      shift(posofsolids[1])*T*dodecahedron,
                      shift(posofsolids[2])*T*cube,
                      shift(posofsolids[3])*T*rotate(45,Z)*octahedron,
                      shift(posofsolids[4])*T*rotate(90,Z)*tetrahedron,
                      Plane };

  save();
  filldraw(parr,fcol=fcol1,dcol=drawcol,op=0.9);
  anim.add();
  restore();
}

anim.movie(BBox(3mm,darkblue+3bp+miterjoin,FillDraw(paleblue)));

Étiquettes : , ,


Animation with Asymptote – fig0070

Category: Animation,AsymptotePh. Ivaldi @ 14 h 20 min

Figure 0007
(Compiled with Asymptote version 1.86svn-r4626)
Movie flash (swf)
This animation is available in the Syracuse web site.
    
import polyhedron_js;
import animation;

settings.tex="pdflatex";
settings.outformat="pdf"; // for opacity
settings.render=0;

animation A;
size(8cm);

// currentprojection=perspective(7,6,4); //if you want perspectivic look
currentprojection=orthographic(1,0.5,1); //if you want othographic look
currentlight=(1,1,2);
// currentlight=nolight;

int col=0;
pen[] fcol={palegreen+paleblue+lightgrey};
fcol.cyclic=true;

polyhedron[] parr;

for (int i=0; i < 360; i += 2) {
  parr[0]=rotate(i,Z)*rhombicosDodec;
  save();
  filldraw(parr,fcol,op=0.9);
  A.add();
  restore();
}

A.movie();

Étiquettes : , ,