Formula 1

[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 this construction, which simulates a simple video game, the car's speed depends on the result of applying an acceleration that we can vary with a slider (this same slider can be used to brake, as it allows for negative values). The goal is to complete a lap of the circuit in the shortest time possible, without going off the track.[br][br]If, when the light turns green, we activate the "Practice lap" checkbox, the acceleration will be fixed at a constant value (0.06), putting the car in uniformly accelerated motion, completing each lap in less time (until it goes off the track).[br][list][*]Note: In the construction, the car (or the track) is not to scale.[/*][*]Note: For better performance, it is recommended to download the applet.[/*][/list]
[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]# [/color]Moves M thanks to the acceleration "a" (vt is a unit vector tangent to the track)[/color][br][color=#0000ff]SetValue(v, (abs(v) + dt a) vt)[br]SetValue(Aux, ClosestPoint(circuit, M + dt v))[br]SetValue(M, If(abs(Aux - M) < 0.1, Aux, M + dt v + dt (Aux - M)))[/color][br][br][color=#cc0000][color=#cc0000]# [/color]Registers M for the polyline trace and controls the end[/color][br][color=#999999]SetValue(reg, Append(reg, M))[br][/color][color=#0000FF]StartAnimation(anima, abs(Aux - M) < 0.2)[br]SetValue(crash, abs(Aux - M) ≥ 0.2)[/color][br][br][br][br][br][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]

Información: Formula 1