Difference between revisions of "Distance Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - " <div class="block-note"><span class="block-contents"> '''Note:''' From GeoGebra 5, this command will work with 3D objects as well.</span></div>" to "")
m
Line 10: Line 10:
 
: {{Note| 1=The distance between intersecting lines is ''0''. Thus, this command is only interesting for parallel lines.}}
 
: {{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 [[File:Mode distance.svg|link=|20px]] [[Distance or Length Tool|Distance or Length]] tool .}}
  
  

Revision as of 11:37, 4 August 2015


Distance[ <Point>, <Object> ]
Yields the shortest distance between a point and an object.
Example:
Distance[(2, 1), x^2 + (y - 1)^2 = 1] yields 1
Note: The command works for points, segments, lines, conics, functions and implicit curves. For functions it uses a numerical algorithm which works better for polynomials.
Distance[ <Line>, <Line> ]
Yields the distance between two 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 Mode distance.svg Distance or Length tool .


Distance[ <Point>, <Point> ]
Yields the distance between the two points.
Example:
Distance[(2, 1, 2), (1, 3, 0)] yields 3
Distance[ <Line>, <Line> ]
Yields the distance between two lines.
Example:
Let a: X = (-4, 0, 0) + λ*(4, 3, 0) and b: X = (0, 0, 0) + λ*(0.8, 0.6, 0).
Distance[a, b] yields 2.4
© 2024 International GeoGebra Institute