Namespaces
Variants
Actions

Difference between revisions of "User:Boris Tsirelson/sandbox2"

From Encyclopedia of Mathematics
Jump to: navigation, search
m
(Undo revision 35590 by Boris Tsirelson (talk))
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Experiments==
 +
 +
Note a fine distinction from [http://ada00.math.uni-bielefeld.de/MW1236/index.php/User:Boris_Tsirelson/sandbox#Experiments Ada]:
 +
 
<center><asy>
 
<center><asy>
int M=30;
+
fill( box((-1,-1),(1,1)), white );
real a = 0.07;
+
draw( (-1.2,-0.5)--(1.2,-0.5) );
real a0 = 0.15;
+
label("Just a text",(0,0));
real b = 0.02;
+
filldraw( box((-0.7,-1),(0.7,1)), white, opacity(0) );
real c = 0.6;
+
shipout(scale(15)*currentpicture);
real d = -0.2;
+
</asy></center>
 +
 
 +
I guess, the reason is that there Asy generates pdf file (converted into png afterwards), and here something else (probably ps).
 +
 
 +
No, it seems, it generates eps, both here and there. Then, what could be the reason?
  
real x0 = -0.22;
+
More.
real u = 0.2;
 
real v = 0.32;
 
  
draw ((-0.7,0)--(0.3,0),Arrow);
+
<center><asy>
draw ((x0,-0.02)--(x0,1.2),Arrow);
+
label("Just a text",(0,0));
 +
fill( box((-2,-1),(2,1)), white );
 +
//draw( box((-2,-1),(2,1)), green );
 +
shipout(scale(15)*currentpicture);
 +
</asy></center>
  
label("$x$",(0.3,0),E);
 
label(rotate(90)*"$y$",(x0,1.2),N);
 
label("$x_0$",(x0,-0.02),S);
 
  
guide g1; guide g2; guide g3; guide g4; guide g5;
+
<center><asy>
for (int k=floor(-0.7M); k<floor(0.3M); ++k) {
+
label("Just a text",(0,0));
  real x = k/M;
+
fill( box((-2,-1),(2,1)), white );
  real z = 1+3*x^2;
+
draw( box((-2,-1),(2,1)), green );
  real y1 = 1/(z-2a-a0)+2b*(1+c*x)+d;
+
shipout(scale(15)*currentpicture);
  real y2 = 1/(z-a-a0)+b*(1+c*x)+d;
+
</asy></center>
  real y3 = 1/(z-a0)+d;
 
  real y4 = 1/(z+a-a0)-b*(1+c*x)+d;
 
  real y5 = 1/(z+2a-a0)-2b*(1+c*x)+d;
 
  g1=g1..(x,y1);
 
  g2=g2..(x,y2);
 
  g3=g3..(x,y3);
 
  g4=g4..(x,y4);
 
  g5=g5..(x,y5);
 
}
 
draw(g1,defaultpen+1);
 
draw(g2,defaultpen+1);
 
draw(g3,defaultpen+1);
 
draw(g4,defaultpen+1);
 
draw(g5,defaultpen+1);
 
  
real x = x0;
+
Mysterious.
real z = 1+3*x^2;
 
real y1 = 1/(z-2a-a0)+2b*(1+c*x)+d;
 
real y2 = 1/(z-a-a0)+b*(1+c*x)+d;
 
real y3 = 1/(z-a0)+d;
 
real y4 = 1/(z+a-a0)-b*(1+c*x)+d;
 
real y5 = 1/(z+2a-a0)-2b*(1+c*x)+d;
 
path g = (x,y1)..(x-u,y2)..(x-v,y3)..(x-u,y4)..(x,y5);
 
draw( g );
 
  
pair w = (0.1,-0.6);
+
==Three dimensions==
  
pair p = point(g,0.5);
+
<center><asy>
dot ( p );
+
settings.render = 0;
draw( p--p-0.5w, dashed );
 
label(rotate(90)*"$\Psi_{x_0}(y)$",p-0.5w,N);
 
  
draw( (x,y2)--(x-u,y2) );
+
unitsize(100);
draw( (x,y3)--(x-v,y3) );
 
draw( (x,y4)--(x-u,y4) );
 
  
draw( (x-u,y2+0.05)--(x-u,y4-0.05) );
+
import three;
draw( (x-v,y2+0.1)--(x-v,y4-0.1) );
+
import tube;
  
real x = -0.15;
+
import graph;
real z = 1+3*x^2;
+
path unitCircle = Circle((0,0),1,35);
real y4 = 1/(z+a-a0)-b*(1+c*x)+d;
 
dot( (x,y4) );
 
draw( (x,y4)--(x,y4)+w, dashed );
 
label("$\scriptstyle \underline f_\alpha(x)$",(x,y4)+w,SE);
 
  
real x = -0.05;
+
currentprojection = perspective((900,-350,-650));
real z = 1+3*x^2;
+
currentlight=light(gray(0.4),specularfactor=3,viewport=false,(-0.5,-0.5,-0.75),(0,-0.5,0.5),(0.5,0.5,0.75));
real y3 = 1/(z-a0)+d;
+
// currentlight=light(gray(0.4),specularfactor=3,viewport=false,(-0.5,-0.5,-0.75),(0.5,-0.5,0.5),(0.5,0.5,0.75));  
dot( (x,y3) );
 
draw( (x,y3)--(x,y3)+w, dashed );
 
label("$\scriptstyle \underline f_1(x)=\overline f_1(x)$",(x,y3)+w,SE);
 
  
real x = 0.05;
+
triple horn_start=(0,-1,0.6);
real z = 1+3*x^2;
+
triple horn_end=(0,0.4,0.2);
real y2 = 1/(z-a-a0)+b*(1+c*x)+d;
+
real horn_radius=0.2;
dot( (x,y2) );
 
draw( (x,y2)--(x,y2)+w, dashed );
 
label("$\scriptstyle \overline f_\alpha(x)$",(x,y2)+w,SE);
 
  
label("\small Fig. a4: Non-precise function",(x0,-0.2));
+
real ratio=horn_end.z/(-horn_start.y);   // fractal levels ratio
  
shipout(scale(250,120)*currentpicture);
+
transform3 implode_right = shift(horn_end) * scale3(ratio) * rotate(-90,X) * shift(-horn_start.y*Y);
</asy></center>
+
transform3 left_right = reflect(O,X,Z)*rotate(90,Y);
  
 +
path[] cover_with_holes = scale(horn_radius/ratio)*unitCircle^^
 +
  shift((horn_start.z,0))*scale(0.9horn_radius)*reverse(unitCircle)^^
 +
  shift((-horn_start.z,0))*scale(0.9horn_radius)*reverse(unitCircle);
 +
surface cover = surface(cover_with_holes,ZXplane);
 +
surface cover_left = shift((horn_start.x,horn_start.y,0))*cover;
 +
surface two_covers = surface(cover_left,left_right*cover_left);
  
<center><asy>
+
path3 horn_axis = horn_start..horn_start+(0,0.01,0)..(0,0,0.7)..(0,0.2,0.6)..horn_end+(0,0,0.01)..horn_end;
import gsl;
 
  
int M=30;
+
surface horn = tube( horn_axis, scale(horn_radius)*unitCircle );
 +
surface two_horns = surface(horn,reflect(O,X,Y)*horn);
 +
surface two_horns = surface(horn,reflect(O,X,Y)*horn);
 +
surface four_horns = surface(two_horns,left_right*two_horns,two_covers);
  
picture whole;
+
surface four_small_horns = implode_right*four_horns;
 +
surface eight_small_horns = surface(four_small_horns,left_right*four_small_horns);
  
draw ((-0.05,0)--(1.05,0),Arrow);
+
surface big_surface = surface(four_horns,eight_small_horns);
draw ((0,0)--(0,1.2),Arrow);
 
  
label("$x$",(1.05,0),E);
+
real R = horn_radius/ratio;
label("$\scriptstyle \xi_i(x)$",(0,1.2),N);
 
  
draw((-0.05,1)--(1.05,1));
+
draw ( circle((0,1,0), 1.005R, Y ), currentpen+2 );
label("$1$",(-0.05,1),W);
+
draw ( circle((horn_start.z,1.01,horn_start.x), horn_radius, Y ), currentpen+2 );
 +
draw ( circle((-horn_start.z,1.01,horn_start.x), horn_radius, Y ), currentpen+2 );
  
draw ((0.3,0)--(0.7,0),defaultpen+2);
+
draw (big_surface, yellow);
draw ((0.3,0)--(0.3,1),dashed);
 
draw ((0.7,0)--(0.7,1),dashed);
 
  
label("$K_j$",(0.5,0),S);
+
pen blackpen = currentpen+1.5;
  
guide g;
+
draw ( circle((0,-1,0), 1.005R, Y ), blackpen );
for (int k=floor(-3M); k<floor(3M); ++k) {
+
draw ( circle(horn_start, 0.98horn_radius, Y ), blackpen );
  real x = k/M;
+
draw ( circle((horn_start.x,horn_start.y,-horn_start.z), 0.98horn_radius, Y ), blackpen );
  real y = sqrt(2pi) * pdf_gaussian(x);
 
  g=g..(x,y);
 
}
 
draw(shift(0.33,0)*scale(0.03,1)*g,defaultpen+1);
 
draw(shift(0.5,0)*scale(0.045,1)*g,defaultpen+1);
 
draw(shift(0.72,0)*scale(0.04,1)*g,defaultpen+1);
 
  
label("\small Fig. a3: Non-precise observations and a class of a histogram. is a class of a histogram and is a characterizing function ",(30,-20));
+
real phi=0.9;  // adjust to the projection
 +
triple u = (cos(phi),0,sin(phi));
 +
draw( R*u-Y -- R*u+Y, blackpen );
 +
draw( -R*u-Y -- -R*u+Y, blackpen );
  
shipout(scale(170,50)*currentpicture);
 
 
</asy></center>
 
</asy></center>
 +
  
 
<center><asy>
 
<center><asy>
import gsl;
+
settings.render = 0;
  
int N=30;
+
size(200);
 +
import graph3;
  
picture whole;
+
currentprojection=perspective((2,2,5));
picture common;
 
  
draw ((-0.3,0)--(1.45,0),Arrow);
+
real R=1;
draw ((0,0)--(0,1.2));
+
real a=1;
draw ((1,0)--(1,1.2));
 
  
label("$x$",(1.6,0),E);
+
real co=0.6;
 +
real colo=0.3;
  
add ( common, currentpicture );
+
triple f(pair t) {
erase();
+
  return ((R+a*cos(t.y))*cos(t.x),(R+a*cos(t.y))*sin(t.x),a*sin(t.y));
 +
}
  
 +
surface s=surface(f,(0,0),(2pi,2pi),20,20,Spline);
  
add ( currentpicture, common );
+
draw(s,rgb(co,co,co),meshpen=rgb(colo,colo,colo));
  
guide g;
+
</asy></center>
for (int k=floor(-0.2N); k<floor(1.2N); ++k) {
 
  real x = k/N;
 
  real y = cdf_gaussian_P(7*(x-0.5));
 
  y =0.85 y+0.15;
 
  g=g..(x,y);
 
}
 
draw(g,defaultpen+1.3);
 
  
label("$\scriptstyle g(x)$",(0.33,0.8));
+
==Sinusoid==
  
add ( whole, shift(-60,0)*scale(40,36)*currentpicture );
+
<center><asy>
erase();
+
import graph;
 +
size(450);
 +
real f(real x) {return sin(x);};
  
 +
real f1(real x) {return cos(x);};
 +
draw(graph(f1,-2*pi,2*pi),blue+1,"$\cos(x)$");
 +
draw(graph(f,-2*pi,2*pi),red+1,"$\sin(x)$");
 +
xaxis("$x$",Arrow);
 +
yaxis();
  
add ( currentpicture, common );
+
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);
  
