Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import three;
- import graph3;
- import solids;
- size(8cm);
- triple sp(real r, real t, real p) { return (r*Sin(p)*Cos(t),r*Sin(p)*Sin(t),r*Cos(p)); }
- currentprojection=perspective((30,20,30));
- currentlight = light(lightgray,ambient=white,specular=white,
- specularfactor=3,(30,30,20));
- real R = 2;
- real r = 1;
- path3 p1 = Arc((0,0,0),R,0,0,90,0);
- path3 p2 = Arc((0,0,0),R,90,0,180,0);
- surface s1 = surface(revolution((0,0,0),p1,90,360));
- surface s2 = surface(revolution((0,0,0),p2,0,360));
- draw(s1,lightblue);
- draw(s2,lightblue);
- draw(unitsphere,lightblue+opacity(.4));
- path3 g1 = (2,0,0)--(1,0,0)--arc((0,0,0),1,90,0,0,0)--(0,0,2)--arc((0,0,0),2,0,0,90,0)--cycle;
- path3 g2 = (0,2,0)--(0,1,0)--arc((0,0,0),1,90,90,0,90)--(0,0,2)--arc((0,0,0),2,0,90,90,90)--cycle;
- path3 g3 = (2,0,0)--(1,0,0)--arc((0,0,0),1,90,0,90,90)--(0,2,0)--arc((0,0,0),2,90,90,90,0,normal=(0,0,1))--cycle;
- draw(surface(g1),lightgrey);
- draw(surface(g2),lightgrey);
- draw(surface(g3),lightgrey);
- label("$V$",(.5,.1,1.5));
- draw((0,0,0)--(0,2/sqrt(2),2/sqrt(2)),Arrow3);
- draw(Label("$R_1$",MidPoint,W),(0,0,0)--sp(1,60,90),Arrow3);
- label("$R_2$",(.1,.9,1.3));
- triple a = (-1/2,sqrt(15/8),sqrt(15/8));
- triple b = 1.5*a;
- triple a2 = sp(1,90,65);
- triple b2 = a2*3.5;
- draw(Label("$S_2$",EndPoint),a--b);
- draw(Label("$S_1$",EndPoint),a2--b2);
- xaxis3(Label("$x$"),xmin=0,xmax=2.75,red,Arrow3);
- yaxis3(Label("$y$"),ymin=0,ymax=2.75,red,Arrow3);
- zaxis3(Label("$z$"),zmin=0,zmax=2.75,red,Arrow3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement