[color=#0000ff][i][color=#0000ff][i][color=#999999]This activity belongs to the GeoGebra book [url=https://www.geogebra.org/m/mes4bgft]The Domain of the Time[/url].[/color][/i][/color][/i][/color][br][br]In the previous activity, the slider [b]anima[/b] moved point [color=#3d85c6][color=#0000ff]M[/color][/color] using the instruction:[br][br] SetValue([color=#3d85c6][color=#0000ff]M[/color][/color], Rotate([color=#3d85c6][color=#0000ff]M[/color][/color], [i]dt[/i] [i][color=#6aa84f][color=#ff3366][i]ω[/i][/color][/color][/i], O))[br][br]Instead of using the Rotate command, we can use [i]polar coordinates[/i]. Let's see how.[br][br]In the Cartesian coordinates of a point P([i]x[/i], [i]y[/i]), the coordinates [i]x[/i] and [i]y[/i] represent, respectively, the distances (with their signs) horizontally and vertically from point P to the origin O.[br][br]In polar coordinates P([i]r[/i] ; [i]α[/i]), [i]r[/i] corresponds to the length of the segment OP and α corresponds to the angle, between 0º and 360º, that segment OP makes with the X-axis. Note that, to avoid confusion, we use a semicolon to separate the polar coordinates instead of a comma. For example, the point P(0, −3) is equal to P(3; 270°).[br][br]Para obtener las coordenadas cartesianas de un punto P, GeoGebra usa x(P) e y(P). Para obtener sus coordenadas polares, GeoGebra usa abs(P) y arg(P).[br]To obtain the Cartesian coordinates of point P, GeoGebra uses x(P) and y(P). To obtain its polar coordinates, GeoGebra uses abs(P) and arg(P).[br][list][*][color=#999999]Note: In reality, arg(P) returns an angle between −[color=#999999]180º[/color] and [color=#999999]180º[/color], with negative values corresponding to angles greater than [color=#999999]180º[/color].[/color][br][/*][/list]Polar coordinates are especially useful in rotational motions since point P([i]r [/i]; [i]α[/i]), when varying [i]α[/i], describes a circle centered at the origin with radius [i]r[/i].[br][br]So, if in the UCM of the previous activity, with constant angular velocity [color=#0000ff][color=#6aa84f][color=#ff3366][i]ω[/i][/color][/color][/color], O is the origin of coordinates, then point [color=#3d85c6][color=#0000ff]M[/color][/color] has polar coordinates ([i]r [/i]; [i]t[/i] [color=#ff3366][i]ω[/i][/color][color=#3d85c6][color=#0000ff])[/color][/color], allowing us to move [color=#3d85c6][color=#0000ff]M[/color][/color] with the instruction:[br][br] SetValue([color=#3d85c6][color=#0000ff]M[/color][/color], ([i]r[/i] ; [i]t[/i] [color=#6aa84f][color=#ff3366][i]ω[/i][/color][/color]))[br][br]The angle that [color=#3d85c6][color=#0000ff]M[/color][/color] forms with the origin is obtained with arg([color=#0000ff]M[/color]).[br][br]If we want to generalize to the case where O is not the origin, we just need to add its coordinates:[br][br] SetValue([color=#3d85c6][color=#0000ff]M[/color][/color], O + ([i]r[/i] ; [i]t[/i] [color=#ff3366][i]ω[/i][/color]))[br][br]In that case, the angle that [color=#0000ff]M[/color] forms with the origin of coordinates is obtained with arg([color=#0000ff]M-O[/color]).[br][br]After the construction, you can see how the script of the slider [b]anima [/b]looks.
[b]SCRIPT FOR SLIDER anima[/b][br][br][color=#cc0000][color=#cc0000]# Calculate the elapsed seconds dt; add one second if t1(1) < tt[/color][/color][br][color=#999999]SetValue(tt, t1(1))[br]SetValue(t1, First(GetTime(), 3))[br]SetValue(dt, (t1(1) < tt) + (t1(1) − tt)/1000)[/color][br][br][color=#cc0000]# [color=#cc0000]Register the lap time and the number of laps completed[/color][br][/color][color=#0000ff]SetValue(reg, If(arg(M − O) < 0 ∧ arg(M − O) + dt ω ≥ 0, Append(t, reg), reg)) [/color][br][color=#0000ff][color=#0000ff]SetValue[/color](laps, If(arg(M − O) < 0 ∧ arg(M − O) + dt ω ≥ 0, laps+ 1, laps))[/color][color=#cc0000][br][br]# Move M[br][/color][color=#0000ff][color=#0000ff][color=#0000ff]SetValue[/color][/color](M, O + (r; t ω))[/color][br][br][br][br][br][color=#999999][color=#999999][color=#0000ff][color=#0000ff][color=#999999][color=#999999]Author of the activity and GeoGebra construction: [/color][/color][/color][color=#0000ff][color=#999999][color=#999999][url=https://www.geogebra.org/u/rafael]Rafael Losada[/url].[/color][/color][/color][/color][/color][/color]