# Difference between revisions of "DynamicCoordinates Command"

From GeoGebra Manual

Line 3: | Line 3: | ||

;DynamicCoordinates[ Point A, Number X, Number Y ] | ;DynamicCoordinates[ Point A, Number X, Number Y ] | ||

:creates a point with coords (X, Y). This point is dependent, but can be moved. Whenever you try to move the new point to coordinates (x,y), point ''A'' is moved there and coordinates for the new point are calculated. Works best if point ''A'' is not [[Object Properties#Visibility|visible]]. At least one of ''X'' and ''Y'' should depend on ''A''. | :creates a point with coords (X, Y). This point is dependent, but can be moved. Whenever you try to move the new point to coordinates (x,y), point ''A'' is moved there and coordinates for the new point are calculated. Works best if point ''A'' is not [[Object Properties#Visibility|visible]]. At least one of ''X'' and ''Y'' should depend on ''A''. | ||

+ | |||

+ | {{Example| | ||

+ | * Create three [[Slider Tool|slider]] a, b, and c with an interval from 0 to 1. | ||

+ | * Create a polygon whose color should be influenced by the slider values. | ||

+ | * Open the [[Properties Dialog]] for the polygon poly1 and enter the names of the three sliders into the text boxes for the color components. | ||

+ | * Close the Properties Dialog and change the values of the sliders in order to find out how each color component influences the resulting color of the polygon. | ||

+ | {{note|You could also animate the sliders with different speeds in order to see the color of the polygon change automatically.}}}} | ||

+ | |||

+ | : '''RGB / HSV / HSL''' {{description}} | ||

+ | |||

{{example| B=DynamicCoordinates[A,round(x(A)),round(y(A))]. You try to move ''B'' to (1.3,2.1) using the [[Image:Tool Move.gif]] [[Move Tool]]. Point ''A'' becomes (1.3,2.1) and ''B'' appears at (1,2). | {{example| B=DynamicCoordinates[A,round(x(A)),round(y(A))]. You try to move ''B'' to (1.3,2.1) using the [[Image:Tool Move.gif]] [[Move Tool]]. Point ''A'' becomes (1.3,2.1) and ''B'' appears at (1,2). | ||

* B=DynamicCoordinates[A,x(A),min(y(A),sin(x(A)))] create a point under under sin(x). PointIn[y<sin(x)] is easier solution in this case.}}}} | * B=DynamicCoordinates[A,x(A),min(y(A),sin(x(A)))] create a point under under sin(x). PointIn[y<sin(x)] is easier solution in this case.}}}} |

## Revision as of 00:55, 18 April 2011

- DynamicCoordinates[ Point A, Number X, Number Y ]
- creates a point with coords (X, Y). This point is dependent, but can be moved. Whenever you try to move the new point to coordinates (x,y), point
*A*is moved there and coordinates for the new point are calculated. Works best if point*A*is not visible. At least one of*X*and*Y*should depend on*A*.

**Example:**

- Create three slider a, b, and c with an interval from 0 to 1.
- Create a polygon whose color should be influenced by the slider values.
- Open the Properties Dialog for the polygon poly1 and enter the names of the three sliders into the text boxes for the color components.
- Close the Properties Dialog and change the values of the sliders in order to find out how each color component influences the resulting color of the polygon.

**Note:**You could also animate the sliders with different speeds in order to see the color of the polygon change automatically.

**RGB / HSV / HSL**Description of command / feature needed. Please enter it instead of this template into Manual:DynamicCoordinates Command. so that it's included also to the public namespace. For more details see Project:HowTo

**Example:**{{{1}}}}}