Difference between revisions of "Distance Command"

From GeoGebra Manual
Jump to: navigation, search
m
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
{{command|geometry}}
 
{{command|geometry}}
; Distance[ <Point>, <Object> ]: Yields the shortest distance between a point and a geometric object, or the vertical distance to a function.  
+
;Distance[ <Point>, <Object> ]: Yields the shortest distance between a point and a geometric object, or the vertical distance to a function.  
: {{Note| 1=The command works for points, segments, lines, conics and implicit curves. For a given function ''f'' and a given point ''A'', the command <code>Distance[A,f]</code> yields the '''vertical''' distance between the point and the function.}}
+
:{{example|1=<div>
 +
:*<code><nowiki>Distance[(2, 1), x^2 + (y - 1)^2 = 1]</nowiki></code> yields ''1''
 +
:*Let ''f'' be a function and ''A'' be a point. <code><nowiki>Distance[A, f]</nowiki></code> yields the '''vertical''' distance between the point and the function.</div>}}
 +
: {{Note| 1=The command works for points, segments, lines, conics and implicit curves.}}
  
; Distance[ <Line>, <Line> ]: Yields the distance between two parallel lines.
+
;Distance[ <Line>, <Line> ]: Yields the distance between two parallel lines.
: {{Note| 1=The distance between intersecting lines is 0. Thus, this command is only interesting for parallel lines.}}
+
:{{example|1=<div>
 +
:*<code><nowiki>Distance[y = x + 3, y = x + 1]</nowiki></code> yields ''1.41''
 +
:*<code><nowiki>Distance[y = 3x + 1, y = x + 1]</nowiki></code> yields ''0''</div>}}
 +
: {{Note| 1=The distance between intersecting lines is ''0''. Thus, this command is only interesting for parallel lines.}}
  
 
{{Note| 1=See also [[Image:Tool Distance.gif]] [[Distance or Length Tool|Distance or Length]] tool .}}
 
{{Note| 1=See also [[Image:Tool Distance.gif]] [[Distance or Length Tool|Distance or Length]] tool .}}
 
{{betamanual|version=5.0|
 
{{betamanual|version=5.0|
{{Note| 1=From GeoGebra 5, this command will work with 3D objects as well}}
+
{{Note| 1=From GeoGebra 5, this command will work with 3D objects as well}}}}
}}
 

Revision as of 09:37, 2 September 2013



Distance[ <Point>, <Object> ]
Yields the shortest distance between a point and a geometric object, or the vertical distance to a function.
Example:
  • Distance[(2, 1), x^2 + (y - 1)^2 = 1] yields 1
  • Let f be a function and A be a point. Distance[A, f] yields the vertical distance between the point and the function.
Note: The command works for points, segments, lines, conics and implicit curves.
Distance[ <Line>, <Line> ]
Yields the distance between two parallel lines.
Example:
  • Distance[y = x + 3, y = x + 1] yields 1.41
  • Distance[y = 3x + 1, y = x + 1] yields 0
Note: The distance between intersecting lines is 0. Thus, this command is only interesting for parallel lines.
Note: See also Tool Distance.gif Distance or Length tool .
© 2024 International GeoGebra Institute