Difference between revisions of "Distance Command"
From GeoGebra Manual
(deleted "parallel" in the cmd description - example contains intersecting lines) |
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 | + | ;Distance[ <Point>, <Object> ]: Yields the shortest distance between a point and an object. |
:{{example|1=<div> | :{{example|1=<div> | ||
:*<code><nowiki>Distance[(2, 1), x^2 + (y - 1)^2 = 1]</nowiki></code> yields ''1'' | :*<code><nowiki>Distance[(2, 1), x^2 + (y - 1)^2 = 1]</nowiki></code> yields ''1'' | ||
− | + | : {{Note| 1=The command works for points, segments, lines, conics, functions and implicit curves. For functions it uses a numerical algorithm which works better for polynomials. }} | |
− | : {{Note| 1=The command works for points, segments, lines, conics and implicit curves.}} | ||
;Distance[ <Line>, <Line> ]: Yields the distance between two lines. | ;Distance[ <Line>, <Line> ]: Yields the distance between two lines. |
Revision as of 18:19, 25 November 2013
- Distance[ <Point>, <Object> ]
- Yields the shortest distance between a point and an object.
- {{example|1=
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.41Distance[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 Distance or Length tool .
Following text is about a feature that is supported only in GeoGebra 5.0.
Note: From GeoGebra 5, this command will work with 3D objects as well |