Ketinit(); Setketcindyjs(["Sc=1","Label=[]","Color=offwhite"]); Ketcindyjsmain(["_;_;2次曲線の変形"],[ "_;離心率$e$を変えると,楕円,放物線,双曲線が現れる." ]); Seteditable(30,["","Size=18","Width=50"]); //import("Graph1.txt"); ////////// 入力窓の設定 ////////// str0="0.8"; //no ketjs //str0=Textedit(30); //only ketjs ////////// xy座標の設定 ////////// Setwindow([-10,10],[-10,10]); Addax(0); Drwxy(); Htickmark([XMIN,text(XMIN),XMAX,text(XMAX)]); Vtickmark([YMIN,text(YMIN),YMAX,text(YMAX)]); ////////// 問題文の設定 ////////// Letter([2,10],"e","離心率$e=$",["Size=1.2"]); Expr([8,10],"e","(>0)",["Size=1.2"]); ////////// グラフの設定 ////////// blue="Color=blue"; red="Color=red"; Pointdata("f1",[4,0],["Size=5",blue]); Pointdata("f2",[-4,0],["Size=5",blue]); F1=ptf1_1; F2=ptf2_1; Expr([F1,"n","\mathrm{F}",F2,"n","\mathrm{F}'"],["Size=1.2"]); Listplot("1",[[0,YMIN],[0,YMAX]],[blue]); Expr([0,YMIN],"s","\ell",["Size=1.2"]); e=parse(str0); Defvar("e",e); Implicitplot("1","sqrt((x-4)^2+y^2)="+str0+"*x","x=[XMIN,XMAX]","y=[YMIN,YMAX]",["dr,1.5","Num=200"]); y0=4*e; Defvar(["y0",y0]); Pointdata("p1",[4,y0],["Size=5"]); P1=ptp1_1; Letter(P1,"nw","P$(x,y)$"); Pointdata("h",[0,y0],["Size=5",blue]); H=pth_1; Letter(H,"nw","H"); Listplot("b1",[F1,P1,H],[blue]); Listplot("para1",[H+[0,-0.5],H+[0.5,-0.5],H+[0.5,0]],[blue]); Expr([(P1+H)/2,"n","1",(F1+P1)/2,"e","e"],[blue]); if((parse(str0)>0.6)&(parse(str0)<1), Letter([10,8],"n","楕円",["Size=1.2",red]); ); if(parse(str0)==1, Letter([10,8],"n","放物線",["Size=1.2",red]); ); if(parse(str0)>1, Implicitplot("2","-sqrt((x+4)^2+y^2)="+str0+"*x","x=[XMIN,XMAX]","y=[YMIN,YMAX]",["dr,1.5","Num=200"]); Pointdata("p2",[-4,y0],["Size=5"]); P2=ptp2_1; Listplot("b2",[F2,P2,H],[blue]); ); Htickmark([-4,"-4",4,"4"]); Windispg();