//Cindy-2.0-beta build 569 (2005/12/04 08:54)
//Created on: Dec 5, 2005 6:14:28 PM
//For: richter
//DO NOT EDIT --- MACHINE GENERATED CODE
Geometry:=Euclidean;
("B"):=FreePoint([0.0+i*-0.0,4.0+i*0.0,-0.5+i*-0.0]);
"B".setAppearance(2,2,1,0,0,9,false,true);
"B".setAttribute("color","2");
"B".setAttribute("visibility","9");
"B".setAttribute("drawtrace","false");
"B".setAttribute("tracelength","100");
"B".setAttribute("traceskip","1");
"B".setAttribute("tracedim","1.0");
"B".setAttribute("render","false");
"B".setAttribute("pinning","true");
"B".setAttribute("labeled","false");
"B".setAttribute("ptsize","2");
"B".setAttribute("pointborder","true");
"B".setLabelPos(3,3,1,false,0.0,0.2,1);
("C"):=FreePoint([4.0+i*0.0,-1.103448275862069+i*0.0,0.13793103448275862+i*0.0]);
"C".setAppearance(2,2,1,0,0,9,false,true);
"C".setAttribute("color","2");
"C".setAttribute("visibility","9");
"C".setAttribute("drawtrace","false");
"C".setAttribute("tracelength","100");
"C".setAttribute("traceskip","1");
"C".setAttribute("tracedim","1.0");
"C".setAttribute("render","false");
"C".setAttribute("pinning","true");
"C".setAttribute("labeled","false");
"C".setAttribute("ptsize","2");
"C".setAttribute("pointborder","true");
"C".setLabelPos(3,3,1,false,0.0,0.2,1);
("a"):=Segment("B","C");
"a".setAppearance(3,5,1,0,0,9,false,false);
"a".setArrowType(0,3,100,8);
"a".setAttribute("color","3");
"a".setAttribute("visibility","9");
"a".setAttribute("drawtrace","false");
"a".setAttribute("tracelength","100");
"a".setAttribute("traceskip","1");
"a".setAttribute("tracedim","1.0");
"a".setAttribute("render","false");
"a".setAttribute("labeled","false");
"a".setAttribute("linesize","1");
"a".setAttribute("overlap","0");
"a".setAttribute("clipline","0");
"a".setAttribute("linedashing","false");
"a".setAttribute("lineborder","false");
"a".setLabelPos(3,3,1,false,0.0,0.2,1);
"a".setArrowType(0,3,100,8);
("A"):=PointOnLine("a",[-1.22+i*0.0,4.0+i*0.0,-0.5+i*0.0]);
"A".setAppearance(2,5,1,0,0,9,false,false);
"A".setAttribute("color","2");
"A".setAttribute("visibility","9");
"A".setAttribute("drawtrace","false");
"A".setAttribute("tracelength","100");
"A".setAttribute("traceskip","1");
"A".setAttribute("tracedim","1.0");
"A".setAttribute("render","false");
"A".setAttribute("pinning","false");
"A".setAttribute("labeled","false");
"A".setAttribute("ptsize","5");
"A".setAttribute("pointborder","true");
"A".setLabelPos(3,3,1,false,0.0,0.2,1);
"A".setAlgData("TYPE",1);
"A".setAlgData("RATIO",0.08413793+i*-1.3877788E-17);
("D"):=FreePoint([4.0+i*0.0,0.055710306406685235+i*0.0,0.2785515320334262+i*0.0]);
"D".setAppearance(3,4,1,0,0,9,false,false);
"D".setAttribute("color","3");
"D".setAttribute("visibility","9");
"D".setAttribute("drawtrace","false");
"D".setAttribute("tracelength","100");
"D".setAttribute("traceskip","1");
"D".setAttribute("tracedim","1.0");
"D".setAttribute("render","false");
"D".setAttribute("pinning","false");
"D".setAttribute("labeled","false");
"D".setAttribute("ptsize","4");
"D".setAttribute("pointborder","true");
"D".setLabelPos(3,3,1,false,0.0,0.2,1);
("Text0"):=Text("A");
"Text0".setAppearance(1,5,1,0,0,9,true,false);
"Text0".setAttribute("color","1");
"Text0".setAttribute("visibility","9");
"Text0".setAttribute("drawtrace","false");
"Text0".setAttribute("tracelength","100");
"Text0".setAttribute("traceskip","1");
"Text0".setAttribute("tracedim","1.0");
"Text0".setAttribute("render","false");
"Text0".setAttribute("linesize","1");
"Text0".setAttribute("colorfill","5");
"Text0".setAttribute("visibilityfill","0");
"Text0".setAttribute("linkvisibility","false");
"Text0".setText("@$\"A\"");
"Text0".setDocking(1,0.5,10.0,-10.0,"A");
("Text1"):=Text("D");
"Text1".setAppearance(1,5,1,0,0,9,true,false);
"Text1".setAttribute("color","1");
"Text1".setAttribute("visibility","9");
"Text1".setAttribute("drawtrace","false");
"Text1".setAttribute("tracelength","100");
"Text1".setAttribute("traceskip","1");
"Text1".setAttribute("tracedim","1.0");
"Text1".setAttribute("render","false");
"Text1".setAttribute("linesize","1");
"Text1".setAttribute("colorfill","5");
"Text1".setAttribute("visibilityfill","0");
"Text1".setAttribute("linkvisibility","false");
"Text1".setText("@$\"D\"");
"Text1".setDocking(1,0.5,10.0,-10.0,"D");
Geometry:=Euclidean;
behavior {Environment();
          setParams(0.2,0.0,0.1);
          addToLevel(1);
         }
