Tracks in Z.u.L.

Here, I want to tell you more about tracks than you can find in the documentation. I would like to go into the technical details, and give some tips and hints. By the term “track” I refer to tracks of points or lines, not to curves or functions, which are a different story and deserve an own page.

What are tracks?

The very core of dynamical geometry is that objects can be recomputed immediately, when some of the parameters change. Usually, the user will move a point, and the part of the construction that depends on the position of this point updates instantly. This is different from paper or blackboard constructions, but the same in all CAGD (computer aided geometric design) programs. It is, what the user expects the computer to do.

Sometimes, we want to see in retrospect how the construction reacted to changes of its parameters. E.g., we want to see the trace of a construction point Q, if another point P is moved along a certain path. Of course, Q should depend on P to make sense. Z.u.L. can draw such tracks in two ways. Either the user has to move the parameter point P himself, or the program moves P along an object automatically.

User Tracks

Those tracks can be taken from one or more points, while the user moves one parameter point. Usually, the parameter point is bound to a circle or a line, but it can also be a free point. To track more than one point, use the shift key to indicate that the next selection is not the last one. Once, you have chosen all points to track, drag the parameter point with the left mouse button pressed.

The track will disappear, if another tool is chosen, or with the escape key. Like any other tool, the tracking tool is reset with escape. Alternatively, select the tracking tool once more.

This is a very simple example. Four points are tracked, while the rightmost point is dragged. In this case, the dragged point is tracked itself. Note, that for a simple drawing there is the draw tool. But in this case, the other points demontrate a dilatation with factors 3/4, 1/2, and 1/4.

Automatic Tracks

Instead of dragging the point yourself, one may also select a circle or a line to guide the parameter point. The point will then run automatically on the object. There are several problems, which we need to discuss in detail. First let us show a useful example.

We intersect the middle perpendicular line on AB with the radius MB. Now we track the intersection point, while B runs on the circle. As is well known, we get an ellipse. By the way, A and M are the foci.

Note that the each track gets the color and thickness of the tracked point. In this case, we have only one tracked point, but we could have more. To create the example above, choose the tool for automatic tracks, then the point or the points to be tracked (in this case the intersection point), then the object for the parameter point (here the circle), and finally select the object to be moved (the point B).

In the above construction, the point B is bound to the circle. Therefore, we could just as well have used the simple track tool, and drag the point B once around the circle by hand.

However, the automatic track tool not only does all that automatically, but it also chooses a good step size to move B. This speed of movement is even adapted while the point moves to get a smooth looking track. Note, however, that only the first track is smoothed. If you create more than one track, only the first one guides the speed of the moving point. Once, you create more complicated tracks, you will appreciate the way the automatic track tool chooses the step size.

The automatic track tool can animate the track. You will see the parameter point B in the above example running around the circle. It is possible to adjust the speed of the animation by pressing shift-right or shift-left. A click into the construction hides the track and shows the movement only. A further click stops the animation.

After you have stopped the animation, you can drag any point with the right mouse button. E.g., you could track the focus point A in the above example. Once you release the mouse, the track will be computed for the new position of A. The ellipse may look very different then. If A is moved outside the circle, the ellipse will disappear, since the intersection is then invalid for all positions of B.

Tracks with States

Look at the following track.

The point M is the midpoint of AB. The blue segment AB has always the same length. This is achieved by a fixed circle around A, intersecting the other circle. Now imagine A moving on the line to the right. At some point the intersection B will become invalid, and consequently the tracked point M. What happens?

A special feature of automatic tracks is that they can switch intersection points, if any intersection point becomes invalid. Moreover, the direction of movement reverses. This is the reason, why the lower right part of the track is generated and the point A moves to the left. On the other end, the intersection will again become invalid, and the movement reverses once more. It will continue until the orginal state is reached, but at most for one second of computation time.

This may be a bit hard to understand by description, so I ask you to download the construction and try for yourself.

There are more complicated examples, with more than just two states. E.g., a construction with two intersection that may become invalid can have four states. The parameter point might turn back and four times. In the demos, you will find many examples for tracks with states.

Tracks as Objects

As you already know, tracks disappear, if the track tool is reset or another tool is selected. The reason is, that tracks take time to be computed. All you can do is to move points with the right mouse button, or to edit properties of objects with the right mouse button.

But it is possible to keep automatic tracks permanently. However, the user must actively choose to do so. There is a menu item to keep the track and turn it into a construction object (or press ctrl-enter). Now, you can do most things with tracks that you can do with other objects. You can edit their properties, intersect other objects with tracks or bind points on them. Moreover, the tracks will immediately be computed, if anything in the construction changes.

However, you need to take remind that tracks are not easy to compute. If you generate too many tracks, your construction will get too slow to handle the tracks.

Points on tracks are projected to the closest point of the track. The track is treated as a chain of segments connecting the tracked points. One problem are jumps in the track. E.g., a hyperbola jumps from infinity to infinity along the asymptotic lines. I tried to detect these singularities to avoid false parts of the track.

Intersections of tracks with tracks or other objects are computed by projecting a point to one and the other object in turn. After two rounds, the program predicts an intersection using the intersection of the lines that interpolated the known track points. This algorithm is reasonably fast, but may fail in some cases. Especially, for the case when there is no intersection, there must be an upper limit of tries.

Tracks with Conditions (Loci)

This is a well known concept of geometry. E.g., an ellipse can be described as the set (locus) of all points such that the sum of distances to two given points (the foci) is constant. In general, we often seek the set of all points satisfying a certain condition. Sometimes, we know the conditions, but do not know how the set looks like. If we are lucky, it turns out that the set is something simple and well known. Often, it is something weird, and we cannot construct the set directly.

To generate such a track may not be easy. The geometric way to solve the problem is the following. You find a parameter, maybe an angle or a size, such that you can find a point satisfying the given condition with that parameter. E.g., for the ellipse example above the parameter may be the direction to a point on the ellipse from one focus point. You construct a point on the ellipse in the direction AP. This is possible, but not trivial, by using the middle perpendicular on BP. Then you generate a track of S, where the direction point P runs once around the focus point on the black circle.

This works, but it may not be easy to find a good parameter and to construct the point on the locus with that parameter. Moreover, not all points of the locus may be found that way. However, the multiple state tracks will solve this issue most of the time.

If the condition can be easily expressed numerically, one can use numerical number crunchers. Such programs are checking each point of the plane. This is usually called a contour plot. My program Euler does that, as well as MatLab or, somewhat slower, Maple. In Z.u.L., you can use this approach, if the condition has a unique solution depending on some parameter, but in general it is not recommended to use Z.u.L. as a numerical program.

Rene Grothmann (Admin) 2006/02/26 12:02


tutorials/tracks.txt · Last modified: 2007/03/15 16:22 by rene
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki