Namespaces
Variants
Actions

Difference between revisions of "User:Nikita2/sandbox"

From Encyclopedia of Mathematics
Jump to: navigation, search
(Created page with "<asy> import graph; size(200,IgnoreAspect); real f(real x) {return sin(x);}; bool3 branch(real x) { static int lastsign=0; //if(x == 0) return false; int sign=sgn(x); ...")
 
Line 1: Line 1:
 
<asy>
 
<asy>
 
import graph;
 
import graph;
size(200,IgnoreAspect);
+
size(400,200,IgnoreAspect);
 +
real f(real x) {return sin(x);};
 +
draw(graph(f,-2*pi,2*pi),red,"$\sin(x)$");
 +
xaxis("$x$",Arrow);
 +
yaxis();
 +
 
 +
xtick("$\frac{\pi}{6}$",pi/6,N);
 +
xtick("$\frac{\pi}{4}$",pi/4,N);
 +
xtick("$\frac{\pi}{3}$",pi/3,N);
 +
xtick("$\frac{\pi}{2}$",pi/2,N);
 +
xtick("$\frac{3\pi}{2}$",3*pi/2,N);
 +
xtick("$\pi$",pi,N);
 +
xtick("$2\pi$",2*pi,N);
 +
 
 +
 
 +
xtick("$-\frac{\pi}{2}$",-pi/2,N);
 +
xtick("$-\frac{3\pi}{2}$",-3*pi/2,N);
 +
xtick("$-\pi$",-pi,N);
 +
xtick("$-2\pi$",-2*pi,N);
 +
 
 +
 
 +
ytick("$1/2$",0.5,1);
 +
ytick("$\sqrt{2}/2$",sqrt(2)/2,1);
 +
ytick("$\sqrt{3}/2$",sqrt(3)/2,1);
 +
ytick("$1$",1,1);
 +
 
 +
ytick("$-1/2$",-0.5,-1);
 +
ytick("$-\sqrt{2}/2$",-sqrt(2)/2,-1);
 +
ytick("$-\sqrt{3}/2$",-sqrt(3)/2,-1);
 +
ytick("$-1$",-1,-1);
  
real f(real x) {return sin(x);};
 
  
bool3 branch(real x)
 
{
 
  static int lastsign=0;
 
  //if(x == 0) return false;
 
  int sign=sgn(x);
 
  bool b=lastsign == 0 || sign == lastsign;
 
  lastsign=sign;
 
  return b ? true : default;
 
}
 
  
draw(graph(f,0.000001,2*pi,branch));
+
attach(legend(),truepoint(E),10E,UnFill);
axes("$x$","$y$",black);
 
 
</asy>
 
</asy>

Revision as of 18:17, 5 December 2012

How to Cite This Entry:
Nikita2/sandbox. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Nikita2/sandbox&oldid=29095