draw((-0.2,1)--(1.2,1));
+
ytick("$1/2$",0.5,1,fontsize(8pt));
label("$1$",(-0.2,1),W);
+
ytick("$\sqrt{2}/2$",sqrt(2)/2,1,fontsize(8pt));
 +
ytick("$\sqrt{3}/2$",sqrt(3)/2,1,fontsize(8pt));
 +
ytick("$1$",1,1,fontsize(8pt));
 +
ytick("$-1/2$",-0.5,-1,fontsize(8pt));
 +
ytick("$-\sqrt{2}/2$",-sqrt(2)/2,-1,fontsize(8pt));
 +
ytick("$-\sqrt{3}/2$",-sqrt(3)/2,-1,fontsize(8pt));
 +
ytick("$-1$",-1,-1,fontsize(8pt));
  
guide g1;
+
attach(legend(),truepoint(E),10E,UnFill);
guide g2;
+
</asy></center>
for (int k=floor(-0.2N); k<floor(1.2N); ++k) {
 
  real x = k/N;
 
  real y = sqrt(2pi) * pdf_gaussian(7*(x-0.5));
 
  g1=g1..(x,y);
 
  g2=g2..(x,1.3y);
 
}
 
draw(g1,defaultpen+1.3);
 
draw(g2,defaultpen+1.3);
 
  
label("$\scriptstyle \xi(x)$",(0.5,0.4));
+
==Sinusoidal spiral==
label("$\scriptstyle g'(x)$",(0.8,1.3));
 
  
add ( whole, shift(60,0)*scale(40)*currentpicture );
+
<center><asy>
erase();
+
import graph;
 +
