General properties about the tool's construction
When we constructed the macros, our aim was to give the necessary tools to plot the main objects of the Hyperbolic Geometry to study and understand better their properties. The Geometer Sketchpad allow to plot dynamic objects, so this aim could be reached. The problem was that in the Half-Plane Model the hyperbolic lines are of two different types (from an euclidean view point), so when we want to construct them we have to distinguish this two cases.

For example, if we want to plot a hyperbolic triangle, a natural way to do it, it is plotting one of the segments in a line perpendicular to the boundary line since this is the easiest position from an euclidean view point.

As Sketchpad does not allow to use programming sentences it becomes difficult to distinguish two cases and it was not possible in a first version of this tools. Anyway, as we thought it was important to plot hyperbolic lines perpendicular to the boundary line we modified the tools using that Sketchpad allows to create a tool saving the objects that were constructed but that in the concrete disposition in which we are creating the tool they do not appear. This is exactly what we needed to plot hyperbolic lines in any case.

We also used the macros from Scott Stekette, Boolean Tools, which allows to decided if the values are equal or not.

Let's describe using an example, how we constructed the hyperbolic line:

    (1) Draw the boundary line with points A, B.
    (2) Consider two points C, D.
    (3) Calculate the x coordinate of the two points.
    (4) Use the macro from Scott Stekette that allows to decide if two values are equal or not to compare the last two values.
If we obtain 1 it means that the two values are equal, so we will plot a perpendicular line. If we obtain 0 it means that the two values are different, so we will plot a circle.
    (5) Plot the perpendicular line to the boundary line containing C, and consider its intersection with the boundary line.
    (6) Plot the euclidean ray starting at point, E, and containing A. Note that this ray lies in the boundary line.
    (7) Measure the AEC angle. This angle will measure ±90º, but it will be important to know the exact value.
    (8) Rotate the ray plotted at (6) with an angle (value of step 4).(angle AEC) and with center at point E. We will make a rotation of angle 0º if the two points, C i D, are not in the same perpendicular line. If the two points are in the same perpendicular line then we will make a rotation of angle ±90º. The ray we obtain with this rotation is the hyperbolic line joining the points C, D.
Up to now, we have plotted the hyperbolic line if it is an euclidean ray.

    (9) Move the points C, D so that they will lie at the same perpendicular line. Follow all the steps to construct the hyperbolic line in the case it is an euclidean circle.

Now, we have plotted the hyperbolic in both cases.

Anyway, if you follow these steps you will find that in some cases any hyperbolic line is plotted. That happens when the two points are almost in the same perpendicular line. Then, the euclidean radius of the circle that passes through the two points is "too much" big to be plotted.

To solve this problem we add the following steps:

    (10) Measure the distance between the point E and the center of the circle what should be the hyperbolic line. This center has been plotted as a step to construct the hyperbolic line in the case that the two points do not lie in the same perpendicular line. The point E tends to the intersection point between the circle that joints the points C, D when these two points tend to the same perpendicular line.
    (11) Use the macros Booleans Tools to decide if this distance is bigger than 400. If it is, then the circle will be not plotted.
Now, we use the same idea as before to plot the euclidean ray that joints the points C and D. This ray approximates the hyperbolic. To plot this ray:

    (12) Measure the angle AED.

    (13) Consider the ray with endpoint E containing A. This is the ray plotted in (6).
    (14) Rotate this ray with angle (value of step 10).(angle AEC) and center of rotation E. In this way we make a rotation of angle 0º if the two points are still C i D joined by a circle and a rotation of angle AED if nothing had been plotted.

Now, we can create a tool which constructs the hyperbolic line in the Half-Plane model given any two points.

For all the other tools (segment, ray, parallel lines, perpendicular line,...) we have followed similar steps to obtain the object whatever be the initial position of the defining points.

Hyperbolic geometry
Main page