SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 294 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import three;
  2. import graph3;
  3. import solids;
  4. size(8cm);
  5. triple sp(real r, real t, real p) { return (r*Sin(p)*Cos(t),r*Sin(p)*Sin(t),r*Cos(p)); }
  6.  
  7. currentprojection=perspective((30,20,30));
  8. currentlight = light(lightgray,ambient=white,specular=white,
  9.                      specularfactor=3,(30,30,20));
  10.  
  11. real R = 2;
  12. real r = 1;
  13.  
  14. path3 p1 = Arc((0,0,0),R,0,0,90,0);
  15. path3 p2 = Arc((0,0,0),R,90,0,180,0);
  16. surface s1 = surface(revolution((0,0,0),p1,90,360));
  17. surface s2 = surface(revolution((0,0,0),p2,0,360));
  18. draw(s1,lightblue);
  19. draw(s2,lightblue);
  20. draw(unitsphere,lightblue+opacity(.4));
  21.  
  22. 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;
  23. 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;
  24. 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;
  25. draw(surface(g1),lightgrey);
  26. draw(surface(g2),lightgrey);
  27. draw(surface(g3),lightgrey);
  28.  
  29. label("$V$",(.5,.1,1.5));
  30. draw((0,0,0)--(0,2/sqrt(2),2/sqrt(2)),Arrow3);
  31. draw(Label("$R_1$",MidPoint,W),(0,0,0)--sp(1,60,90),Arrow3);
  32. label("$R_2$",(.1,.9,1.3));
  33. triple a = (-1/2,sqrt(15/8),sqrt(15/8));
  34. triple b = 1.5*a;
  35. triple a2 = sp(1,90,65);
  36. triple b2 = a2*3.5;
  37. draw(Label("$S_2$",EndPoint),a--b);
  38. draw(Label("$S_1$",EndPoint),a2--b2);
  39. xaxis3(Label("$x$"),xmin=0,xmax=2.75,red,Arrow3);
  40. yaxis3(Label("$y$"),ymin=0,ymax=2.75,red,Arrow3);
  41. zaxis3(Label("$z$"),zmin=0,zmax=2.75,red,Arrow3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top