# “DynamicCoordinates 指令”的版本间的差异

##### 指令分類 （所有指令）

DynamicCoordinates[ 點 A, x 座標, y 座標 ]

`B = DynamicCoordinates[A, x(A), min(y(A),sin(x(A)))]`

• The following examples show other ways to restrain the positions of a point C: let A=Point[xAxis] and B=Point[xAxis]. Now type in the Input bar: `DynamicCoordinates[B, Min[x(B),x(A)],0] `, and press the Enter key, ` SetVisibleInView[B, 1, false]`, and press the Enter key, `SetLayer[C, 1]`, and press the Enter key. Now, C cannot be moved to the right of A.
• Define A=(1,2). Now, type in the Input bar: `SetVisibleInView[A, 1, false]` and press the Enter key, ` B=DynamicCoordinates[A, If[x(A) > 3, 3, If[x(A) < -(3), -3, If[x(A)< 0, round(x(A)), x(A)]]], If[x(A) < 0, 0.5, If[y(A) > 2, 2, If[y(A) <0, 0, y(A)]]]]`, and press the Enter key.
• This example makes A a sticky point when a point C is dragged near it. Define A=(1,2) and B=(2,3). Now, type in the Input bar: `SetVisibleInView[B, 1, false]` and press the Enter key, `C=DynamicCoordinates[B, If[Distance[A, B] < 1, x(A), x(B)], If[Distance[A, B] < 1, y(A), y(B)]]`.

• GeoGebra
• Help
• Partners