size (200);
  
label(whole,"\small Fig. a2: Characterizing function obtained from a gray intensity ",(30,-20));
+
real r = 2.3;
 +
real m = 4;
  
shipout(scale(1.2)*whole);
+
real eps=10.^(-10);
 +
for  (int k=0; k<m; ++k) {
 +
  draw ( polargraph(  new real(real x) {return cos(m*x)^(1/m);}, -(pi/2m)+eps+k*2pi/m, (pi/2m)-eps+k*2pi/m ),
 +
defaultpen+1.5 );
 +
  draw ( -r*expi(-pi/2m+k*2pi/m)..r*expi(-pi/2m+k*2pi/m), dashed );
 +
  draw ( -r*expi(pi/2m+k*2pi/m)..r*expi(pi/2m+k*2pi/m), dashed );
 +
}
 +
label( "$m=4$", (0.58,0.02), fontsize(7pt) );
  
 +
real eps=10.^(-2);
 +
for  (int k=0; k<m; ++k) {
 +
  draw ( polargraph(  new real(real x) {return cos(m*x)^(-1/m);}, -(pi/2m)+eps+k*2pi/m, (pi/2m)-eps+k*2pi/m ),
 +
defaultpen+1.5 );
 +
}
 +
label( "$m=-4$", (1.55,0.02), fontsize(7pt) );
 +
 +