behavior {Motor();
          setParams(1.0,0.02,0.0);
          addToLevel(1);
         }
kernel.setAcc(1);
kernel.setFrames(1);
kernel.setSpeed(1.0);
kernel.newScript("Draw","draw");
kernel.appendScript("fak(x):=if(x==0,1,fak(x-1)*x);");
kernel.appendScript("fa=apply(1..110,fak(#));");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("n=round(A.x*2+1);");
kernel.appendScript("odd(x):=(x/2!=floor(x/2));");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("i=select(1..n,odd(#));");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("f(x):=sum(i,(-1)^((#-1)/2)*x^#/fa_#);");
kernel.appendScript("linesize(2);");
kernel.appendScript("plot(sin(#-D.x)+D.y,alpha->0.3,color->(0,0.6,0));");
kernel.appendScript("linesize(1);");
kernel.appendScript("plot(f(#-D.x)+D.y,pxlres->4,color->(0,0,0.6));");
kernel.appendScript("");
kernel.appendScript("forall(i,pos=#*0.8+1;posy=0;");
kernel.appendScript("if(#>33,pos=pos-20;posy=-3);");
kernel.appendScript("");
kernel.appendScript("textsize(14);");
kernel.appendScript("   drawtext((pos,5+posy),#+\"!\");");
kernel.appendScript("   draw(color->(0,0,0),(pos,5.6+posy),(pos+1,5.6+posy));");
kernel.appendScript("   drawtext((pos-0.5,5.4+posy),");
kernel.appendScript("            if(odd((#-1)/2),\"-\",\"+\"));");
kernel.appendScript("   drawtext((pos,5.8+posy),\"x\");");
kernel.appendScript("   textsize(10);");
kernel.appendScript("   drawtext((pos+0.4,6.2+posy),#);");
kernel.appendScript("");
kernel.appendScript(");");
kernel.appendScript("");
kernel.appendScript("textsize(20);");
kernel.appendScript("   drawtext((3,-5),\"Move A and watch the Taylor Expansion\");");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("   drawtext((3,-6),\"n=\"+n);");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("");
kernel.appendScript("");
kernel.setCompiler("de.cinderella.geometry.formula.CindyScriptCompiler");
kernel.endScript();
//Start portinfo
kernel.setBackgroundColor(168,176,192);
kernel.setBlackColor(0,0,0);
kernel.setHighlightColor(255,255,255);
port EuclideanPort() {
   setAttribute("imagescalemode","Center");
   setAttribute("imagealpha","1.0");
   setAttribute("image.filename","");
   setAttribute("show.adjacencymatrix","1");
   setAttribute("show.vertexqueue","");
   setAttribute("mesh.rectangular","false");
   setAttribute("mesh.triangular","false");
   setAttribute("axes.show","false");
   setAttribute("snap","false");
   setAttribute("mesh.density","0");
   setPolar(false);
   setPortWidth(729);
   setPortHeight(409);
   setScale(25.0);
   setOriginY(11);
   setOriginX(227);
   setMesh(false);
   setAxes(false);
   setSnap(false);
}
//End portinfo
