Bounding Box Construction for an Ellipse
2017-03-22 12:19
This example demonstrates how to construct the bounding box (circumscribed rectangle) for an arbitrary ellipse. By defining the major and minor axes, it uses intersection, distance, and polygon commands to dynamically calculate and draw the bounding rectangle. This construction helps intuitively understand the geometric properties, optimization, and boundary limits under rotation transformations o
In collections
Conic Sections | GeoGebra Book
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.345.0" id="a053f74d-7f68-4764-8a1c-7343dba81772" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="771" height="588" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.9870298313878081" orientation="1" />
</panes>
<views>
<view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1,1" size="400" window="1250,585,700,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="769" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="false" location="3" size="960" window="100,100,250,400" />
<view id="16" visible="false" inframe="false" stylebar="false" location="1" size="150" 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="128" visible="false" inframe="true" stylebar="false" location="1" size="480" 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" />
<view id="43" visible="false" inframe="false" stylebar="false" location="1" size="450" window="50,50,500,500" />
</views>
<toolbar show="false" 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="false" cmd="true" top="algebra" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="0"/>
<font size="32"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="769" height="586"/>
<coordSystem xZero="-410.10627914888806" yZero="-262.64514829862685" scale="51.25710419375397" yscale="51.25710419375431"/>
<evSettings axes="false" grid="true" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="15"/>
<angleUnit val="degree"/>
<algebraStyle val="0" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<element type="point" label="A">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="13" y="-12" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="B">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="17" y="-10" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="C">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="13.014903780502285" y="-9.33812309195865" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Ellipse">
<input a0="A" a1="B" a2="C"/>
<output a0="c"/>
</command>
<element type="conic" label="c">
<show object="true" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eigenvectors x0="0.8944271909999159" y0="0.4472135954999579" z0="1.0" x1="-0.4472135954999579" y1="0.8944271909999159" z1="1.0"/>
<matrix A0="115.64608447175445" A1="163.64608447175445" A2="55262.730920458765" A3="-32" A4="-2086.6912670763168" A5="2280.106929189299"/>
<eqnStyle style="implicit"/>
</element>
<command name="FirstAxis">
<input a0="c"/>
<output a0="f"/>
</command>
<element type="line" label="f">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-0.4472135954999579" y="0.8944271909999159" z="16.546903033498445"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="SecondAxis">
<input a0="c"/>
<output a0="g"/>
</command>
<element type="line" label="g">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-0.8944271909999159" y="-0.4472135954999579" z="8.497058314499204"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="Intersect">
<input a0="c" a1="g"/>
<output a0="D" a1="E"/>
</command>
<element type="point" label="D">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="16.116053787188115" y="-13.232107574376224" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="point" label="E">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="13.883946212811889" y="-8.76789242562377" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="c" a1="f"/>
<output a0="F" a1="G"/>
</command>
<element type="point" label="F">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="12.00295074722024" y="-12.498524626389884" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="point" label="G">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="17.997049252779764" y="-9.501475373610122" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="f" a1="g"/>
<output a0="H"/>
</command>
<element type="point" label="H">
<show object="false" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="15.000000000000004" y="-11" z="0.9999999999999999"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Distance">
<input a0="H" a1="G"/>
<output a0="HG"/>
</command>
<element type="numeric" label="HG">
<value val="3.3508029305652456"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<auxiliary val="true"/>
</element>
<command name="FirstAxisLength">
<input a0="c"/>
<output a0="a"/>
</command>
<element type="numeric" label="a">
<value val="3.350802930565273"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Distance">
<input a0="H" a1="D"/>
<output a0="HD"/>
</command>
<element type="numeric" label="HD">
<value val="2.4955721346986994"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<auxiliary val="true"/>
</element>
<command name="SecondAxisLength">
<input a0="c"/>
<output a0="b"/>
</command>
<element type="numeric" label="b">
<value val="2.495572134698724"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="If">
<input a0="Defined[Slope[f]]" a1="atan(Slope[f])" a2="π / 2"/>
<output a0="phi"/>
</command>
<element type="numeric" label="phi">
<value val="0.4636476090008061"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<expression label="h" exp="x = sqrt((a^(2) * cos(phi)^(2)) + (b^(2) * sin(phi)^(2))) + x(H)" type="line" />
<element type="line" label="h">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="1" y="0" z="-18.198105733005843"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<expression label="i" exp="x = (-sqrt((a^(2) * cos(phi)^(2)) + (b^(2) * sin(phi)^(2)))) + x(H)" type="line" />
<element type="line" label="i">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="1" y="0" z="-11.801894266994168"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<expression label="j" exp="y = (-sqrt((b^(2) * cos(phi)^(2)) + (a^(2) * sin(phi)^(2)))) + y(H)" type="line" />
<element type="line" label="j">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="0" y="1" z="13.6884717367837"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<expression label="k" exp="y = sqrt((b^(2) * cos(phi)^(2)) + (a^(2) * sin(phi)^(2))) + y(H)" type="line" />
<element type="line" label="k">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="0" y="1" z="8.311528263216303"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="explicit"/>
</element>
<command name="Intersect">
<input a0="i" a1="k"/>
<output a0="I"/>
</command>
<element type="point" label="I">
<show object="true" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="11.801894266994168" y="-8.311528263216303" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="h" a1="k"/>
<output a0="J"/>
</command>
<element type="point" label="J">
<show object="true" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="18.198105733005843" y="-8.311528263216303" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="j" a1="h"/>
<output a0="K"/>
</command>
<element type="point" label="K">
<show object="true" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="18.198105733005843" y="-13.6884717367837" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="i" a1="j"/>
<output a0="L"/>
</command>
<element type="point" label="L">
<show object="true" label="false"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="11.801894266994168" y="-13.6884717367837" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="I" a1="J" a2="K" a3="L"/>
<output a0="poly1" a1="i_1" a2="j_1" a3="k_1" a4="l"/>
</command>
<element type="polygon" label="poly1">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="153" g="51" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
</element>
<element type="segment" label="i_1">
<show object="true" label="false"/>
<objColor r="153" g="51" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="false"/>
<coords x="0" y="6.396211466011675" z="53.16229237726421"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="j_1">
<show object="true" label="false"/>
<objColor r="153" g="51" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="false"/>
<coords x="5.3769434735673975" y="0" z="-97.8501858523752"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="k_1">
<show object="true" label="false"/>
<objColor r="153" g="51" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="false"/>
<coords x="0" y="-6.396211466011675" z="-87.55435987499263"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="l">
<show object="true" label="false"/>
<objColor r="153" g="51" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="false"/>
<coords x="-5.3769434735673975" y="0" z="63.458118354646786"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
</construction>
</geogebra>