label( "sinusoidal spiral: $a=1$", (0,2.3) );
 +
draw ( unitcircle, dashed );
 
</asy></center>
 
</asy></center>
  
 +
==Power function==
  
 
<center><asy>
 
<center><asy>
 +
import graph;
 +
picture whole;
 +
 +
real sc=0.8;
 +
 +
draw ( graph( new real(real x) {return x;}, -2, 2), red+1.2, "$y=x$" );
 +
draw ( graph( new real(real x) {return 2x;}, -1, 1), blue+1.2, "$y=2x$" );
 +
draw ( graph( new real(real x) {return x/2;}, -2, 2), green+1.2, "$y=x/2$" );
 +
 +
xaxis(-2.1,2.1, LeftTicks(Label(fontsize(8pt)),Step=1,step=0.2,Size=2,size=1,NoZero));
 +
yaxis(-2,2, RightTicks(Label(fontsize(8pt)),Step=0.5,step=0.1,Size=2,size=1,NoZero));
 +
labelx("$x$",(2.3,0.25));
 +
labely("$y$",(0.15,2.3));
  
picture whole;
+
add(scale(0.72sc,1.2sc)*legend(),(0.5,-0.75));
picture common;
 
  
draw ((-0.3,0)--(1.6,0),Arrow);
+
real mrg=1.3;
draw ((0,-0.2)--(0,1.3),Arrow);
+
draw( scale(mrg)*box((-2,-2),(2,2)), white );
draw((-0.2,1)--(1.5,1));
 
