Distance from a Point to a Line: Shortest Distance is Perpendicular
2015-11-18 03:34
This applet demonstrates that the shortest distance from a point to a line is the perpendicular segment. Users can dynamically observe the segment length changes as the point on the line moves, verifying the minimum distance occurs at a right angle. Combining orthogonal lines, intersections, and angles, it serves as an excellent visual aid for plane and coordinate geometry.
In collections
函數、方程式、參數式
Loading the GeoGebra board and drawing, please wait…
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.164.0" id="5f9b1099-c353-4ff9-baf4-d40e9f4c2d7a" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="1280" height="773" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.434375" orientation="1" />
</panes>
<views>
<view id="4097" visible="false" inframe="true" stylebar="true" location="1,1,1,1" size="400" window="487,164,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 , 22 , 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="2" visible="false" inframe="false" stylebar="false" location="3,3" size="251" window="100,100,250,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="3" size="556" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="true" location="1" size="704" 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 | 1 501 67 , 5 19 , 72 | 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 | 30 29 54 32 31 33 | 17 26 62 73 , 14 68 | 25 52 60 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />
<input show="true" cmd="true" top="false" />
<dockBar show="true" east="true" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="28"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="556" height="549"/>
<coordSystem xZero="247.06588232185422" yZero="282.73211057256503" scale="57.47085601041806" yscale="57.47085601041822"/>
<evSettings axes="true" grid="false" 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="10"/>
<axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<euclidianView>
<viewNumber viewNo="2"/>
<size width="704" height="549"/>
<coordSystem xZero="220.05595568617383" yZero="316.8716310728955" scale="49.95885611310752" yscale="49.958856113107515"/>
<evSettings axes="true" grid="false" 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="10"/>
<axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="0"/>
<angleUnit val="degree"/>
<algebraStyle val="0"/>
<coordStyle val="0"/>
<angleFromInvTrig val="false"/>
</kernel>
<scripting blocked="false" disabled="false"/>
<euclidianView3D>
<coordSystem xZero="0.0" yZero="0.0" zZero="-1.5" scale="50.0" xAngle="20.0" zAngle="-60.0"/>
<evSettings axes="true" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" gridType="0"/>
<axis id="0" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="2" show="true" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<plate show="true"/>
<bgColor r="255" g="255" b="255"/>
<clipping use="true" show="true" size="1"/>
<projection type="0"/>
</euclidianView3D>
<construction title="" author="" date="">
<element type="point" label="P">
<show object="true" label="true" ev="8"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="4.0" y="3.0" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="numeric" label="c">
<value val="0.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="a">
<value val="3.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-5" max="5" absoluteScreenLocation="true" width="200.0" x="30.0" y="130.0" fixed="false" horizontal="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="b">
<value val="4.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="L_Q" exp="(a * x) + (b * y) + c = 0" type="line" />
<element type="line" label="L_Q">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3.0" y="4.0" z="0.0"/>
<lineStyle thickness="7" type="15" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="Intersect">
<input a0="L_Q" a1="OrthogonalLine[P, y = 0]"/>
<output a0="A"/>
</command>
<element type="point" label="A">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="16.0" y="-12.0" z="4.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="OrthogonalLine">
<input a0="P" a1="L_Q"/>
<output a0="f"/>
</command>
<element type="line" label="f">
<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="-4.0" y="3.0" z="7.0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="Intersect">
<input a0="f" a1="L_Q"/>
<output a0="Q"/>
</command>
<element type="point" label="Q">
<show object="true" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="-10" y="45"/>
<labelMode val="0"/>
<coords x="28.0" y="-21.0" z="25.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<element type="numeric" label="n">
<value val="1.0"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="-35" y="42"/>
<labelMode val="1"/>
<slider min="1" max="20" absoluteScreenLocation="true" width="200.0" x="70.0" y="217.0" fixed="false" horizontal="false"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="t" exp="1 - n / 10" />
<element type="numeric" label="t">
<value val="0.9"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
</element>
<command name="If">
<input a0="n < 11" a1="(0.4 * n)" a2="If[(n > 10) ∧ (n < 14), (0.2 * n) + 2, If[n > 19, (0.2 * n) + 1, 4.8]]"/>
<output a0="r"/>
</command>
<element type="numeric" label="r">
<value val="0.4"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
</element>
<command name="Intersect">
<input a0="L_Q" a1="OrthogonalLine[P, x = 0]"/>
<output a0="B"/>
</command>
<element type="point" label="B">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-12.0" y="9.0" z="3.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Angle">
<input a0="A" a1="Q" a2="P"/>
<output a0="α"/>
</command>
<element type="angle" label="α">
<angleStyle val="0"/>
<value val="1.5707963267948966"/>
<show object="true" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="20" y="16"/>
<labelMode val="2"/>
<lineStyle thickness="2" type="0" typeHidden="2"/>
<arcSize val="30"/>
</element>
<expression label="R" exp="(t * A) + ((1 - t) * Q)" type="point" />
<element type="point" label="R">
<show object="true" label="true" ev="8"/>
<objColor r="125" g="125" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3.712" y="-2.7840000000000003" z="1.0"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Angle">
<input a0="P" a1="R" a2="B"/>
<output a0="β"/>
</command>
<element type="angle" label="β">
<angleStyle val="0"/>
<value val="0.9770466600841253"/>
<show object="true" label="true" ev="4"/>
<objColor r="255" g="0" b="255" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="-76" y="-6"/>
<labelMode val="2"/>
<lineStyle thickness="2" type="0" typeHidden="2"/>
<arcSize val="30"/>
</element>
<command name="Angle">
<input a0="A" a1="R" a2="P"/>
<output a0="γ"/>
</command>
<element type="angle" label="γ">
<angleStyle val="0"/>
<value val="2.1645459935056675"/>
<show object="true" label="true" ev="4"/>
<objColor r="127" g="0" b="255" alpha="0.1"/>
<layer val="0"/>
<labelOffset x="-41" y="44"/>
<labelMode val="2"/>
<lineStyle thickness="2" type="0" typeHidden="2"/>
<arcSize val="30"/>
</element>
<command name="Segment">
<input a0="R" a1="P"/>
<output a0="d"/>
</command>
<element type="segment" label="d">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-5.784000000000001" y="0.2879999999999998" z="22.272000000000002"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="P" a1="Q"/>
<output a0="e"/>
</command>
<element type="segment" label="e">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3.84" y="-2.88" z="-6.720000000000001"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
</construction>
</geogebra>