## Asymptote using solids.asy – fig0010

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

 (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

 (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 – fig0030

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

 (Compiled with Asymptote version 2.14svn-r5318)

// Author: John Bowman.
size(6cm,0);
import solids;
currentprojection=orthographic(0,10,5);

nslice=4*nslice;

revolution r=sphere(O,1);
draw(surface(r), lightgrey+opacity(0.75));

skeleton s;
r.transverse(s,reltime(r.g,0.6));
r.transverse(s,reltime(r.g,0.5));
draw(s.transverse.back,linetype("8 8",8));
draw(s.transverse.front);

r.longitudinal(s);
draw(s.longitudinal.front);
draw(s.longitudinal.back,linetype("8 8",8));

Étiquettes : , , , , , ,

## Asymptote using solids.asy – fig0040

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

 (Compiled with Asymptote version 2.14svn-r5318)

import solids;
size(6cm,0);

currentprojection=orthographic(100,150,30);

real r=1;

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

path3 cle=rotate(90,X)*scale3(r)*unitcircle3;

triple cam=unit(currentprojection.camera);
real a=degrees(xypart(cam),false)-90;
real b=-sgn(cam.z)*aCos(sqrt(cam.x^2+cam.y^2)/abs(cam));
cle=rotate(b,cross(Z,cam))*rotate(a,Z)*cle;
draw(cle,4pt+red);

Étiquettes : , , , , ,

## Asymptote using solids.asy – fig0050

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

 (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 : , , , , , ,

## Asymptote using solids.asy – fig0060

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

 (Compiled with Asymptote version 2.14svn-r5318)

// Author: John Bowman
import three;
size(6cm,0);
currentprojection=perspective(10,100,50);
real a=2.5;

draw(scale3(a)*unitsphere,lightyellow);
draw(align(unit(currentprojection.vector()))*scale3(a)*unitcircle3,2bp+red);

Étiquettes : , , ,

## Asymptote using solids.asy – fig0070

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

 (Compiled with Asymptote version 2.14svn-r5318)

import solids;
size(6cm,0);
currentprojection=orthographic(1,2,2);

surface s=surface(sphere(1,n=10));

material[] p={material(0.8*red,yellow,red,blue), invisible, 0.8*(red+blue) , invisible, 0.8*blue};
p.cyclic=true;
draw(s,p);

Étiquettes : , , ,

## Asymptote using solids.asy – fig0080

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

 (Compiled with Asymptote version 2.14svn-r5318)

import solids;
import palette;
size(14cm,0);
currentlight=light(gray(0.4),specularfactor=3,viewport=false,
(-0.5,-0.25,0.45),
(0.5,-0.5,0.5),(0.5,0.5,0.75));

nslice=4*nslice;
surface s=surface(sphere(O,1));
draw(s,lightgrey);

path3 pl=plane((1,0,0),(0,1,0),(0,0,-1));
surface pls=shift(3,3,-1e-3)*scale(-6,-6,1)*surface(pl);
draw(pls,0.7*red);

real dist(triple z){return abs(z-Z);}

for (int i=0; i < currentlight.position.length; ++i) {
nolight);
}

Étiquettes : , , , , , ,

## Asymptote using solids.asy – fig0090

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

 (Compiled with Asymptote version 2.14svn-r5318)

size(8cm,0);
import solids;
import graph3;

//Draw 3D right angle (MA,MB)
void drawrightangle(picture pic=currentpicture,
triple M, triple A, triple B,
pen p=currentpen,
pen fillpen=nullpen,
projection P=currentprojection)
{
p=linejoin(0)+linecap(0)+p;
transform3 T=shift(-M);
OC=OA+OB;
path3 tp=OA--OC--OB;
picture tpic;
draw(tpic, tp, p=p);
if (fillpen!=nullpen) draw(tpic, surface(O--tp--cycle), fillpen);
}

currentprojection=orthographic(10,15,3);

real r=10, h=6; // r=sphere radius; h=altitude section
triple Op=(0,0,h);

limits((0,0,0),1.1*(r,r,r));
axes3("x","y","z");

real ch=180*acos(h/r)/pi;
path3 arcD=Arc(O,r,180,0,ch,0,Y,50);

revolution sphereD=revolution(O,arcD,Z);
draw(surface(sphereD), opacity(0.5)+lightblue);
draw(shift(0,0,h)*scale3(rs)*surface(unitcircle3),opacity(0.5));

path3 arcU=Arc(O,r,ch,0,0,0,Y,10);
revolution sphereU=revolution(O,arcU,Z);
draw(surface(sphereU), opacity(0.33)+lightgrey);

// right triangle OO'A
triple A=rotate(100,Z)*(rs,0,h);
dot("\$O\$",O,NW);
dot("\$O'\$",Op,W);
dot("\$A\$",A,N);
draw(A--O--Op--A);
drawrightangle(Op,O,A);

if(!is3D())
shipout(format="pdf", bbox(Fill(paleyellow)));

Étiquettes : , , , , ,

## Asymptote using solids.asy – fig0100

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

 (Compiled with Asymptote version 2.14svn-r5318)

unitsize(1cm);
import solids;

currentprojection=orthographic(0,100,25);

real r=4, h=7;
triple O=(0,0,0);
triple Oprime=(0,0,3);
triple pS=(0,0,h);
triple pA=(r*sqrt(2)/2,r*sqrt(2)/2,0);
revolution rC=cone(O,r,h,axis=Z,n=1);

draw(surface(rC),blue+opacity(0.5));

skeleton s;
real tOprime=abs(Oprime)/h;
rC.transverse(s,reltime(rC.g,tOprime));
triple pAprime=relpoint(pA--pS,tOprime);
draw(s.transverse.back,dashed);
draw(s.transverse.front);

label("\$S\$",pS,N);
dot(Label("\$O\$",align=SE),O);
dot(Label("\$O'\$",align=SE),Oprime);
dot(Label("\$A\$",align=Z),pA);
dot(Label("\$A'\$",align=Z),pAprime);

draw(pS--O^^O--pA^^Oprime--pAprime,dashed);

Étiquettes : , , ,

• Page 1 of 2
• 1
• 2
• >