label("$x$",(1.6,0),E);
 
label("$\xi(x)$",(0,1.3),N);
 
label("$1$",(-0.2,1),W);
 
  
add ( common, currentpicture );
+
add (whole,shift(-sc*230,0)*currentpicture.fit(sc*mrg*6.5cm));
 
erase();
 
erase();
  
add ( currentpicture, common );
 
dot ((1,1),currentpen+5);
 
draw((1,0)--(1,1),dashed);
 
draw((-0.2,0)--(1.2,0),currentpen+1.5);
 
filldraw( shift(1,0)*scale(0.06)*unitcircle, white );
 
label("$x_0$",(1,0),S);
 
  
add ( whole, shift(-120,0)*scale(40)*currentpicture );
+
draw ( graph( new real(real x) {return 1/x;}, -4, -0.25), red+1.2, "$y=1/x$" );
 +
draw ( graph( new real(real x) {return 1/x;}, 0.25, 4), red+1.2 );
 +
draw ( graph( new real(real x) {return 2/x;}, -4, -0.5), blue+1.2, "$y=2/x$" );
 +
draw ( graph( new real(real x) {return 2/x;}, 0.5, 4), blue+1.2 );
 +
draw ( graph( new real(real x) {return 1/(2x);}, -4, -0.125), green+1.2, "$y=1/(2x)$" );
 +
draw ( graph( new real(real x) {return 1/(2x);}, 0.125, 4), green+1.2 );
 +
 
 +
xaxis(-4.2,4.2, LeftTicks(Label(fontsize(8pt)),Step=2,step=0.5,Size=2,size=1,NoZero));
 +
yaxis(-4,4, RightTicks(Label(fontsize(8pt)),Step=1,step=0.2,Size=2,size=1,NoZero));
 +
labelx("$x$",(4.6,0.5));
 +
labely("$y$",(0.3,4.6));
 +
 
 +
add(scale(0.75sc,0.75sc)*legend(),(0.95,-1.2));
 +
 
 +
real mrg=1.3;
 +
draw( scale(mrg)*box((-4,-4),(4,4)), white );
 +
 
 +
add (whole,shift(0,0)*currentpicture.fit(sc*mrg*6.5cm,mrg*6.5cm,false));
 
erase();
 
erase();
  
add ( currentpicture, common );
 
dot ((0.4,1),currentpen+5);
 
dot ((1,1),currentpen+5);
 
draw((0.4,0)--(0.4,1),dashed);
 
draw((1,0)--(1,1),dashed);
 
draw((-0.2,0)--(0.4,0),currentpen+1.5);
 
draw((1,0)--(1.3,0),currentpen+1.5);
 
draw((0.4,1)--(1,1),currentpen+1.5);
 
filldraw( shift(0.4,0)*scale(0.06)*unitcircle, white );
 
filldraw( shift(1,0)*scale(0.06)*unitcircle, white );
 
label("$a$",(0.4,0),S);
 
label("$b$",(1,0),S);
 
  
add ( whole, shift(0,0)*scale(40)*currentpicture );
+
draw ( graph( new real(real x) {return x^3;}, -4^(1/3), 4^(1/3)), red+1.2, "$y=x^3$" );
erase();
+
draw ( graph( new real(real x) {return x^2;}, -2, 2), blue+1.2, "$y=x^2$" );
 +
draw ( graph( new real(real x) {return sqrt(x);}, 0, 4), green+1.2, "$y=x^{1/2}$" );
 +
draw ( graph( new real(real x) {return -sqrt(x);}, 0, 4), green+1.2 );
 +
 
 +
xaxis(-4.2,4.2, LeftTicks(Label(fontsize(8pt)),Step=2,step=0.5,Size=2,size=1,NoZero));
 +
yaxis(-4,4, RightTicks(Label(fontsize(8pt)),Step=1,step=0.2,Size=2,size=1,NoZero));
 +
labelx("$x$",(4.6,0.5));
 +
labely("$y$",(0.3,4.6));
 +
 
 +
add(scale(0.5sc,0.75sc)*legend(),(0.6,-2.5));
  
