Advertisement
Hirwanto

asympt02

Jan 26th, 2015
4,831
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \begin{asy}
  2. // file fodsp.asy
  3. //
  4. // to get fodsp.pdf, run `asy -f pdf fodsp.asy`
  5. //
  6. size(8cm);
  7. import graph;
  8. import fontsize; defaultpen(fontsize(9pt));
  9. texpreamble("\usepackage{lmodern}");
  10.  
  11. pen[] fillpen={
  12.   red, orange, yellow, green, lightblue, blue, darkblue
  13. };
  14.  
  15. real
  16. xmin=0, xmax=20,
  17. ymin=0, ymax=20;
  18.  
  19. xaxis(xmin,xmax,RightTicks(Step=10,step=5));
  20. yaxis(ymin,ymax, LeftTicks(Step=10,step=5));
  21.  
  22. real ra(real t, real a){return 3*a*sin(t)*cos(t)/(sin(t)^3+cos(t)^3);};
  23. real r(real);
  24. guide loop;
  25.  
  26. real a, a0=10, da=1;
  27. int n=fillpen.length;
  28.  
  29. real t; pair p;
  30. a=a0;
  31. for(int i=0;i<n;++i){
  32.   r=new real(real t){return ra(t,a);};
  33.   loop =polargraph(r,0,pi/2)--cycle;
  34.   filldraw(loop, 0.7fillpen[i]+0.3white,fillpen[i]);
  35.   t=atan(2^(1/3));
  36.   p=r(t)*(cos(t),sin(t));
  37.   unfill(circle(p,0.7));
  38.   label("$"+string(a)+"$",p);
  39.   a-=da;
  40. }
  41.  
  42. label("$r(\theta)=\displaystyle"
  43. +"\frac{3 a \sin\theta\cos\theta}{\sin^3\theta+\cos^3\theta}$, "
  44. +"$\theta=[0,\frac\pi2]$, "
  45. +"$a="+string(a0-(n-1)*da)+"$--$"+string(a0)+"$"
  46. ,((xmin+xmax)/2,ymax),S);
  47.  
  48. shipout(bbox(paleyellow,Fill));
  49. \end{asy}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement