Rotations in algebraic geometry

In this applet points A and B are free. C is a point on line AB. The grey circle has a fixed radius with center C. Point R is the rotated image of C around point A with angle α. The rotation is computed numerically. On the other hand, the red circles are the rotated image of the grey circle around point with angle α by using the LocusEquation command. For some angles (0, 90, 180, 270 degrees) there is only one circle: this means that algebraic mapping is unique. In other cases (30, 45, 60, 120, 135, 150, 210, 225, 240, 300, 315, 330 degrees) there are two circles. We will see below why. When there are two circles, they are symmetrical, but this kind of symmetry is not self-explanatory. For example, for 45 degrees the circles are point-symmetrical to point A, but for 30 degrees there is axial symmetry. We will see below why. The purple lines are the rotated image of line AB around A with angle α by using the LocusEquation command. There are usually two lines, in the same cases when there are two red circles. But for angles 45, 135, 225 and 315 degrees the plotting algorithm is very unstable numerically. We will see below why.

One or two red circles?

The LocusEquation command uses polynomials with integer coefficients to describe rotation around a point with a given angle. The general formula to compute the coordinates of R symbolically uses the coordinates of A and C. For simplicity we assume that A=(0,0) and C=(1,0), but we will not lose generality. In this case R=(cosα,sinα). It is well known that trigonometrical functions of most commonly used angles result in irrational numbers. There are some exceptions: if the angle is 0, 90, 180 or 270, then the results are -1, 0 or 1 for cosine and sine of the angle. On the other hand, for example, cos(45°)=sin(45°)=. Since square root of 2 is not an integer, we need to formalize this result as R=(x,y) and , . Now we actually have 3 equations: x=y and and . The solutions for this system are , and , . That is, we have two solutions, and actually we cannot distinguish between 45° and -45°.

Point or axial symmetry?

For 45° we have point symmetry. For 30°, we have somewhat similar equations. Now cos(30°)=, here we need , and for sin(30°)=1/2 we need 2y=1. The solutions for this system are , and , . Since the y-coordinate is rational, we needed a linear equation to define it, but the x-coordinate is irrational (quadratic), so we needed an equation with two solutions to describe it. That is, here we have one axial symmetry for the x-axis. For 45° we actually use two axial symmetries (for both axes) and it results in a point symmetry. For 60° axial symmetry for the y-axis will be obtained because of the same reasons.

Numerical stability

The point symmetry for angles 45, 135, 225 and 315 degrees ensures that a rotation of a line will result in a unique rotation, but the image is actually two lines which are identical. In algebraic geometry the equation of a line is ax+by+c=0 for some a, b and c rational values. The equation for two identical lines is , that is, a product of two (identical) factors. GeoGebra's plotting routine works nicely if it is able to separate the factors, but if it cannot, the result may be very odd. In some cases there may be difficulties on finding that an equation is actually a square of a linear equation, especially when the coordinates are non-integers. For non-integer coordinates there may be some numerical steps to smooth down the computations using only integers, but on some steps the accuracy may be lost. As of December 2016 GeoGebra 5.0.300.0 is capable of plotting the odd cases correctly only when the coordinates of A and B are "nice" numbers, e.g. integers.

15 degrees?

Some angles do not yield any results for the LocusEquation command. The reason is that they are not yet implemented. Such angles are all which are not mentioned above, that is, all other multiples of 15 degrees in this applet. GeoGebra plans adding more angle values in the future and handle the rotation by using a general method. See Wikipedia on some ideas, or try a Google search.