Flashlight Beam Simulation
2022-03-08 02:15
This GeoGebra applet simulates a flashlight beam using the optical properties of a parabola. It demonstrates how light rays from the focus reflect parallel to the axis of symmetry, helping to explain why flashlight beams often appear brighter at the edges and darker in the center. The model incorporates conic sections, vectors, and geometric symmetry.
In collections
Conic Sections | GeoGebra Book Collection
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.691.0" app="classic" platform="w" id="eb647bbf-7dff-4830-bde1-adcb287c987d" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/apps/xsd/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="882" height="535" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.29365079365079366" orientation="1" />
</panes>
<views>
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 51 | 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 , 538 | 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="true" location="1,1" size="329" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="true" location="3,3" size="140" tab="ALGEBRA" 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="4097" visible="false" inframe="false" stylebar="true" location="1,1" size="390" window="247,241,700,550" />
<view id="1" visible="true" inframe="false" stylebar="false" location="3" size="259" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="false" location="1" size="614" 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="false" stylebar="false" location="1" size="150" window="50,50,500,500" />
<view id="128" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="150" 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="2"/>
<font size="24"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="258" height="534"/>
<coordSystem xZero="130.6342667106999" yZero="456.41732710558585" scale="0.5294314278985249" yscale="0.5294314278985256"/>
<evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="3"/>
<bgColor r="0" g="0" b="0"/>
<axesColor r="160" g="160" b="160"/>
<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="false" label="" unitLabel="" tickStyle="1" showNumbers="true" positiveAxis="true"/>
</euclidianView>
<euclidianView>
<viewNumber viewNo="2"/>
<size width="613" height="534"/>
<coordSystem xZero="306.2241119894084" yZero="450.6105549566728" scale="73.26270042733736" yscale="73.26270042733762"/>
<evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="3"/>
<bgColor r="0" g="0" b="0"/>
<axesColor r="128" g="128" b="128"/>
<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" positiveAxis="true"/>
</euclidianView>
<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" max="2" step="1"/>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<element type="numeric" label="n">
<value val="24"/>
<show object="true" label="false" ev="3"/>
<objColor r="255" g="255" b="0" alpha="0.10000000149011612"/>
<layer val="1"/>
<labelOffset x="0" y="-5"/>
<labelMode val="9"/>
<slider min="1" max="108" absoluteScreenLocation="true" width="120" x="18" y="427" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
<caption val="光線數目"/>
</element>
<command name="PolyLine">
<input a0="{Corner[1], Corner[2], Corner[3], Corner[4], Corner[1]}"/>
<output a0="osq"/>
</command>
<element type="polyline" label="osq">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false" ev="8"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
</element>
<expression label="f" exp="f(x) = If[-4 ≤ x ≤ 4, (0.25 * x^(2))]" type="function"/>
<element type="function" label="f">
<show object="true" label="false" ev="6"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<fixed val="true"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
</element>
<command name="PointIn">
<input a0="y ≥ (0.25 * x^(2)) + 0.1"/>
<output a0="A"/>
</command>
<element type="point" label="A">
<show object="true" label="true" ev="11"/>
<objColor r="255" g="153" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="3"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="0.7749630805228406" y="1.0866451071596945" z="1"/>
<pointSize val="6"/>
<pointStyle val="0"/>
<caption val="光源"/>
</element>
<command name="Sequence">
<input a0="A + (cos(π / 2 + ((2 * k) * π / n)), sin(π / 2 + ((2 * k) * π / n)))" a1="k" a2="1" a3="n - 1"/>
<output a0="B1" randomResult="{(0.51614403542032, 2.052570933448763), (0.2749630805228408, 1.9526705109441331), (0.06785629933629311, 1.7937518883462422), (-0.09106232326159791, 1.5866451071596948), (-0.19096274576622763, 1.3454641522622155), (-0.22503691947715943, 1.0866451071596945), (-0.19096274576622785, 0.8278260620571742), (-0.09106232326159824, 0.5866451071596948), (0.06785629933629289, 0.3795383259731471), (0.27496308052284013, 0.22061970337525605), (0.51614403542032, 0.12071928087062622), (0.7749630805228406, 0.08664510715969453), (1.0337821256253608, 0.12071928087062611), (1.27496308052284, 0.2206197033752555), (1.4820698617093875, 0.3795383259731462), (1.6409884843072788, 0.5866451071596941), (1.7408889068119087, 0.8278260620571729), (1.7749630805228405, 1.0866451071596945), (1.740888906811909, 1.3454641522622148), (1.6409884843072797, 1.5866451071596939), (1.4820698617093884, 1.7937518883462418), (1.2749630805228411, 1.952670510944133), (1.033782125625362, 2.0525709334487625)}"/>
</command>
<element type="list" label="B1">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="A" a1="k" a2="1" a3="n - 1"/>
<output a0="A1" randomResult="{(0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945), (0.7749630805228406, 1.0866451071596945)}"/>
</command>
<element type="list" label="A1">
<show object="false" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Ray[(0.99 * A1(k)) + (0.01 * B1(k)), B1(k)]" a1="k" a2="1" a3="n - 1"/>
<output a0="C1" randomResult="{-0.9562665680261777x - 0.2562308546514954y = -1.0195032898689655, -0.8573651497465942x - 0.4949999999999998y = -1.2023156656245957, -0.7000357133746822x - 0.700035713374682y = -1.3031922156884925, -0.49500000000000033x - 0.8573651497465942y = -1.3152583698801816, -0.25623085465149575x - 0.9562665680261775y = -1.2376918397317624, y = 1.0866451071596945, 0.2562308546514951x - 0.9562665680261777y = -0.8405529348403163, 0.49499999999999966x - 0.8573651497465944y = -0.5480449201625697, 0.700035713374682x - 0.7000357133746822y = -0.21818854986279695, 0.8573651497465941x - 0.49500000000000044y = 0.12653700953649777, 0.9562665680261776x - 0.2562308546514954y = 0.46263928084817674, x = 0.7749630805228406, 0.9562665680261777x + 0.256230854651495y = 1.019503289868965, 0.8573651497465946x + 0.49499999999999944y = 1.2023156656245957, 0.7000357133746828x + 0.7000357133746814y = 1.3031922156884923, 0.49500000000000033x + 0.8573651497465938y = 1.3152583698801812, 0.2562308546514964x + 0.9562665680261774y = 1.2376918397317627, y = 1.0866451071596945, -0.2562308546514951x + 0.9562665680261778y = 0.8405529348403165, -0.49499999999999944x + 0.8573651497465947y = 0.5480449201625703, -0.7000357133746817x + 0.7000357133746823y = 0.21818854986279734, -0.857365149746594x + 0.49500000000000055y = -0.1265370095364975, -0.9562665680261773x + 0.2562308546514963y = -0.4626392808481754}"/>
</command>
<element type="list" label="C1">
<show object="false" label="true" ev="7"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Intersect[f, Element[C1, k]]" a1="k" a2="1" a3="n - 1"/>
<output a0="A2" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (-3.8877600574127564, 3.7786695660035097), (-2.8734976734266624, 2.0642472197971102), (-2.0848454208019302, 1.0866451071596943), (-1.4142720131226652, 0.500041331775509), (-0.8176617988611905, 0.16714270432922948), (-0.29057375051479567, 0.021108276122058678), (0.15087377648612038, 0.005690724107795953), (0.5005833242351246, 0.06264591612557198), (0.7749630805228406, 0.15014194404336267), (0.9992428604077219, 0.2496215735189515), (1.1959071988519119, 0.3575485070664566), (1.383257712727503, 0.4783504749550308), (1.5783589806542515, 0.6228042679529819), (1.8017009037021692, 0.8115315366003033), (2.0848454208019302, 1.0866451071596943), (2.4860687828471537, 1.545134498261782), (3.127062875619691, 2.444630557019723), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="A2">
<show object="false" label="false" ev="7"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="If[A2(k) ≠ A1(k), Mirror[A1(k), OrthogonalLine[A2(k), Tangent[A2(k), f]]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="B2" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (-3.3666481288695427, 9.137440423764017), (-2.5230929114374794, 5.825123217024115), (-1.9660957526368557, 3.943987085390532), (-1.59087365330402, 2.759613447294127), (-1.3099642903859503, 1.939027839455802), (-1.008840529106593, 1.345808359675622), (-0.6283175148169617, 0.9807859857153908), (-0.22382345366636325, 0.8366571654168392), (0.1439493348136811, 0.8421389290461812), (0.464604938159903, 0.93158352819691), (0.7528322793798774, 1.0734119149580796), (1.0287330959265943, 1.2621597726928042), (1.313958733529125, 1.5120094218877305), (1.6349002365629715, 1.861319882741983), (2.0304543337164214, 2.395397702198452), (2.5674214241780815, 3.3147324735172994), (3.373414591626779, 5.149405734395203), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="B2">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Ray[(0.99 * A2(k)) + (0.01 * B2(k)), B2(k)]" a1="k" a2="1" a3="n - 1"/>
<output a0="C2" randomResult="{?, ?, ?, -5.305183149182902x + 0.5159008092577815y = 22.57469783167147, -3.7232672372547344x + 0.34690071436929104y = 11.414888578979635, -2.8287685584485294x + 0.11756217148342385y = 6.025293534019426, -2.236976394363432x - 0.17483562377954143y = 3.0762680704077274, -1.754166283775307x - 0.48737946660951226y = 1.3528528370097155, -1.3114530827180277x - 0.7110841108058793y = 0.3660640811126688, -0.9653443089915189x - 0.7713993783900512y = -0.15003496254627782, -0.7662711367983546x - 0.717162710122473y = -0.4285098679106686, -0.6850770151527903x - 0.6247036082520678y = -0.6247036082520678, -0.6751423351311789x - 0.5292915430253408y = -0.8067537459590874, -0.7087047738127068x - 0.43864417027731406y = -1.0043817090793903, -0.7759712047603957x - 0.3509793706328994y = -1.2412593024809349, -0.8803131023954011x - 0.26175624465387526y = -1.5524729972871656, -1.0392904626802628x - 0.16513266046780561y = -2.0065009275124095, -1.29566506908837x - 0.053847176214653736y = -2.759774156749924, -1.7519019955029622x + 0.08053911491761845y = -4.230905096708867, -2.6777274256017254x + 0.24388819884701718y = -7.777205480229924, ?, ?, ?}"/>
</command>
<element type="list" label="C2">
<show object="false" label="false" ev="10"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Intersect[f, Element[C2, k]]" a1="k" a2="1" a3="n - 1"/>
<output a0="A3" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="A3">
<show object="false" label="false" ev="7"/>
<objColor r="0" g="153" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<expression label="W" exp="x = x(Corner[1])" type="line" />
<element type="line" label="W">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="1" y="0" z="248.63326915290335"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eqnStyle style="implicit"/>
</element>
<expression label="E" exp="x = x(Corner[2])" type="line" />
<element type="line" label="E">
<show object="false" label="false"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="1" y="0" z="-242.45960199004978"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eqnStyle style="implicit"/>
</element>
<expression label="N" exp="y = y(Corner[3])" type="line" />
<element type="line" label="N">
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="0" y="1" z="-863.9784172262202"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<eqnStyle style="explicit"/>
</element>
<command name="Max">
<input a0="Sequence[Distance[(0, 0), Corner[k]], k, 1, 4]"/>
<output a0="r"/>
</command>
<element type="numeric" label="r">
<value val="899.0423838520544"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<element type="numeric" label="a">
<value val="0.7"/>
<show object="true" label="false" ev="3"/>
<objColor r="255" g="255" b="0" alpha="0.10000000149011612"/>
<layer val="1"/>
<labelOffset x="63" y="-49"/>
<labelMode val="3"/>
<slider min="0.2" max="4" absoluteScreenLocation="true" width="120" x="419" y="514" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.02" speed="1" type="0" playing="false"/>
<ggbscript onUpdate="SetValue[A,(0,a)]"/>
<caption val="光源在軸上的位置"/>
</element>
<command name="Vector">
<input a0="A" a1="(x(A), y(Corner[3]))"/>
<output a0="u"/>
</command>
<element type="vector" label="u">
<show object="true" label="false" ev="6"/>
<objColor r="255" g="204" b="51" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="0" y="862.8917721190605" z="0"/>
<lineStyle thickness="4" type="0" typeHidden="1" opacity="63"/>
<coordStyle style="cartesian"/>
<startPoint exp="A"/>
</element>
<command name="Sequence">
<input a0="If[A3(k) ≠ A2(k), Mirror[A2(k), OrthogonalLine[A3(k), Tangent[A3(k), f]]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="B3" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="B3">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Ray[(0.99 * A3(k)) + (0.01 * B3(k)), B3(k)]" a1="k" a2="1" a3="n - 1"/>
<output a0="C3" randomResult="{?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?}"/>
</command>
<element type="list" label="C3">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Intersect[f, Element[C3, k]]" a1="k" a2="1" a3="n - 1"/>
<output a0="A4" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="A4">
<show object="false" label="false" ev="7"/>
<objColor r="0" g="204" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="If[A4(k) ≠ A3(k), Mirror[A3(k), OrthogonalLine[A4(k), Tangent[A4(k), f]]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="B4" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="B4">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Ray[(0.99 * A4(k)) + (0.01 * B4(k)), B4(k)]" a1="k" a2="1" a3="n - 1"/>
<output a0="C4" randomResult="{?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?}"/>
</command>
<element type="list" label="C4">
<show object="false" label="false" ev="11"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Intersect[f, Element[C4, k]]" a1="k" a2="1" a3="n - 1"/>
<output a0="A5" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="A5">
<show object="false" label="false" ev="7"/>
<objColor r="51" g="255" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<element type="numeric" label="step">
<value val="5"/>
<show object="false" label="true"/>
<objColor r="192" g="192" b="192" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="3"/>
<slider min="1" max="5" absoluteScreenLocation="true" width="200" x="387" y="738" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
<caption val="製作by宋政蒲"/>
</element>
<expression label="F" exp="(0, 1)" type="point"/>
<element type="point" label="F">
<show object="true" label="true" ev="7"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-68" y="39"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<selectionAllowed val="false"/>
<coords x="0" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<caption val="焦點"/>
</element>
<expression label="text1" exp=""光杯、光源附近的模擬""/>
<element type="text" label="text1">
<show object="true" label="false" ev="43"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.2" size="5" style="0"/>
<absoluteScreenLocation x="5" y="485"/>
<ggbscript val="If(n<-500,SetValue[text1,"製作by宋政蒲"])"/>
</element>
<expression label="text2" exp=""射向遠處之模擬""/>
<element type="text" label="text2">
<show object="true" label="false" ev="40"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.2" size="5" style="0"/>
<absoluteScreenLocation x="16" y="482"/>
</element>
<expression label="text3" exp=""光源在軸上的位置=" + (LaTeX[a]) + """ />
<element type="text" label="text3">
<show object="true" label="false" ev="43"/>
<objColor r="255" g="255" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.8" size="-5" style="0"/>
<absoluteScreenLocation x="318" y="470"/>
</element>
<expression label="text4" exp=""光線數目=" + (LaTeX[n]) + """ />
<element type="text" label="text4">
<show object="true" label="false" ev="43"/>
<objColor r="255" g="255" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="0.8" size="-5" style="0"/>
<absoluteScreenLocation x="3" y="374"/>
</element>
<command name="Sequence">
<input a0="Vector[A2(k), If[Defined[A3(k)] ∧ A3(k) ≠ A2(k), A3(k), Intersect[Element[C2, k], osq]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="D3" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (83.64984458822978, 860.1997476602166), (80.30544740610736, 861.9141700064231), (35.86133979838007, 862.8917721190604), (-67.48697967937684, 863.4783758944448), (-240.002263252763, 863.8112745218909), (-248.34269540238853, 458.01866264014654), (-248.78414292938947, 311.33335503257666), (-249.13385247713848, 266.19353970594614), (-249.40823223342616, 273.51186232314194), (-249.63251201331107, 318.4208765588758), (-249.82917635175528, 403.6418170250616), (-250.01652686563085, 552.755067091536), (-250.21162813355764, 841.4873727613112), (-137.14841940725924, 863.1668856896199), (-35.86133979838027, 862.8917721190605), (39.64811584478186, 862.4332827279585), (78.46874983154234, 861.5337866692005), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="D3">
<show object="false" label="false" ev="10"/>
<condition showObject="step ≥ 3"/>
<objColor r="255" g="204" b="51" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="4" type="0" typeHidden="1" opacity="63"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Segment">
<input a0="(x(Corner[1]) + 5, 0)" a1="(x(Corner[1]) + 5, y(Corner[3]))"/>
<output a0="g"/>
</command>
<element type="segment" label="g">
<show object="true" label="false" ev="8"/>
<objColor r="128" g="128" b="128" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="-863.9784172262202" y="0" z="-210493.88626637514"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="229"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Sequence">
<input a0="(x(Corner[1]) + 5, (k * 200))" a1="k" a2="1" a3="10"/>
<output a0="l2" randomResult="{(-243.63326915290335, 200), (-243.63326915290335, 400), (-243.63326915290335, 600), (-243.63326915290335, 800), (-243.63326915290335, 1000), (-243.63326915290335, 1200), (-243.63326915290335, 1400), (-243.63326915290335, 1600), (-243.63326915290335, 1800), (-243.63326915290335, 2000)}"/>
</command>
<element type="list" label="l2">
<show object="true" label="false" ev="4"/>
<objColor r="96" g="96" b="96" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="3"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Text[(k * 200), (x(Corner[1]) + 20, (k * 200) - 12)]" a1="k" a2="1" a3="10"/>
<output a0="l1" randomResult="{"200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000"}"/>
</command>
<element type="list" label="l1">
<show object="true" label="false" ev="4"/>
<objColor r="128" g="128" b="128" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<font serif="false" sizeM="0.75" size="-6" style="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Vector[A1(k), If[Defined[A2(k)] ∧ A2(k) ≠ A1(k), A2(k), Intersect[Element[C1, k], osq]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="D2" randomResult="{(-231.21115349476244, 862.8917721190604), (-249.40823223342622, 431.9877300542321), (-249.40823223342616, 249.40823223342625), (-4.662723137935597, 2.6920244588438154), (-3.648460753949503, 0.9776021126374157), (-2.8598085013247707, -2.220446049250313E-16), (-2.1892350936455056, -0.5866037753841855), (-1.5926248793840312, -0.919502402830465), (-1.0655368310376363, -1.0655368310376359), (-0.6240893040367201, -1.0809543830518986), (-0.27437975628771594, -1.0239991910341226), (0, -0.9365031631163319), (0.22427977988488135, -0.837023533640743), (0.4209441183290713, -0.729096600093238), (0.6082946322046624, -0.6082946322046637), (0.8033959001314109, -0.4638408392067126), (1.0267378231793285, -0.27511357055939123), (1.3098823402790898, -2.220446049250313E-16), (1.7111057023243132, 0.45848939110208753), (2.3520997950968505, 1.3579854498600283), (241.6846389095269, 241.6846389095267), (241.68463890952694, 418.610074000238), (231.2111534947634, 862.8917721190605)}"/>
</command>
<element type="list" label="D2">
<show object="false" label="false" ev="10"/>
<condition showObject="step ≥ 2"/>
<objColor r="255" g="204" b="51" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="4" type="0" typeHidden="1" opacity="63"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Vector[A3(k), If[Defined[A4(k)] ∧ A4(k) ≠ A3(k), A4(k), Intersect[Element[C3, k], osq]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="D4" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="D4">
<show object="false" label="false" ev="11"/>
<condition showObject="step ≥ 3"/>
<objColor r="255" g="204" b="51" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="4" type="0" typeHidden="1" opacity="63"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Vector[A4(k), If[Defined[A5(k)] ∧ A5(k) ≠ A4(k), A5(k), Intersect[Element[C4, k], osq]]]" a1="k" a2="1" a3="n - 1"/>
<output a0="D5" randomResult="{(NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN), (NaN, NaN)}"/>
</command>
<element type="list" label="D5">
<show object="false" label="false" ev="11"/>
<condition showObject="step ≥ 3"/>
<objColor r="255" g="204" b="51" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="true"/>
<lineStyle thickness="4" type="0" typeHidden="1" opacity="63"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
</construction>
</geogebra>