Asymptote using solids.asy – fig0010

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

Figure 0001
(Compiled with Asymptote version 2.14svn-r5318)
    
import solids;
currentprojection=orthographic(1,2,2);

size(6cm,0);
material m=
  //       diffusepen, ambientpen, emissivepen,  specularpen
  material(  grey,       yellow,     black,        orange);

draw(surface(sphere(1)), m);

Étiquettes : , , , , ,


Asymptote using solids.asy – fig0020

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

Figure 0002
(Compiled with Asymptote version 2.14svn-r5318)
    
import solids;
currentlight=light(paleyellow, viewport=false,
                   (5,-5,10),(0,0,-10));

size(6cm,0);
draw(sphere(1,n=4*nslice), linewidth(bp), m=10);
draw(surface(sphere(1,n=4*nslice)), orange);

Étiquettes : , , , , ,


Asymptote using solids.asy – fig0050

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

Figure 0005
(Compiled with Asymptote version 2.14svn-r5318)
    
import solids;
size(6cm,0);
currentlight=light(diffuse=yellow, ambient=blue, specular=paleyellow,
                   specularfactor=0, viewport=false,(5,-5,10));
// currentprojection=orthographic(100,100,30);
real r=2;

skeleton s;
revolution sph=sphere(O,r);
draw(surface(sph),red);

triple cam=unit(currentprojection.camera);
revolution cle=revolution(O,r*(rotate(90,Z)*cam),cam);
draw(cle, 8pt+black);

Étiquettes : , , , , , ,


Official Asymptote example – arrows3

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 5 h 57 min

Figure 0005
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
import three;

size(15cm);

defaultrender.merge=true;

currentprojection=perspective(24,14,13);
currentlight=light(gray(0.5),specularfactor=3,viewport=false,
                   (0.5,-0.5,-0.25),(0.5,0.5,0.25),(0.5,0.5,1),(-0.5,-0.5,-1));

defaultpen(0.75mm);

path3 g=arc(O,1,90,-60,90,60);
transform3 t=shift(invert(3S,O));

draw(g,blue,Arrows3(TeXHead3),currentlight);
draw(scale3(3)*g,green,ArcArrows3(HookHead3),currentlight);
draw(scale3(6)*g,red,Arrows3(DefaultHead3),currentlight);

draw(t*g,blue,Arrows3(TeXHead2),currentlight);
draw(t*scale3(3)*g,green,ArcArrows3(HookHead2,NoFill),currentlight);
draw(t*scale3(6)*g,red,Arrows3(DefaultHead2(normal=Z)),currentlight);

Étiquettes : ,


Official Asymptote example – pipeintersection

Category: Asymptote,Official Gallery One-PagerPh. Ivaldi @ 17 h 57 min

Figure 0165
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
import graph3;

currentprojection=orthographic(5,4,2);

size(12cm,0);

real f(pair z) {return min(sqrt(1-z.x^2),sqrt(1-z.y^2));}

surface s=surface(f,(0,0),(1,1),40,Spline);

transform3 t=rotate(90,O,Z), t2=t*t, t3=t2*t, i=xscale3(-1)*zscale3(-1);
draw(surface(s,t*s,t2*s,t3*s,i*s,i*t*s,i*t2*s,i*t3*s),blue,
     render(compression=Low,closed=true,merge=true));

Étiquettes : , , ,