PathParameter Command

From GeoGebra Manual
Jump to: navigation, search


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 \mathrm{\mathsf{ f(x)=\frac{x}{1+|x|} }} is a function used to map all real numbers into interval (-1,1) and \mathrm{\mathsf{ \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 \mathrm{\mathsf{ \frac{f(\phi(X,A,B))+1}2 }}
Ray AB \mathrm{\mathsf{ f(\phi(X,A,B)) }}
Segment AB \mathrm{\mathsf{ \phi(X,A,B) }}
Circle with center C and radius r Point \mathrm{\mathsf{ X=C+(r\cdot cos(\alpha),r\cdot sin(\alpha)) }}, where \mathrm{\mathsf{ \alpha\in(-\pi,\pi) }} has path parameter \mathrm{\mathsf{ \frac{\alpha+\pi}{2\pi} }}
Ellipse with center C and semiaxes \mathrm{\mathsf{ \vec{a} }}, \mathrm{\mathsf{ \vec{b} }} Point \mathrm{\mathsf{ X=C+\vec{a}\cdot cos(\alpha)+\vec{b}\cdot sin(\alpha) }}, where \mathrm{\mathsf{ \alpha\in(-\pi,\pi) }} has path parameter \mathrm{\mathsf{ \frac{\alpha+\pi}{2\pi} }}
Hyperbola
Parabola with vertex V and direction of axis \mathrm{\mathsf{ \vec{v} }}. Point \mathrm{\mathsf{ V+p\cdot t^2\cdot \vec{v}+p\cdot t \cdot \vec{v}^{\perp} }} has path parameter \mathrm{\mathsf{ \frac{f(t)+1}2 }}.
Polyline A1...An If X lies on AkAk+1, path parameter of X is \mathrm{\mathsf{ \frac{k-1+\phi(X,A,B)}{n} }}
Polygon A1...An If X lies on AkAk+1 (using An+1=A1), path parameter of X is \mathrm{\mathsf{ \frac{k-1+\phi(X,A,B)}{n+1} }}
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 \mathrm{\mathsf{ \frac{k-1+t}{n} }}
List of points L={A1,...,An} Path parameter of Ak is \mathrm{\mathsf{ \frac{k-1}{n} }}. Point[L,t] returns \mathrm{\mathsf{ A_{\lfloor tn\rfloor+1} }}.
Locus
Implicit polynomial No formula available.

© 2018 International GeoGebra Institute