summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex')
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex119
1 files changed, 119 insertions, 0 deletions
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
index 3df15a96c4..ac066c69d0 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
@@ -1605,6 +1605,125 @@ Figure~\ref{fig:two-intersecting-circles} shows the geometrical construction to
\caption{Second intersection point $P_2$ of two circles sharing a first intersection point $P_1$}\label{fig:two-intersecting-circles}
\end{figure}
+The following macro allows to determine both intersections, if they exist, of two generic circles; of corse the maro is a little more complicated than the above macro need to find the second intersection when one is already known. Even the reasoning behind the macro is quite different and slightly “creative”.
+
+In facts the reasoning is to avoid any or most analytical computations; analytically it would be quite simple to set up a system of two second degree polynomial equations; after processing such a system it is necessary to solve a second degree equation, but in order to control if there are intersections it should be necessary to discuss the value and sign of the discriminant; it is nothing special when doing all this by hand, but it involves a complicated code in terms of the \LaTeX\ language.
+It is much simpler to reason geometrically; imagine to draw two circles; let $a$ be the distance of their centers, and let $R_1$ and $R_2$ be their radii. Then if
+\[
+|R_1 -R_2| \leq a \leq R_1+R_2
+\]
+the intersections do exist, even if it is possible that the circles are tangent to one another and the two intersection points become a (double) one; this takes place when either ‘equals’ sign applies. I f the left boundary is not satisfied the centers are too close one another and the internal circle is too small compared to the external one. On the opposite if the upper bound is not satisfied the second circle is outside the first one and too far away.
+
+The macro controls the above range, and if the the input data do not satisfy the range boundaries, there are no intersections: a warning message is issued, but computations go on with non sense values for both output coordinates; may be other errors or produced, but in any case the successive drawing lines will not be acceptable; a good sign to the user who may have not noticed the warning message in his/her console, but is immediately “forced” to consult this manual and find out this explanation; s/he will then review his/her code in oder to change the drawing data.
+
+If the data cope with the above range, the computations go on along this simple reasoning, that it drawn in the left part of figure~\ref{fig;Intersections-of-two-circles}. There you see the segment that joins the two centers, and the intersection points to be found. They are the end points of the chord common to both circles; using as vertices the two centers and such chord as the base, two isosceles triangles are formed; the segment joining the centers bisects both triangles forming four right triangles where the hypotenuse is formed by the pertinent radius, and one leg is half the chord; with reference to the right triangles $IC_1P_1$ and $IC_2P_1$, Pithagoras' theorem lets us determine the relation between the common leg $IP_1$ and the other triangle sides; this s the small analytical computation we have to execute, so as to compute the distance $c$ from the center $C_1$ and the common leg length $h$. These two values are sufficient, together with the direction of segment $C_1C_2$ to find the intersection points coordinates.
+
+The syntax il the following
+\begin{ttsyntax}
+\cs{TwoCirclesIntersections}\parg{C1}\parg{C2}withradii\marg{R1} and\marg{R2} to\meta{P1} and\meta{P2}
+\end{ttsyntax}
+Th symbols are self explanatory; as usual, input data (those entered before the keyword \texttt{to}) may be control sequences defined with the necessary data, or explicit data; on the opposite the output ones must be control sequences.
+
+\begin{figure}[!htb]
+\begin{minipage}{0.475\linewidth}
+\unitlength0.01\linewidth
+\begin{picture}(100,100)(-50,-50)
+\AutoGrid
+\VECTOR(-50,0)(50,0) \Pbox(50,0)[tr]{x}[0]
+\VECTOR(0,-50)(0,50) \Pbox(0,50)[l]{y}[0]
+\edef\Kuno{-10,-10}\edef\RKuno{30}%
+\edef\Kdue{20,10}\edef\RKdue{20}
+\thicklines
+\Circlewithcenter\Kuno radius\RKuno
+\Circlewithcenter\Kdue radius\RKdue
+\thinlines
+\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno and\RKdue to\Puno and\Pdue
+\Pbox(\Kuno)[br]{C_1}[4] \Pbox(\Kdue)[bl]{C_2}[4]
+\Pbox(\Puno)[tl]{P_1}[4] \Pbox(\Pdue)[bc]{P_2}[4]
+\put(\Kuno){\Vector(-45:\RKuno)}\Pbox(5,-27)[bl]{R_1}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25, 3)[bl]{R_2}[0]
+ \Pbox(\CI)[t]{I}[4]
+%
+\segment(\Kuno)(\Kdue)\segment(\Puno)(\Pdue)
+\segment(\Kuno)(\Pdue)\segment(\Kdue)(\Pdue)
+\segment(\Kuno)(\Puno)\segment(\Puno)(\Kdue)
+\end{picture}
+\end{minipage}
+\hfill
+\begin{minipage}{0.475\linewidth}
+\unitlength0.01\linewidth
+\begin{picture}(100,100)(-50,-50)
+\AutoGrid
+\VECTOR(-50,0)(50,0) \Pbox(50,0)[tr]{x}[0]
+\VECTOR(0,-50)(0,50) \Pbox(0,50)[l]{y}[0]
+\edef\Kuno{-10,-10}\edef\RKuno{30}%
+\edef\Kdue{20,10}\edef\RKdue{20}
+\thicklines
+\Circlewithcenter\Kuno radius\RKuno
+\Circlewithcenter\Kdue radius\RKdue
+\thinlines
+\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno and\RKdue to\Puno and\Pdue
+\Pbox(\Kuno)[b]{C_1}[4] \Pbox(\Kdue)[b]{C_2}[4]
+\Pbox(\Puno)[tl]{P_1}[4] \Pbox(\Pdue)[b]{P_2}[4]
+\put(\Kuno){\Vector(-45:\RKuno)}\Pbox(5,-27)[bl]{R_1}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25,3)[bl]{R_2}[0]
+\end{picture}
+\end{minipage}
+\caption{Intersections of two generic circles}\label{fig;Intersections-of-two-circles}
+\end{figure}
+
+The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the following.
+
+\begin{Verbatim}
+\begin{minipage}{0.475\linewidth}
+\unitlength0.01\linewidth
+\begin{picture}(100,100)(-50,-50)
+\AutoGrid
+\VECTOR(-50,0)(50,0) \Pbox(50,0)[tr]{x}[0]
+\VECTOR(0,-50)(0,50) \Pbox(0,50)[l]{y}[0]
+\edef\Kuno{-10,-10}\edef\RKuno{30}%
+\edef\Kdue{20,10}\edef\RKdue{20}
+\thicklines
+\Circlewithcenter\Kuno radius\RKuno
+\Circlewithcenter\Kdue radius\RKdue
+\thinlines
+\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno
+ and\RKdue to\Puno and\Pdue
+\Pbox(\Kuno)[br]{C_1}[4] \Pbox(\Kdue)[bl]{C_2}[4]
+\Pbox(\Puno)[tl]{P_1}[4] \Pbox(\Pdue)[bc]{P_2}[4]
+\put(\Kuno){\Vector(-45:\RKuno)}\Pbox(5,-27)[bl]{R_1}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25, 3)[bl]{R_2}[0]
+ \Pbox(\CI)[t]{I}[4]
+%
+\segment(\Kuno)(\Kdue)\segment(\Puno)(\Pdue)
+\segment(\Kuno)(\Pdue)\segment(\Kdue)(\Pdue)
+\segment(\Kuno)(\Puno)\segment(\Puno)(\Kdue)
+\end{picture}
+\end{minipage}
+\hfill
+\begin{minipage}{0.475\linewidth}
+\unitlength0.01\linewidth
+\begin{picture}(100,100)(-50,-50)
+\AutoGrid
+\VECTOR(-50,0)(50,0) \Pbox(50,0)[tr]{x}[0]
+\VECTOR(0,-50)(0,50) \Pbox(0,50)[l]{y}[0]
+\edef\Kuno{-10,-10}\edef\RKuno{30}%
+\edef\Kdue{20,10}\edef\RKdue{20}
+\thicklines
+\Circlewithcenter\Kuno radius\RKuno
+\Circlewithcenter\Kdue radius\RKdue
+\thinlines
+\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno
+ and\RKdue to\Puno and\Pdue
+\Pbox(\Kuno)[b]{C_1}[4] \Pbox(\Kdue)[b]{C_2}[4]
+\Pbox(\Puno)[tl]{P_1}[4] \Pbox(\Pdue)[b]{P_2}[4]
+\put(\Kuno){\Vector(-45:\RKuno)}\Pbox(5,-27)[bl]{R_1}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25,3)[bl]{R_2}[0]
+\end{picture}
+\end{minipage}
+\end{Verbatim}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Triangles and their special lines}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%