Ellipsograph (Trammel of Archimedes) Interactive Demo
2019-05-29 03:59
This applet demonstrates the Trammel of Archimedes. Users can adjust segment AB and point P via sliders, drawing the ellipse locus by dragging endpoints or using animation. It displays major and minor axis lengths in real-time, offering intuitive exploration of parametric equations and ellipse generation for coordinate geometry.
In collections
Conic Sections | GeoGebra Book Collection
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.539.0" app="classic" platform="d" id="76f8c8b1-075a-4378-8018-b7fded5a1cd7" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="899" height="892" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.457174638487208" orientation="1" />
</panes>
<views>
<view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1,1" size="400" window="613,245,695,550" />
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="false" inframe="false" stylebar="false" location="1,1,1" size="500" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="false" location="1,1" size="300" window="100,100,600,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="false" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />
<view id="1" visible="true" inframe="false" stylebar="true" location="1" size="872" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="false" location="3" size="411" window="100,100,600,400" />
<view id="16" visible="false" inframe="false" stylebar="false" location="1" size="300" window="50,50,500,500" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
</views>
<toolbar show="true" items="0 39 73 62 | 1 501 67 , 5 19 , 72 75 76 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 14 68 | 30 29 54 32 31 33 | 25 17 26 60 52 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />
<input show="true" cmd="true" top="algebra" />
<dockBar show="true" east="true" />
</perspective>
</perspectives>
<labelingStyle val="2"/>
<font size="20"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="872" height="676"/>
<coordSystem xZero="555.0515124138589" yZero="373.01489090171543" scale="22.09826926038314" yscale="22.09826926038321"/>
<evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="3"/>
<bgColor r="32" g="32" b="32"/>
<axesColor r="255" g="255" b="255"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<algebraView>
<mode val="1"/>
</algebraView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="0" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<tableview min="-2.0" max="2.0" step="1.0"/>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<element type="boolean" label="b">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="43" y="218"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="BB"/>
</element>
<element type="boolean" label="a">
<value val="true"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="41" y="171"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="AA"/>
</element>
<element type="numeric" label="r">
<value val="6.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="2"/>
<slider min="-5" max="20" absoluteScreenLocation="true" width="200.0" x="65.0" y="188.0" fixed="false" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation speed="1" type="0" playing="false"/>
</element>
<command name="Segment">
<input a0="(0, r)" a1="(0, (-r))"/>
<output a0="s_y"/>
</command>
<element type="segment" label="s_y">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="12.0" y="0.0" z="-0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Point">
<input a0="s_y"/>
<output a0="B"/>
</command>
<element type="point" label="B">
<show object="true" label="false" ev="4"/>
<condition showObject="¬a"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<animation step="0.2" speed="2.5 - (2.3 * (Distance[B, (0, 0)] / r)^(2))" type="0" playing="true"/>
<ggbscript onUpdate="If(y(B)<=-r,SetValue[b,true])
If(y(B)>=r,SetValue[b,false])"/>
<coords x="0.0" y="-5.862618915363472" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Circle">
<input a0="B" a1="r"/>
<output a0="e_1"/>
</command>
<element type="conic" label="e_1">
<show object="false" label="false" ev="4"/>
<objColor r="192" g="192" b="192" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="-1.629699453222429" A3="0.0" A4="-0.0" A5="5.862618915363472"/>
<eqnStyle style="specific"/>
</element>
<command name="Intersect">
<input a0="e_1" a1="xAxis"/>
<output a0="A_2" a1="A_1"/>
</command>
<element type="point" label="A_2">
<show object="true" label="false" ev="4"/>
<condition showObject="(¬a) ∧ b"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<ggbscript val="If(y(B)<0,SetValue[bb,false])
If(y(B)>0,SetValue[bb,true])
SetValue[a,true]
SetValue[A,A_2]
SetValue[P_A,P_B]"/>
<coords x="-1.2765968248520865" y="0.0" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="point" label="A_1">
<show object="true" label="false" ev="4"/>
<condition showObject="(¬a) ∧ (¬b)"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<ggbscript val="If(y(B)<0,SetValue[bb,false])
If(y(B)>0,SetValue[bb,true])
SetValue[a,true]
SetValue[A,A_1]
SetValue[P_A,P_B]"/>
<coords x="1.2765968248520867" y="-0.0" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="(r, 0)" a1="((-r), 0)"/>
<output a0="s_x"/>
</command>
<element type="segment" label="s_x">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0.0" y="-12.0" z="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Point">
<input a0="s_x"/>
<output a0="A"/>
</command>
<element type="point" label="A">
<show object="true" label="false" ev="4"/>
<condition showObject="a ≠ 0"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<animation step="0.2" speed="2.5 - (2.3 * (Distance[A, (0, 0)] / r)^(2))" type="0" playing="true"/>
<ggbscript onUpdate="If(x(A)<=-r,SetValue[bb,true])
If(x(A)>=r,SetValue[bb,false])
"/>
<coords x="-2.7367179634659813" y="0.0" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="If">
<input a0="a" a1="A" a2="If[b, A_2, A_1]"/>
<output a0="NowA"/>
</command>
<element type="point" label="NowA">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-2.7367179634659813" y="0.0" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="boolean" label="rfa">
<value val="true"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="68" y="360"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="RF"/>
</element>
<element type="boolean" label="bb">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="42" y="260"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="CC"/>
</element>
<command name="Circle">
<input a0="A" a1="r"/>
<output a0="c"/>
</command>
<element type="conic" label="c">
<show object="false" label="false" ev="4"/>
<objColor r="192" g="192" b="192" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="-28.51037478844261" A3="0.0" A4="2.7367179634659813" A5="-0.0"/>
<eqnStyle style="specific"/>
</element>
<command name="Intersect">
<input a0="c" a1="yAxis"/>
<output a0="B_2" a1="B_1"/>
</command>
<element type="point" label="B_2">
<show object="false" label="false" ev="4"/>
<condition showObject="a ∧ (¬bb)"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<ggbscript val="If(x(A)>0,SetValue[b,false])
If(x(A)<0,SetValue[b,true])
SetValue[a,false]
SetValue[B,B_2]
SetValue[P_B,P_A]"/>
<coords x="0.0" y="-5.3395107255667735" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="point" label="B_1">
<show object="true" label="false" ev="4"/>
<condition showObject="a ≠ 0 ∧ bb"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<ggbscript val="If(x(A)>0,SetValue[b,false])
If(x(A)<0,SetValue[b,true])
SetValue[a,false]
SetValue[B,B_1]
SetValue[P_B,P_A]"/>
<coords x="0.0" y="5.3395107255667735" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="numeric" label="pb">
<value val="12.843566463496051"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="2"/>
<animation speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="ap">
<value val="6.843566463496052"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="2"/>
<animation speed="1" type="0" playing="false"/>
</element>
<command name="If">
<input a0="bb" a1="Segment[A, B_1]" a2="Segment[A, B_2]"/>
<output a0="f"/>
</command>
<element type="segment" label="f">
<show object="false" label="false" ev="4"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="5.3395107255667735" y="2.7367179634659813" z="14.612734918777864"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="If">
<input a0="b" a1="Segment[B, A_2]" a2="Segment[B, A_1]"/>
<output a0="g"/>
</command>
<element type="segment" label="g">
<show object="false" label="false" ev="4"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="-5.862618915363472" y="1.2765968248520867" z="7.484200692670792"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="text1" exp=""P""/>
<element type="text" label="text1">
<show object="true" label="false" ev="40"/>
<condition showObject="¬a"/>
<objColor r="255" g="192" b="203" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="1"/>
<startPoint exp="P_B"/>
<labelOffset x="-8" y="-40"/>
</element>
<expression label="text2" exp=""P""/>
<element type="text" label="text2">
<show object="true" label="false" ev="40"/>
<condition showObject="a ≠ 0"/>
<objColor r="255" g="192" b="203" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="1"/>
<startPoint exp="P_A"/>
<labelOffset x="-8" y="-40"/>
</element>
<expression label="text3" exp=""A""/>
<element type="text" label="text3">
<show object="true" label="false" ev="40"/>
<condition showObject="a ≠ 0"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="A"/>
</element>
<expression label="text4" exp=""A""/>
<element type="text" label="text4">
<show object="true" label="false" ev="40"/>
<condition showObject="(¬a) ∧ b"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="A_2"/>
</element>
<expression label="text5" exp=""A""/>
<element type="text" label="text5">
<show object="true" label="false" ev="40"/>
<condition showObject="(¬a) ∧ (¬b)"/>
<objColor r="0" g="255" b="255" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="A_1"/>
</element>
<expression label="text6" exp=""B""/>
<element type="text" label="text6">
<show object="true" label="false" ev="40"/>
<condition showObject="a ≠ 0 ∧ bb"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="B_1"/>
<labelOffset x="9" y="-15"/>
</element>
<expression label="text7" exp=""B""/>
<element type="text" label="text7">
<show object="true" label="false" ev="40"/>
<condition showObject="¬a"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="B"/>
<labelOffset x="9" y="-15"/>
</element>
<element type="boolean" label="i">
<value val="false"/>
<show object="true" label="true"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="13" y="47"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="畫圖paint"/>
</element>
<expression label="text8" exp=""B""/>
<element type="text" label="text8">
<show object="true" label="false" ev="40"/>
<condition showObject="a ∧ (¬bb)"/>
<objColor r="0" g="255" b="0" alpha="0.0"/>
<layer val="2"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.0" size="0" style="0"/>
<startPoint exp="B_2"/>
<labelOffset x="9" y="-15"/>
</element>
<element type="boolean" label="k">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="149" y="62"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="調整"/>
</element>
<element type="numeric" label="rr">
<value val="6.0"/>
<show object="true" label="true"/>
<condition showObject="m ≠ 0"/>
<objColor r="102" g="204" b="255" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="2"/>
<slider min="0" max="20" absoluteScreenLocation="true" width="150.0" x="17.0" y="197.0" fixed="false" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation speed="1" type="0" playing="false"/>
</element>
<command name="Textfield">
<input a0="rr"/>
<output a0="inputBox1"/>
</command>
<element type="textfield" label="inputBox1">
<show object="true" label="true"/>
<condition showObject="m ≠ 0"/>
<objColor r="102" g="204" b="255" alpha="1.0"/>
<bgColor r="64" g="64" b="64" alpha="255"/>
<layer val="0"/>
<labelOffset x="19" y="115"/>
<labelMode val="3"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<ggbscript onUpdate="If(rr>0,SetValue[r,rr])"/>
<font serif="false" sizeM="1.4" size="8" style="0"/>
<linkedGeo exp="rr"/>
<length val="3"/>
<caption val="AB距離Distance(A,B)="/>
</element>
<element type="boolean" label="m">
<value val="false"/>
<show object="true" label="true"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="13" y="80"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="線段AB segment"/>
</element>
<command name="If">
<input a0="bb" a1="If[rfa, Ray[B_1, A], Ray[A, B_1]]" a2="If[rfa, Ray[B_2, A], Ray[A, B_2]]"/>
<output a0="ff"/>
</command>
<element type="ray" label="ff">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-5.3395107255667735" y="-2.7367179634659813" z="-14.612734918777864"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Point">
<input a0="ff"/>
<output a0="P_A"/>
</command>
<element type="point" label="P_A">
<show object="true" label="false" ev="4"/>
<condition showObject="a ≠ 0"/>
<objColor r="255" g="192" b="203" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<ggbscript onUpdate="If(a&&bb,SetValue[pb,Distance(P_A,B_1)])
If(a&&!bb,SetValue[pb,Distance(P_A,B_2)])
If(a,SetValue[ap,Distance(P_A,A)])
If(Distance(P_A,A)<0.1 r,SetValue[P_{A1},P_A])
If(Distance(P_A,A)<0.1 r,SetValue[rfa,true])
If(P_{A1}==A,SetValue[P_A,P_{A1}])
If(Distance(P_A,B_1)<0.1 r&&bb,SetValue[rfa,false])
If(Distance(P_A,B_2)<0.1 r&&!bb,SetValue[rfa,false])
"/>
<coords x="-5.858203175936483" y="6.090216088827708" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="P_{A1}">
<show object="false" label="false" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="5.678660518567422" y="0.22002756120046515" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="boolean" label="rgb">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="68" y="398"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
<caption val="RG"/>
</element>
<command name="If">
<input a0="b" a1="If[rgb, Ray[A_2, B], Ray[B, A_2]]" a2="If[rgb, Ray[A_1, B], Ray[B, A_1]]"/>
<output a0="gg"/>
</command>
<element type="ray" label="gg">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-5.862618915363472" y="1.2765968248520867" z="7.484200692670792"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Point">
<input a0="gg"/>
<output a0="P_B"/>
</command>
<element type="point" label="P_B">
<show object="false" label="false" ev="4"/>
<condition showObject="¬a"/>
<objColor r="255" g="192" b="203" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<ggbscript onUpdate="If(!a&&b,SetValue[ap,Distance(P_B,A_2)])
If(!a&&!b,SetValue[ap,Distance(P_B,A_1)])
If(!a,SetValue[pb,Distance(P_B,B)])
If(Distance(P_B,B)<0.1 r,SetValue[P_{B1},P_B])
If(Distance(P_B,B)<0.1 r,SetValue[rgb,true])
If(P_{B1}==B,SetValue[P_B,P_{B1}])
If(Distance(P_B,A_1)<0.1 r&&!b,SetValue[rgb,false])
If(Distance(P_B,A_2)<0.1 r&&b,SetValue[rgb,false])"/>
<coords x="2.7326760278459674" y="6.686870366239843" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="P_{B1}">
<show object="false" label="false"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="-0.3597798887518399" y="-4.053102856830642" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Circle">
<input a0="If[a, If[bb, B_1, B_2], B]" a1="pb"/>
<output a0="h"/>
</command>
<element type="conic" label="h">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="-136.44682471379784" A3="0.0" A4="-0.0" A5="5.3395107255667735"/>
<eqnStyle style="specific"/>
</element>
<command name="Circle">
<input a0="If[a, A, If[b, A_2, A_1]]" a1="ap"/>
<output a0="d"/>
</command>
<element type="conic" label="d">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="-39.34477672873047" A3="0.0" A4="2.7367179634659813" A5="-0.0"/>
<eqnStyle style="specific"/>
</element>
<command name="Polygon">
<input a0="{NowA + (1.2, 0.4), NowA + (-1.2, 0.4), NowA + (-1.2, -0.4), NowA + (1.2, -0.4)}"/>
<output a0="qa"/>
</command>
<element type="polygon" label="qa">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="153" g="51" b="0" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Intersect">
<input a0="d" a1="h"/>
<output a0="NowP" a1="NowP_1" a2="" a3=""/>
</command>
<element type="point" label="NowP">
<show object="false" label="false" ev="4"/>
<condition showObject="i ≠ 0"/>
<objColor r="255" g="192" b="203" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<trace val="true"/>
<coords x="-5.85820317593648" y="6.090216088827705" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="point" label="NowP_1">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-5.85820317593648" y="6.090216088827705" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<command name="If">
<input a0="¬a" a1="B" a2="If[bb, B_1, B_2]"/>
<output a0="NowB"/>
</command>
<element type="point" label="NowB">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="0.0" y="-5.3395107255667735" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="{NowB + (0.4, 1.2), NowB + (-0.4, 1.2), NowB + (-0.4, -1.2), NowB + (0.4, -1.2)}"/>
<output a0="qb"/>
</command>
<element type="polygon" label="qb">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="153" g="51" b="0" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="Polygon">
<input a0="{(0.46, 0.46), ((1.1 * r), 0.46), ((1.1 * r), 1.35), (1.35, 1.35), (1.35, (1.1 * r)), (0.46, (1.1 * r))}"/>
<output a0="q1"/>
</command>
<element type="polygon" label="q1">
<lineStyle thickness="2" type="20" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="192" g="192" b="192" alpha="0.8500000238418579"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Polygon">
<input a0="{(-0.46, 0.46), ((-1.1 * r), 0.46), ((-1.1 * r), 1.35), (-1.35, 1.35), (-1.35, (1.1 * r)), (-0.46, (1.1 * r))}"/>
<output a0="q2"/>
</command>
<element type="polygon" label="q2">
<lineStyle thickness="2" type="20" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="192" g="192" b="192" alpha="0.8500000238418579"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="Polygon">
<input a0="{(-0.46, -0.46), ((-1.1 * r), -0.46), ((-1.1 * r), -1.35), (-1.35, -1.35), (-1.35, (-1.1 * r)), (-0.46, (-1.1 * r))}"/>
<output a0="q3"/>
</command>
<element type="polygon" label="q3">
<lineStyle thickness="2" type="20" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="192" g="192" b="192" alpha="0.8500000238418579"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="Polygon">
<input a0="{(0.46, -0.46), ((1.1 * r), -0.46), ((1.1 * r), -1.35), (1.35, -1.35), (1.35, (-1.1 * r)), (0.46, (-1.1 * r))}"/>
<output a0="q4"/>
</command>
<element type="polygon" label="q4">
<lineStyle thickness="2" type="20" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="j ≠ 0"/>
<objColor r="192" g="192" b="192" alpha="0.8500000238418579"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="If">
<input a0="a" a1="ff" a2="gg"/>
<output a0="NowL"/>
</command>
<element type="ray" label="NowL">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-5.3395107255667735" y="-2.7367179634659813" z="-14.612734918777864"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="VA" exp="(Vector[NowB, NowA] / Distance[NowA, NowB] * 0.5)" type="vector" />
<element type="vector" label="VA">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-0.22805983028883178" y="0.44495922713056446" z="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Intersect">
<input a0="Circle[(0, 0), 0.36]" a1="OrthogonalLine[(0, 0), VA]"/>
<output a0="V_1" a1="V"/>
</command>
<element type="point" label="V_1">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="0.3203706435340064" y="0.16420307780795887" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<element type="point" label="V">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-0.3203706435340064" y="-0.16420307780795887" z="1.0"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<command name="Vector">
<input a0="(0, 0)" a1="V"/>
<output a0="VV"/>
</command>
<element type="vector" label="VV">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<coords x="-0.3203706435340064" y="-0.16420307780795887" z="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
<startPoint x="0.0" y="0.0" z="1.0"/>
</element>
<command name="Polygon">
<input a0="{If[r + pb ≟ ap, NowP, NowB] - VA + VV, If[r + pb ≟ ap, NowP, NowB] - VA - VV, If[r + ap ≟ pb, NowP, NowA] + VA - VV, If[r + ap ≟ pb, NowP, NowA] + VA + VV}"/>
<output a0="qs"/>
</command>
<element type="polygon" label="qs">
<lineStyle thickness="2" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="4"/>
<objColor r="102" g="51" b="0" alpha="0.949999988079071"/>
<layer val="1"/>
<labelOffset x="-79" y="13"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="Circle">
<input a0="If[r + pb ≟ ap, NowP, NowB] - VA" a1="0.36"/>
<output a0="cb"/>
</command>
<element type="conic" label="cb">
<show object="true" label="false" ev="4"/>
<objColor r="102" g="51" b="0" alpha="0.949999988079071"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="1" type="0" typeHidden="1" opacity="0"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="33.38250391984971" A3="0.0" A4="-0.22805983028883178" A5="5.7844699526973375"/>
<eqnStyle style="specific"/>
</element>
<command name="Circle">
<input a0="If[r + ap ≟ pb, NowP, NowA] + VA" a1="0.36"/>
<output a0="ca"/>
</command>
<element type="conic" label="ca">
<show object="true" label="false" ev="4"/>
<objColor r="102" g="51" b="0" alpha="0.949999988079071"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="1" type="0" typeHidden="1" opacity="0"/>
<eigenvectors x0="1.0" y0="0.0" z0="1.0" x1="-0.0" y1="1.0" z1="1.0"/>
<matrix A0="1.0" A1="1.0" A2="79.62151379125703" A3="0.0" A4="6.086263006225312" A5="-6.53517531595827"/>
<eqnStyle style="specific"/>
</element>
<element type="boolean" label="j">
<value val="true"/>
<show object="true" label="true"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="142" y="48"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="橢圓規軌道Track of Ellipsograph"/>
</element>
<element type="boolean" label="info">
<value val="false"/>
<show object="true" label="true"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="201" y="80"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="橢圓資訊Information"/>
</element>
<element type="boolean" label="ani">
<value val="false"/>
<show object="true" label="true"/>
<objColor r="255" g="255" b="255" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="13" y="15"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<ggbscript onUpdate="If(!ani,StartAnimation[false])
If(ani&&a,StartAnimation[A,true])
If(ani&&!a,StartAnimation[B,true])"/>
<caption val="動畫開始AnimationStart"/>
</element>
<expression label="text10" exp=""短軸長\text{minor axis}:" + (LaTeX[(2 * If[r + ap ≟ pb, ap, If[ap + pb ≟ r, If[ap ≤ pb, ap, pb], pb]])]) + """ />
<element type="text" label="text10">
<show object="true" label="false" ev="8"/>
<condition showObject="info ∧ NowA ≠ NowP ∧ NowB ≠ NowP"/>
<objColor r="255" g="255" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.85" size="-3" style="0"/>
<absoluteScreenLocation x="168" y="185"/>
</element>
<expression label="text9" exp=""長軸長\text{major axis}:" + (LaTeX[(2 * If[r + ap ≟ pb, Distance[NowP, NowB], If[ap + pb ≟ r, If[ap > pb, ap, pb], Distance[NowP, NowA]]])]) + """ />
<element type="text" label="text9">
<show object="true" label="false" ev="8"/>
<condition showObject="info ∧ NowA ≠ NowP ∧ NowB ≠ NowP"/>
<objColor r="255" g="255" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.85" size="-3" style="0"/>
<absoluteScreenLocation x="167" y="159"/>
</element>
<expression label="text12" exp=""橢圓方程式\text{Equation of Ellipse}:\\
\hspace{3em}\frac{x^2}{" + (LaTeX[pb]) + "^2}+\frac{y^2}{" + (LaTeX[ap]) + "^2}=1"" />
<element type="text" label="text12">
<show object="true" label="false" ev="8"/>
<condition showObject="info ∧ NowA ≠ NowP ∧ NowB ≠ NowP"/>
<objColor r="255" g="255" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.85" size="-3" style="0"/>
<absoluteScreenLocation x="12" y="221"/>
</element>
<expression label="text11" exp=""不是橢圓\hspace{2em}\text{Not an ellipse.}\\為" + (LaTeX[If[NowA ≟ NowP, "水平線段\hspace{1em}\text{A horizontal segment}", "鉛垂線段\hspace{1em}\text{A vertical segment}"]]) + "\\線段長:" + (LaTeX[(2 * r)]) + "\hspace{1em}\text{with length }" + (LaTeX[(2 * r)]) + "."" />
<element type="text" label="text11">
<show object="true" label="false" ev="8"/>
<condition showObject="info ∧ (NowA ≟ NowP ∨ NowB ≟ NowP)"/>
<objColor r="255" g="255" b="0" alpha="0.0"/>
<layer val="3"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.85" size="-3" style="0"/>
<absoluteScreenLocation x="176" y="163"/>
</element>
<expression label="text13" exp=""欲調整點A,\,B,\,P\,時,\hspace{1em}\text{If you want to drag}\\
先點擊該點一次,\hspace{2.8em}\text{point }A,\,B\,\text{or}\,P\,,\\
便可拖曳調整。\hspace{3.8em}\text{click it once first.}""/>
<element type="text" label="text13">
<show object="true" label="false" ev="40"/>
<condition showObject="¬ani"/>
<objColor r="255" g="255" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.8" size="-4" style="0"/>
<absoluteScreenLocation x="12" y="576"/>
</element>
</construction>
</geogebra>