|
|
| Figure 0001: fig1000.asy |
import solids; size(6cm,0); sphere(1).filldraw(lightgrey,m=10,linewidth(.5));
|
|
| Figure 0002: fig10050.asy |
// Author: John Bowman. size(6cm,0); import solids; revolution r=sphere(O,1); r.fill(lightgrey); skeleton s; r.transverse(s,reltime(r.g,0.6)); r.longitudinal(s); draw(s.back,linetype("8 8",8)); draw(s.front); r.transverse(s,reltime(r.g,0.5)); r.longitudinal(s); draw(s.back,linetype("8 8",8)); draw(s.front);
|
|
| Figure 0003: fig10060.asy |
import solids; size(6cm,0); currentprojection=orthographic(100,150,30); real r=1; skeleton s; revolution sph=sphere(O,r); sph.filldraw(palegray); path3 cle=rotate(90,X)*scale3(r)*unitcircle3; triple cam=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,bp+red);
|
|
| Figure 0004: fig10070.asy |
import solids; size(6cm,0); currentprojection=orthographic(100,100,30); real r=1; skeleton s; revolution sph=sphere(O,r); sph.filldraw(palegray); triple cam=currentprojection.camera; revolution cle=revolution(O,r*(rotate(90,Z)*cam),cam); cle.draw(bp+red);
|
|
| Figure 0005: fig10075.asy |
size(8cm,0); import solids; //Draw 3D right angle (MA,MB) void drawrightangle(picture pic=currentpicture, triple M, triple A, triple B, real radius=0, pen p=currentpen, pen fillpen=nullpen, projection P=currentprojection) { p=linejoin(0)+linecap(0)+p; if (radius==0) radius=arrowfactor*sqrt(2); transform3 T=shift(-M); triple OA=radius/sqrt(2)*unit(T*A), OB=radius/sqrt(2)*unit(T*B), OC=OA+OB; path3 tp=OA--OC--OB; picture tpic; draw(tpic, tp, p=p); if (fillpen!=nullpen) fill(tpic, O--tp--cycle3, fillpen); add(pic,tpic,M); } currentprojection=orthographic(100,150,30); real r=10, h=6; // r=sphere radius; h=altitude section triple Op=(0,0,h); real rs=sqrt(r^2-h^2); // section radius real ch=1-acos(h/r)/pi; path3 arcD=Arc(O,r,90,0,90,180*ch,Y,32)--(0,0,h); revolution sphereD=revolution(O,arcD,Z); sphereD.fill(lightblue); path3 arcU=Arc(O,r,90,180*ch,90,180,Y,32); revolution sphereU=revolution(O,arcU,Z); sphereU.filldraw(opacity(0.5)+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); shipout(format="pdf", bbox(Fill(paleyellow)));
|
|
| Figure 0006: fig10080.asy |
unitsize(1cm); import solids; import math; currentprojection=orthographic(0,100,25); real r=4, h=7; triple pO=(0,0,0); triple pOprime=(0,0,3); triple pS=(0,0,h); triple pA=(r,0,0); revolution rC=cone(pO,r,h,Z); rC.draw(); skeleton s; real tOprime=abs(pOprime)/h; rC.transverse(s,reltime(rC.g,tOprime)); triple pAprime=relpoint(pA--pS,tOprime); rC.longitudinal(s); draw(s.back,dashed); draw(s.front); label("$S$",pS,N); dot(Label("$O$",align=SE),pO); dot(Label("$O'$",align=SE),pOprime); dot(Label("$A$",align=W),pA); dot(Label("$A'$",align=W),pAprime); draw(pS--pO^^pO--pA^^pOprime--pAprime,dashed);
|
|
| Figure 0007: fig1100.asy |
import solids; import math; size(10cm,0); currentprojection=orthographic(-50,100,40); //Draw right angle (MA,MB) in 3D void drawrightangle(picture pic=currentpicture, triple M, triple A, triple B, real radius=0, pen p=currentpen, pen fillpen=nullpen, projection P=currentprojection) { p=linejoin(0)+linecap(0)+p; if (radius==0) radius=arrowfactor*sqrt(2); transform3 T=shift(-M); triple OA=radius/sqrt(2)*unit(T*A), OB=radius/sqrt(2)*unit(T*B), OC=OA+OB; path3 _p=OA--OC--OB; picture pic_; draw(pic_, _p, p=p); if (fillpen!=nullpen) fill(pic_, O--_p--cycle3, fillpen); add(pic,pic_,M); } // *...............Construction starts here................* real r=1, h=.75; real gle=60; real gleA=20; transform3 tR=rotate(gle,Z); transform3 tT=shift((0,0,-h)); triple H=(0,0,h),//the label is O in the picture. A=rotate(gleA,Z)*(0,r,h), F=tR*A, B=tR*F, D=tT*A, C=tT*B, E=intersectionpoint(H--F,A--B); revolution r=cylinder(O,r,h,Z); // r.fill(white); r.draw(); draw(O--H, dashed); draw(O--D--C--cycle3^^O--H^^B--C, dashed); drawrightangle(E,H,B,fillpen=black); dot(Label("$O'$",align=NE+E), O); layer(); fill(A--B--C--D--cycle3,lightgrey+opacity(.5)); dot(Label("$A$",align=NW), A); dot(Label("$B$",align=N),B); dot(Label("$C$",align=S), C); dot(Label("$D$",align=NW), D); dot(Label("$E$",align=S), E); dot(Label("$F$",align=S), F); dot(Label("$O$",align=N), H); draw(H--B--F--A--cycle3^^H--F^^A--B^^A--D); shipout(bbox(xmargin=10mm,invisible));
|
|
| Figure 0008: fig4000.asy |
import solids; size(8cm,0); currentprojection=orthographic((2, 1, 2)); revolution r = cylinder ((0, 0, 0), 1, -10, X); r.draw(); draw("$x$",O--X,Arrow); draw("$y$",O--Y,Arrow); draw("$z$",O--Z,Arrow); triple z=relpoint(relpoint(r.skeleton().longitudinal[0],0.5)-- relpoint(r.skeleton().longitudinal[1],0.5),0.5); // Project Label onto plane through point O with normal cross(u,v): // Label project(Label L, triple u, triple v, triple O=O, // projection P=currentprojection) label(scale(2.5)*rotate(180)*project("This is not a cylinder",X,Y,shift(z)*(0,0,1)));
|
|
| Figure 0009: fig5200.asy |
/* Author: Jens Schwaiger With its pleasant authorization. */ size(10cm,0); import math; import graph3; 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--cycle3; 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)--cycle3; 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)--cycle3); 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]--cycle3; 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]--cycle3; 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],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--cycle3; pyrtrfc[nuoftr+1]=point(tr[i],1)--point(tr[i],2)--sp--cycle3; pyrtrfc[nuoftr+2]=point(tr[i],2)--point(tr[i],0)--sp--cycle3; 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],pyrtrfc[j],orange+yellow,black+2bp); add(faces); shipout(defaultfilename,bbox(0.2cm,black,RadialShade(paleblue,darkblue)));
Dernière modification/Last modified: Tue Jun 24 10:59:33 CEST 2008
Philippe Ivaldi