add ( currentpicture, common );
+
real mrg=1.3;
draw((-0.2,0)--(0.3,0)--(0.5,1)--(0.7,1)--(1,0)--(1.3,0),currentpen+1.5);
+
draw( scale(mrg)*box((-4,-4),(4,4)), white );
  
label(whole,"Fig. a1:  Some characterizing functions",(30,-25));
+
add (whole,shift(sc*230,0)*currentpicture.fit(sc*mrg*6.5cm,mrg*6.5cm,false));
add ( whole, shift(120,0)*scale(40)*currentpicture );
 
 
erase();
 
erase();
  
shipout(scale(1.2)*whole);
+
shipout(whole);
 
</asy></center>
 
</asy></center>
 +
 +
==Kolmogorov test==
  
 
<center><asy>
 
<center><asy>
picture whole;
 
  
int N=3;
+
srand(2014011);
int M=30;
+
 
real c=0.6;
+
import stats;
 +
 
 +
int size = 13;
 +
real [] sample = new real[size+1];
 +
real lambda = 1.3/size;
 +
real width = 2.0;
 +
 
 +
for (int k=0; k<size; ++k) {
 +
  sample[k] = Gaussrand();
 +
}
 +
sample[size] = 10;
 +
 
 +
sample = sort(sample);
  
draw (arc((0,0),1,-90,90),defaultpen+2 );
+
// for (real x : sample ) {
 +
//  write(x);
 +
// }
  
guide g;
+
real x0 = -10;
for (int k=-M*N+1; k<M*N; ++k) {
+
int k = 0;
   real y=k/(M*N);
+
for (real x : sample ) {
   pair z=(sqrt(1-y^2),y);
+
   filldraw( box( (x0,k/size-lambda), (x,k/size+lambda) ), rgb(0.8,0.8,0.8) );
   pair w=(3z-z^3)/4;
+
   draw( (x0,k/size-lambda)..(x,k/size-lambda), currentpen+1.5 );
  g=g..w;
+
   draw( (x0,k/size)..(x,k/size), currentpen+1.5 );
  if (k%M==0) {
+
  draw( (x0,k/size+lambda)..(x,k/size+lambda), currentpen+1.5 );
    draw((-0.5,y)--z);
+
  k += 1;
    draw((-0.5,y)--(-0.1,y),Arrow);
+
  x0 = x;
    draw(z--z-c*z^2);
+
  draw( (x,(k-1)/size-lambda)..(x,k/size+lambda) );
    draw(z--z-0.3c*z^2,Arrow);
 
  }
 
 
}
 
}
draw(g,defaultpen+1.3);
 
  
add ( whole, shift(-120,0)*scale(60)*currentpicture );
+
clip( box((-width,-0.005),(width,1.005)) );
erase();
+
 
 +
draw ((-width,0)--(width,0),Arrow);
 +
draw ((0,-0.1)--(0,1.3),Arrow);
 +
draw ((-width,1)--(width,1));
 +
 
 +
draw ((sample[2],0)..(sample[2],2/size));
 +
draw ((sample[size-1],0)..(sample[size-1],0.48), dashed);
 +
draw ((sample[size-1],0.7)..(sample[size-1],1-1/size), dashed);
 +
 
 +
label("$x$",(width,0),S);
 +
label("$y$",(0,1.3),W);
 +
label("$0$",(0,0),SW);
 +
label("$1$",(0,1),NE);
 +
 
 +
label("$X_{(1)}$",(sample[0],0),S);
 +
label("$X_{(2)}$",(sample[1],0),S);
 +
label("$X_{(3)}$",(sample[2],0),S);
 +
label("$X_{(n)}$",(sample[size-1],0),S);
 +
 
 +
label("$F_n(x)+\lambda_n(\alpha)$",(-1.55,0.35));
 +
draw ((-1.35,0.25)..(-1.2,1/size+lambda));
 +
dot((-1.2,1/size+lambda));
 +
 
 +
label("$F_n(x)$",(0.4,0.3));
 +
draw ((0.4,0.4)..(0.3,8/size));
 +
dot((0.3,8/size));
  
 +
label("$F_n(x)-\lambda_n(\alpha)$",(1.5,0.6));
 +
