Difference between revisions of "PathParameter Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
m
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|function}}
{{command|function}}
+
;PathParameter( <Point On Path> )
;PathParameter[ <Point On Path> ]
+
:Returns the parameter (i.e. a number ranging from ''0'' to ''1'') of the point that belongs to a [[Geometric Objects#Paths|path]].
:Returns the parameter (i.e. a number ranging from 0 to 1) of the point that belongs to a [[Geometric Objects#Paths|path]].
+
:{{example| 1=<div>Let <code><nowiki>f(x) = x² + x - 1</nowiki></code> and <code><nowiki>A = (1, 1)</nowiki></code> is a point attached to this function. <br><code><nowiki>PathParameter(A)</nowiki></code> yields ''a = 0.47''.</div>}}
 +
 
 +
In the following table <math>f(x)=\frac{x}{1+|x|}</math> is a function used to map all real numbers into interval (-1,1) and
 +
<math>\phi(X,A,B)=\frac{\overrightarrow{AX}\cdot\overrightarrow{AB}}{|AB|^2}</math> is a linear map from line AB to reals which sends A to 0 and B to 1.
 +
{| class=pretty
 +
|-
 +
|Line AB
 +
| <math>\frac{f(\phi(X,A,B))+1}2</math>
 +
|-
 +
|Ray AB
 +
|<math>f(\phi(X,A,B))</math>
 +
|-
 +
|Segment AB
 +
|<math>\phi(X,A,B)</math>
 +
|-
 +
|Circle with center ''C'' and radius ''r''
 +
|Point <math>X=C+(r\cdot cos(\alpha),r\cdot sin(\alpha))</math>, where <math>\alpha\in(-\pi,\pi)</math> has path parameter <math>\frac{\alpha+\pi}{2\pi}</math>
 +
|-
 +
|Ellipse with center ''C'' and semiaxes <math>\vec{a}</math>, <math>\vec{b}</math>
 +
|Point <math>X=C+\vec{a}\cdot cos(\alpha)+\vec{b}\cdot sin(\alpha)</math>, where <math>\alpha\in(-\pi,\pi)</math> has path parameter <math>\frac{\alpha+\pi}{2\pi}</math>
 +
|-
 +
|Hyperbola
 +
|Point <math>X = C \pm \vec{a} ·cosh(t) + \vec{b} ·sinh(t)</math>  has path parameter <math> \frac{f(t)+1}{4}</math> or <math>\frac{f(t)+3}{4}</math>
 +
|-
 +
|Parabola with vertex V and direction of axis <math>\vec{v}</math>.
 +
|Point <math>V+\frac{1}{2}p\cdot t^2\cdot \vec{v}+p\cdot t \cdot \vec{v}^{\perp}</math> has path parameter <math>\frac{f(t)+1}2</math>.
 +
|-
 +
|Polyline A<sub>1...A<sub>n</sub>
 +
|If X lies on A<sub>k</sub>A<sub>k+1</sub>, path parameter of ''X''  is <math>\frac{k-1+\phi(X,A,B)}{n-1}</math>
 +
|-
 +
|Polygon A<sub>1...A<sub>n</sub>
 +
|If X lies on A<sub>k</sub>A<sub>k+1</sub> (using A<sub>n+1</sub>=A<sub>1</sub>), path parameter of ''X''  is <math>\frac{k-1+\phi(X,A,B)}{n}</math>
 +
|-
 +
|List of paths L={p<sub>1</sub>,...,p<sub>n</sub>}
 +
|If X lies on p<sub>k</sub> and path parameter of X w.r.t. p<sub>k</sub> is ''t'', path parameter of ''X'' w.r.t.''L'' is <math>\frac{k-1+t}{n}</math>
 +
|-
 +
||List of points L={A<sub>1</sub>,...,A<sub>n</sub>}
 +
|Path parameter of A<sub>k</sub> is <math>\frac{k-1}{n}</math>. Point[L,t] returns <math>A_{\lfloor tn\rfloor+1}</math>.
 +
|-
 +
|Locus
 +
|
 +
|-
 +
|Implicit polynomial
 +
|No formula available.
 +
|}

Latest revision as of 08:03, 2 June 2019


PathParameter( <Point On Path> )
Returns the parameter (i.e. a number ranging from 0 to 1) of the point that belongs to a path.
Example:
Let f(x) = x² + x - 1 and A = (1, 1) is a point attached to this function.
PathParameter(A) yields a = 0.47.


In the following table f(x)=\frac{x}{1+|x|} is a function used to map all real numbers into interval (-1,1) and \phi(X,A,B)=\frac{\overrightarrow{AX}\cdot\overrightarrow{AB}}{|AB|^2} is a linear map from line AB to reals which sends A to 0 and B to 1.

Line AB \frac{f(\phi(X,A,B))+1}2
Ray AB f(\phi(X,A,B))
Segment AB \phi(X,A,B)
Circle with center C and radius r Point X=C+(r\cdot cos(\alpha),r\cdot sin(\alpha)), where \alpha\in(-\pi,\pi) has path parameter \frac{\alpha+\pi}{2\pi}
Ellipse with center C and semiaxes \vec{a}, \vec{b} Point X=C+\vec{a}\cdot cos(\alpha)+\vec{b}\cdot sin(\alpha), where \alpha\in(-\pi,\pi) has path parameter \frac{\alpha+\pi}{2\pi}
Hyperbola Point X = C \pm \vec{a} ·cosh(t) + \vec{b} ·sinh(t) has path parameter \frac{f(t)+1}{4} or \frac{f(t)+3}{4}
Parabola with vertex V and direction of axis \vec{v}. Point V+\frac{1}{2}p\cdot t^2\cdot \vec{v}+p\cdot t \cdot \vec{v}^{\perp} has path parameter \frac{f(t)+1}2.
Polyline A1...An If X lies on AkAk+1, path parameter of X is \frac{k-1+\phi(X,A,B)}{n-1}
Polygon A1...An If X lies on AkAk+1 (using An+1=A1), path parameter of X is \frac{k-1+\phi(X,A,B)}{n}
List of paths L={p1,...,pn} If X lies on pk and path parameter of X w.r.t. pk is t, path parameter of X w.r.t.L is \frac{k-1+t}{n}
List of points L={A1,...,An} Path parameter of Ak is \frac{k-1}{n}. Point[L,t] returns A_{\lfloor tn\rfloor+1}.
Locus
Implicit polynomial No formula available.
© 2024 International GeoGebra Institute