Left click at the canvas to apply the current action

A duality *d* in the plane assigns points to rects and vice versa,
in a transformation that respects some interesting geometric property, such
as the relative position above/below or inside/outside. It is called duality
due to the fact that when applied twice it leaves the elements unchanged, whether
these are points or rects. In other words, *d ^{2}=Id*.
Although there are other dualities of the plane, the most used in computational
geometry are defined by two conics: the parabola

This duality takes as a reference the parabola *y = x ^{2} / 2* and
the transformations follow the following rule:

*p = (a,b) ↦ D(p) = p ^{*} : y = ax - b*

*l : y = ax + b ↦ D(l) = l ^{*} = (a,-b)*

This duality has the following characteristics:

*d*^{2}= Id.- Every point
*p*corresponds to a dual rect*p*.^{*} - Every non-vertical rect
*r*has a dual point*r*. On the other hand, vertical rects have no image for this duality.^{*} - If
*p*is a point above a rect*r*, then*r*is a point above rect^{*}*p*.^{*} - Given a point
*p*that belongs to the parabola,*p*is the tangent rect to the parabola at the point^{*}*p*. - Given a point
*q*on the plane, let*p*be the vertical projection of*q*on the parabola. Then,*q*is the rect parallel to^{*}*p*whose vertical distance to^{*}*p*is the opposite of the vertical distance between points^{*}*q*and*p*.

This duality takes as a reference the circle *ax ^{2} + by^{2} = 1*
and the transformation are as follows:

*p = (a,b) ↦ D(p) = p ^{*} : ax + by = 1*

*l : ax + by = 1 ↦ D(l) = l ^{*} = (a,b)*

The characteristics of this duality are as follows:

*d*.^{2}= Id- Every point
*p*different than the origin of coordinates (and center of the circumference) has a dual rect*p*. In contrast, the point^{*}*(0,0)*cannot be dualized. - Every rect
*r*that does not pass through the origin corresponds a dual point*r*. On the other hand, the rects by the origin do not have a dual.^{*} - If
*p*is a point of a dualizable rect*r*, then*r*is a point of the rect^{*}*p*.^{*} - If
*p*is a point different than the origin and*r*is a rect that does not go through the origin, and*p*belongs to the half plane determined by*r*that contains the origin, then*r*is a point at the half plane determined by^{*}*p*that does not contain the origin, and vice versa.^{*} - Given a point
*p*that belong to the circumference,*p*is the tangent rect to the circumference at the point^{*}*p*. - Given a point
*q*on the plane, let*p*be the central projection of*q*to the circumference, according to a projection with center at the origin. Then,*q*is the parallel rect to^{*}*p*whose distance to the origin is the inverse to the distance to the origin between the points^{*}*q*and*p*.