draw ((1.6,0.7)..(1.7,1-lambda));
 +
dot((1.7,1-lambda));
  
real n=1.3;
+
shipout(scale(100,100)*currentpicture);
 +
</asy></center>
  
int N=7;
+
==Golden ratio==
int M=10;
 
  
real c1=1.2;
+
Strangely, the figure in EoM is erroneous! ED=EB, not BD=EB.
real c2=0.6;
 
  
draw ((-1.4,0)--(1.4,0),defaultpen+2);
+
<center><asy>
  
guide g;
+
pair A=(-1,0);
for (int k=-M*N+1; k<M*N; ++k) {
+
pair B=(0,0);
  real a=0.5*pi*k/(M*N);
+
pair E=(0,0.5);
  real s=sin(a);
+
pair C=A+(0.5*(sqrt(5)-1),0);
  real t=tan(a);
+
pair D=(-1/sqrt(5), 0.5*(1-1/sqrt(5)));
  real x=(n^2-1)*t^3;
+
 
  if (n*abs(s)>=1) { continue; }
+
draw( A--B--E--cycle,currentpen+1.5 );
  real aux=(1-(n*s)^2)/(1-s^2);
+
dot(A,currentpen+3.5); dot(B,currentpen+3.5); dot(E,currentpen+3.5); dot(C,currentpen+3.5); dot(D,currentpen+3.5);
  real y=-aux^1.5/n;
 
  g=g..(x,y);
 
  if (k%M==0) {
 
    draw((0,-1)--(t,0),Arrow(Relative(0.9)));
 
    draw((t,0)--(t,0)+c1*((x,y)-(t,0)),dashed);
 
    draw((t,0)--(t,0)+c2*((t,0)-(x,y)),Arrow(6,Relative(0.8)));
 
  }
 
}
 
draw(g,defaultpen+1.3);
 
  
dot((0,-1));  dot((0,-1/n));
+
draw( shift(E)*scale(0.5)*unitcircle,currentpen+1 );
label("$A$",(0,-1),W);
+
draw( shift(A)*scale(0.5*(sqrt(5)-1))*unitcircle,currentpen+1 );
label("$A'$",(0,-1/n),W);
 
  
add ( whole, shift(120,20)*scale(80)*currentpicture );
+
draw( shift(B)*scale(0.5)*unitcircle, dashed+red );
  
 +
clip(A+(-0.15,-0.15)--B+(0.15,-0.15)--E+(0.15,0.15)--A+(-0.15,0.15)--cycle);
  
label(whole,"Fig. a",(-100,-80));
+
label("$A$",A,S); label("$B$",B,S); label("$C$",C,S);
label(whole,"Fig. b",(120,-80));
+
label("$E$",E,N); label("$D$",D,N);
  
 +
label( "\small Golden Ratio construction", (-0.5,0.8) );
  
shipout(whole);
+
shipout(scale(100)*currentpicture);
 
</asy></center>
 
</asy></center>
  

Latest revision as of 20:14, 12 December 2014

Experiments

Note a fine distinction from Ada:

I guess, the reason is that there Asy generates pdf file (converted into png afterwards), and here something else (probably ps).

No, it seems, it generates eps, both here and there. Then, what could be the reason?

More.


Mysterious.

Three dimensions


Sinusoid

Sinusoidal spiral

Power function

Kolmogorov test

Golden ratio

Strangely, the figure in EoM is erroneous! ED=EB, not BD=EB.





[Calculus: ] the art of numbering and measuring exactly a thing whose existence cannot be conceived. (Voltaire, Letter XVII: On Infinites In Geometry, And Sir Isaac Newton's Chronology)

And what are these fluxions? The velocities of evanescent increments? They are neither finite quantities, nor quantities infinitely small, nor yet nothing. May we not call them ghosts of departed quantities? (Berkeley, The Analyst)


WARNING: Asirra, the cat and dog CAPTCHA, is closing permanently on October 6, 2014. Please contact this site's administrator and ask them to switch to a different CAPTCHA. Thank you!

How to Cite This Entry:
Boris Tsirelson/sandbox2. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Boris_Tsirelson/sandbox2&oldid=34973