Google Classroom
GeoGebraGeoGebra Classroom

Length of a path and Polyline trace

This activity belongs to the GeoGebra book The Domain of the Time. OPTION 2: WITHOUT A PREDETERMINED PATH (the option we will choose)

Walker, your footprints are the path, and nothing else. Walker, there is no path; the path is made by walking. Antonio Machado

Calculating the length that a moving object will follow along a trajectory is not always straightforward. If we know the path that the trajectory will take, we can create a polygonal line that fits very well to that path. If we do not know that path or are unaware of its algebraic expression, we can use the trace of the moving object to create that polygonal line. First, we create an empty list (which we will call reg) that will record the data. As the first element of the list, we assign the initial position of the moving object M:

SetValue(reg, {M})

On this list, we create the polygonal line that connects those positions:

pol = Polyline(reg)

Finally, we write the script associated with the moving object M, which will execute each time M updates its position.
SCRIPT ON UPDATING M # Use the polyline as a trace by recording the position of M in the list reg SetValue(reg, Append(reg, M)) Author of the activity and GeoGebra construction: Rafael Losada.