texlive[54659] Master/texmf-dist: euclideangeometry (10apr20)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 12 00:24:25 CEST 2020


Revision: 54659
          http://tug.org/svn/texlive?view=revision&revision=54659
Author:   karl
Date:     2020-04-12 00:24:25 +0200 (Sun, 12 Apr 2020)
Log Message:
-----------
euclideangeometry (10apr20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/euclideangeometry/README.txt
    trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.pdf
    trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.tex
    trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry.pdf
    trunk/Master/texmf-dist/source/latex/euclideangeometry/euclideangeometry.dtx
    trunk/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty

Modified: trunk/Master/texmf-dist/doc/latex/euclideangeometry/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/euclideangeometry/README.txt	2020-04-11 22:23:52 UTC (rev 54658)
+++ trunk/Master/texmf-dist/doc/latex/euclideangeometry/README.txt	2020-04-11 22:24:25 UTC (rev 54659)
@@ -10,7 +10,7 @@
 %%   License information appended
 %% 
 File README.txt for package euclideangeometry
-        [2020-02-12 v.0.1.5 Extension package for curve2e]
+        [2020-03-30 v.0.1.7 Extension package for curve2e]
 
 The package bundle euclideangeometry is composed of the following files
 

Modified: trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.tex	2020-04-11 22:23:52 UTC (rev 54658)
+++ trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry-man.tex	2020-04-11 22:24:25 UTC (rev 54659)
@@ -884,7 +884,7 @@
 \cs{IntersecionOfLines}\parg{point1}\parg{dir1} and\parg{point2}\parg{dir2}
 \qquad to\meta{vector}
 \end{ttsyntax}
- were each line is identified with its \meta{point} and its direction
+ were each line is identified with its \meta{point} and its \emph{direction}
  \meta{dir}; the intersection coordinates go to the output \meta{vector}.
 
 \item A second command\cs{IntersectionOfSegments} does almost the same
@@ -898,7 +898,59 @@
  Again the intersection point coordinates go to the output \meta{vector}.
  The first segment is between points 11 and 12, and, similarly, the second
  segment is between points 21 and 22.
-
+\item Another “intersection” command is \cs{IntersectionsOfLine} to 
+ determine the two intersection of a line with a circle. The syntax is:
+ \begin{ttsyntax}
+\cs{IntersectionsOfLine}\parg{point}\parg{dir}WithCircle\parg{center}\marg{radius}to\meta{int1} and\meta{int2}
+\end{ttsyntax}
+ where \meta{point} and \meta{dir} identify a line with a given direction 
+ and passing through a given point; the circle is identified with its 
+ \meta{center} and \meta{radius}; the intersection points \meta{int1} and 
+ \meta{int2} are the coordinates of the intersection points; If the line 
+ and circle do not intersect, a warning message is issued, shown in the 
+ console and written to the \file{.log} file; the intersection points are 
+ assigned the default values \texttt{0,0}, which evidently produce strange 
+ results in the output document, so as to remind the user to give a look 
+ to the \file{.log} file and to review his/her data.
+\item It is difficult to numerically determine the coordinates of the 
+ intersection points of two circles; it becomes easier if one of the 
+ intersections is known; To this end, a macro to draw a circle with a 
+ given center and passing through a given point is handy:
+\begin{ttsyntax}
+ \cs{CircleThrough}\meta{point}WithCenter\marg{center}
+\end{ttsyntax}
+ draws such circumference.
+\item With the above macro it becomes easy to draw two circumferences 
+ with different centers and passing through the same point; therefore 
+ it becomes determine the other intersection point by means of the 
+ following macro:
+\begin{ttsyntax}
+\cs{Segment}\parg{endpoint1}\parg{endpoint2}SymmetricPointOF\meta{p1} 
+ to\meta{p2}
+\end{ttsyntax}
+ The computation is simple, because the second intersection is the 
+ symmetrical point \meta{p2} of \meta{p1} with respect to the segment 
+ that joins the centers of the given circles intersecting one another 
+ in \meta{p1}.
+\item It would be interesting to solve the same problem with help of 
+ the following macro relating to right triangles identified with their 
+ hypothenuse and one of its legs; the other leg is found by means of this 
+ macro:
+\begin{ttsyntax}
+\cs{LegFromHypothenuse}\meta{length1} AndOtherLeg\meta{length2} 
+ to\marg{length3}
+\end{ttsyntax}
+ since  the intersection points of two circles define their common chord;
+  this chord and the two circle centers define two isosceles triangles 
+  with the same base; therefore the segment joining the circle radii, 
+  coincides whit the chord axis and divides each isosceles triangle in 
+  two right triangles, where the hypotenuse is one of two radii and the 
+  first leg is the distance from the chord middle point, intersection of 
+  the chord and the segment joining the circle centers; at this point the 
+  distance of the second point intersection from the chord middle point 
+  and the coordinates of the second intersection may be easily computed; 
+  of course this is a much clumsier way to determine the second 
+  intersection, but it is useful to solve this right triangle  easy problem.
 \item Command \cs{ThreePointCircle} draws a circle that goes through three
  given points; the syntax is the following:
 \begin{ttsyntax}
@@ -908,7 +960,6 @@
  the coordinates of the center of the circle, that might be useful even
  if the circle is not drawn; the optional asterisk, if present, does not
  draw the circle, but the center is available.
-
 \item Alternatively
 \begin{ttsyntax}\setfontsize{10.5}
  \cs{ThreePointCircleCenter}\parg{point1}\parg{point2}\parg{point3}to\meta{vector}
@@ -931,7 +982,7 @@
 \end{ttsyntax}
  Apparently these two commands do the same, but, no, they behave
  differently: in the former command the \meta{Radius} is a vector the
- modulus of which si computed and used as the radius; in the latter
+ modulus of which is computed and used as the radius; in the latter
  command the \meta{radius} is a scalar and (its magnitude) is directly
  used.
 
@@ -1497,6 +1548,64 @@
 \end{figure*}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{ Intersections involving circles}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Determining the intersection of two circles is difficult; algebraically it requires the solution of second degree equations whose coefficients are sort of complicated expressions of the centers and radii; furthermore such equations might not have real roots. The problems are much simpler even geometrically when one circle is intersected by a line, and when two circles share a common point. In the first case there are two intersections, possibly coincident, if the centers distance is shorter than the sum of their radii; in the second case its easy to determine the chord common to both circles and the problem of finding the second intersection becomes that of finding the second end point of the chord.
+
+Figure~\ref{fig:circle-and-line} shows the simple geometrical construction that leads to the determination of the intersections; one of the lines is tangent to the circle and the intersection points $P_3$ and $P_4$ coincide.
+
+\begin{figure}
+\begin{Esempio}[\setfontsize{9}]
+\unitlength=0.007\linewidth
+\begin{picture}(100,100)
+\AutoGrid
+\IntersectionsOfLine(100,50)(0,20)%
+  WithCircle(40,40){30}to\Puno and\Pdue
+\Pbox(\Puno)[tl]{P_1}[2]
+\Pbox(\Pdue)[t]{P_2}[2]
+\Dotline(\C)(\Pt){2}[1.5]
+\Dotline(\C)(\Pq){2}[1.5]
+\Pbox(\Int)[t]{M}[2]
+\Dotline(\C)(\Int){2}[1.5]
+%
+\IntersectionsOfLine(0,70)(100,70)%
+  WithCircle(40,40){30}to\Ptre and\Pquat
+\Pbox(\Ptre)[bl]{P_3}[2]
+\Pbox(\Pquat)[br]{P_4}[2]
+\IntersectionsOfLine(0,40)(100,100)%
+  WithCircle(40,40){30}to\Pcin and\Psei
+\Pbox(\Pcin)[br]{P_5}[2]
+\Pbox(\Psei)[t]{P_6}[2]
+\end{picture}
+\end{Esempio}
+\caption{Intersection of a circle with several lines}\label{fig:circle-and-line}
+\end{figure}
+
+Figure~\ref{fig:two-intersecting-circles} shows the geometrical construction to determine the second intersection point $P_2$ of two circles that already have a first common point $P_1$. The common chord and the segment joining the centers are not shown, but the code, although with “strange” point names, shows all the steps necessary to find the second intersection point
+
+
+\begin{figure}\centering
+\begin{Esempio}[\setfontsize{9}]
+\unitlength0.007\linewidth
+\begin{picture}(100,100)
+\AutoGrid
+\edef\PCCuno{30,40}
+\edef\PCCdue{70,60}
+\edef\PCCzero{40,55}
+\Pbox(\PCCuno)[t]{C_1}[2]
+\Pbox(\PCCdue)[t]{C_2}[2]
+\Pbox(\PCCzero)[l]{P_1}[2.5]
+\CircleThrough\PCCzero WithCenter\PCCuno
+\CircleThrough\PCCzero WithCenter\PCCdue
+\Segment(\PCCuno)(\PCCdue)%
+  SymmetricPointOf\PCCzero to\PCCquat
+\Pbox(\PCCquat)[l]{P_2}[2.5]
+\end{picture}
+\end{Esempio}
+\caption{Second intersection point $P_2$ of two circles sharing a first intersection point $P_1$}\label{fig:two-intersecting-circles}
+\end{figure}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \subsection{Triangles and their special lines}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -1704,6 +1813,51 @@
 \end{figure}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{The tangent to an ellipse}\label{ssec:diretriz}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Ellipses have mani interesting properties. One that I was not able to find anywhere in the documentation I examined (of course not the totality  of available on ellipses, except an on-line document written in Portuguese by Sergio Alvez, \url{https://docplayer.com.br/345411-Elipses-inscritas-num-triangulo.html}, is the \emph{director circumference}, literal translation of the Portuguese definition \emph{circunfência diretriz}.
+
+Consider an ellipse with its foci $F$ en $F'$, and a generic point $P$ on its contour.
+Trace a segment from $F\,P$  and another segment for $P\,F'$; these segments measure the distanced from point $P$ to each focus: their sum is the length of the main ellipse axis $2a$, being $a$ the semi axis. Now lengthen the segment $P\,F'$ to point $S$ by the length of $F\,P$; the length of $S\,F'$ is therefore equal to $2a$; now trace the circumference with center in $F'$ and radius $2a$; this is the \emph{director circumference}, that is labelled with~$\Gamma$.
+
+By construction, then, the circle $\gamma$ centred in $F$ and radius equal to $F\,P$ is tangent to $\Gamma$ in $S$ and passes through $F$. This allows to say that:
+\begin{itemize}[noitemsep]
+\item the ellipse is the locus of the centres of all circles passing through  focus $F$ and internally tangent to the circle $\Gamma$ centred in the other focus $F'$ and with radius $2a$;
+\item the axis of segment $S\,F$ is tangent to the ellipse;
+\item the tangency point is the point $P$;
+\item since this axis  passes through the midpoint $M$ of segment $S\,F$ and it is perpendicular to it, the segment $M\,P$ has the same direction of the tangent to the ellipse;
+\item notice that points $S$ and $F$ are symmetrical with respect to the tangent in point $P$.
+\end{itemize}
+Such properties can be viewed and controlled in figure~\ref{fig:diretriz}.
+
+\begin{figure}[!tb]\centering
+\begin{Esempio}*[\setfontsize{8.2}](0.40)
+\unitlength=0.005\linewidth
+\begin{picture}(170,160)(-60,-80)
+\GraphGrid(-60,-80)(170,160)
+\VECTOR(0,-80)(0,80)\Pbox(0,80)[r]{y}[0]
+\VECTOR(-60,0)(110,0)\Pbox(110,0)[t]{x}[0]
+\edef\A{40}\edef\B{30}\Xellisse{\A}{\B}[\thicklines]
+\edef\X{\fpeval{\A*cosd(120)}}\edef\Y{\fpeval{\B*sind(120)}}
+\edef\P{\X,\Y}\Pbox(\P)[b]{P}[3]
+\edef\C{\fpeval{sqrt(\A**2-\B**2)}}% Inter focal semi distance
+\CopyVect-\C,0 to\F \CopyVect\C,0 to\Fp\Pbox(\Fp)[t]{F'}[3]
+\Pbox(\F)[t]{F}[3]\Pbox(0,0)[tr]{O}[3]
+\edef\Raggio{\fpeval{2*\A}}\Circlewithcenter\Fp radius\Raggio
+\SegmentLength(\P)(\F)to\raggio\Circlewithcenter\P radius\raggio
+\SegmentArg(\Fp)(\P)to\Arg\AddVect\Fp and\Arg:\Raggio to\S
+\segment(\Fp)(\S)\Pbox(\S)[br]{S}[3]
+\segment(\F)(\S)\SegmentCenter(\F)(\S)to\M
+\Pbox(\M)[r]{M}[3]\SegmentArg(\F)(\S)to\Arg
+\edef\Arg{\fpeval{\Arg-90}}\AddVect\M and \Arg:50 to\D\segment(\M)(\D)
+\end{picture}
+\end{Esempio}
+\caption{The director circumference}\label{fig:diretriz}
+\end{figure}
+
+Of course the geometrical construction of figure~\ref{fig:diretriz} can be used also in reverse order; for example it may be given a line to play the role of the tangent, a point on  this line to play the role of tangency, and a point not belonging to the line to play the role of a focus, then it is possible to find the other focus laying on a horizontal line passing through the given focus. It suffices to find the symmetrical point of the first focus with respect with the given line, and to draw a line passing through this symmetrical point and the point of tangency that intersects the  horizontal line through the first focus, concluding that this is the second focus and that the ellipse major axis length is that of the segment joining this second focus with the above mentioned symmetrical point.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \subsection{A triangle internally tangent ellipse given one of its foci}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -1715,6 +1869,8 @@
  one point of tangency, because the focal distance and the sum of
  distances of that tangency point from the foci, is sufficient to
  determine all the parameters required to draw the ellipse.
+ 
+ As seen in the previous subsection~\ref{ssec:diretriz}, it is sufficient to find the threes symmetrical point of The given focus with respect to to the three sides, i.e. the three lines that pass through the triangle vertices; and the constructions gives simultaneously the major axis length and the three tangency points, therefore all the elements required to draw the ellipse. to draw
 
 \begin{figure}[!tb]\centering
 \begin{Esempio}[\setfontsize{7}](0.375)
@@ -1740,27 +1896,27 @@
 \end{figure}
 
 
- The geometrical construction is rather complicated; the steps to follow
+ The geometrical construction with help of what has been explained in 
+ subsection~\ref{ssub:diretriz} is easy; the steps to follow, therefore 
  are the following:\enlargethispage*{\baselineskip}
 \begin{itemize}[noitemsep]
 
 \item draw the triangle and the given focus $\mathsf{F}$;
 
-\item Find the symmetrical points $\mathsf G_i$ of this focus with 
- respect to the sides of the triangle;
+\item Find the symmetrical points $\mathsf S_i$ of this 
+focus with respect to the sides of the triangle;
 
-\item use these three points $\mathsf G_i$ as the vertices of a triangle
- with which to draw its circumcircle, actually only its center is of
+\item use these three points $\mathsf S_i$ as the vertices of a triangle
+ with which to draw its circumcircle that turns to be the \emph{director circumference}; actually only its center is of
  interest, because it represents the second focus $\mathsf F'$; the
  inter focal distance  $2c$; is just le length of vector $F' -F$;
 
-\item join with segments each symmetrical point $\mathsf G_i$ with the
+\item join with segments each symmetrical point $\mathsf S_i$ with the
  second focus $\mathsf F'$ and find their intersections $\mathsf T_i$
  with the triangle sides; they represent the tangency points of the
  ellipse to be drawn;
 
-\item use one of these tangency points to find its distances from the
- foci; their sum gives the ellipse larger axis length $2a$;
+\item the radius of the director circumference is the ellipse major axix;
 
 \item equation~\eqref{equ:axes-foci} allows to find the second axis
  length; the segment that joins the foci has the required inclination

Modified: trunk/Master/texmf-dist/doc/latex/euclideangeometry/euclideangeometry.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/euclideangeometry/euclideangeometry.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/euclideangeometry/euclideangeometry.dtx	2020-04-11 22:23:52 UTC (rev 54658)
+++ trunk/Master/texmf-dist/source/latex/euclideangeometry/euclideangeometry.dtx	2020-04-11 22:24:25 UTC (rev 54659)
@@ -45,7 +45,7 @@
 %<package>\ProvidesPackage{euclideangeometry}%
 %<readme>File README.txt for package euclideangeometry
 %<*package|readme>
-        [2020-02-12 v.0.1.5 Extension package for curve2e]
+        [2020-03-30 v.0.1.7 Extension package for curve2e]
 %</package|readme>
 %<*driver>
 \documentclass{ltxdoc}\errorcontextlines=100
@@ -154,7 +154,7 @@
 % installed with your updated  complete \TeX system installation.
 
 % Please refer to the user manual before using this package.
-% \CheckSum{1108}
+% \CheckSum{1193}
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %\StopEventually{}
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -215,7 +215,8 @@
 % is |\Pbox| and it produces a box containing the label in math format. By
 % default the point label is typeset with the math font variant produced
 % by command |\mathsf|, but the macro is sufficiently versatile to allow
-% other settings; It accepts several optional arguments, therefore it syntax is particular:
+% other settings; it accepts several optional arguments, therefore it
+% syntax is particular:
 %\begin{ttsyntax}
 %\cs{Pbox}\parg{coordinates}\oarg{alignment}\marg{label}\oarg{diameter}\meta{$\star$}\aarg{angle}
 %\end{ttsyntax}
@@ -228,7 +229,9 @@
 % specification, the couple \texttt{cc} is assumed; most often than
 % not, the label position becomes such that when the user reviews the
 % document drafts, s/he understands immediately that s/he forgot to specify
-% some reasonable \meta{alignment} codes. Think of the \meta{alignment}
+% some reasonable \meta{alignment} codes; in any case the \texttt{cc} code
+% works fine to just put the dot of a specified diameter but with an empty
+% label. Think of the \meta{alignment}
 % letters as the position of the reference point with respect to the
 % the \meta{label} optical center. The optional \meta{angle} argument
 % produces a rotation of the whole label by that angle; it may be used
@@ -238,23 +241,27 @@
 % 
 % The optional asterisk draws a frame around the \emph{label}. Notice that
 % the separator between the visible or the invisible frame and the box
-% contents varies according the the fact the the \meta{alignment}
+% contents varies according the the fact that the \meta{alignment}
 % specification contains just one or two letter codes; this is useful,
 % because the diagonal position of the label should be optically equal
-% to the gap that exists between the reference point  and the \meta{label}
+% to the gap that exists between the reference point and the \meta{label}
 % box.
 %
 % If the \meta{diameter} is zero, no dot is drawn, the whole \meta{label}
 % is typeset with the |\mathit| math font; otherwise only the first symbol
-% of a math expression si typeset in sans serif. The presence of subscripts
+% of a math expression is typeset in sans serif. The presence of subscripts
 % makes the labels appear more distant from their reference point; the same
 % is true when math symbols, even without subscripts, are used, because
-% of the oblique nature of the math letters alphabet.
+% of the oblique nature of the math ‘letters’ alphabet.
 % 
 % If some text has to be printed as a label, it suffices to surround it
 % with  dollar signs, that switch back to text mode when the default mode
 % is the math one. With this kind of textual labels it might be convenient
 % to use the optional asterisk to frame the text.
+% The final optional argument \meta{angle} (to be delimited with the
+% \texttt{<~>} signs) specifies the inclination of the label with respect
+% to the horizontal line; it is useful, for example to set a label along
+% a sloping line.
 %    \begin{macrocode}
 \providecommand\Pbox{}
 \newlength\PbDim
@@ -577,6 +584,108 @@
 \let\MiddlePointOf\SegmentCenter
 %    \end{macrocode}
 %
+% Some other macros are needed to solve certain triangle problems;
+% one of such macros is the one allows to determine the length of one
+% leg of a right triangle by knowing the lengths of the hypothenuse
+% and the other leg. The syntax is the following:
+%\begin{ttsyntax}
+%\cs{LegFromHypotenuse}\meta{hypothenuse} AndOtherLeg\meta{leg1} to\meta{leg2}
+%\end{ttsyntax}
+% where the three parameters may be macros, especially the last one;
+% all of them contina scalar values.
+%
+%    \begin{macrocode}
+\def\LegFromHypotenuse#1AndOtherLeg#2to#3{%
+  \edef#3{\fpeval{sqrt(#1**2-#2**2)}}}
+%    \end{macrocode}
+%
+% Another useful macro determines the two intersections of a line with
+% a circumference if they exist; otherwise it issues a warning and sets
+% both output values to vector \texttt{0,0}, which, of course, is wrong,
+% but it allows to go on with typesetting, although with non sense results.
+% Warnings do not stop the compilation program, therefore their message
+% goes to the \file{.log} file and the user might not notice it; but
+% since the results are probably absurd, s/he certainly notice this
+% fact and look for messages; the user, therefore, who has carefully
+% read  this user manual, immediately looks onto the \file{.log} file
+% and realises the reason of the wrong results.
+% 
+% The syntax of this macro is the following:
+%\begin{ttsyntax}
+%\cs{IntersectionsOfLine}\parg{point}\parg{direction} WithCircle\parg{center}\marg{radius} to\meta{int1} and\meta{int2}
+%\end{ttsyntax}
+% where \meta{point} and \meta{direction} are the line parameters
+% that can be explicit complex values or macros; \meta{center} is
+% the circumference explicit complex value, or a macro, containing
+% the center coordinates; \meta{radius} is the scalar explicit or
+% macro radius length; The intersection points \meta{int1} and
+% \meta{ind2} are supposed to be macros that get defined with the
+% intersection point coordinates; \meta{int1} is the first intersection
+% that is determined along the line \emph{direction}. Please notice the
+% different first part of the macro name \texttt{IntersectionsOfLine}
+% compared to the macro that determines the intersection of two lines
+% \texttt{IntersectionOfLines}: two intersections and one line vs. one
+% intersection with two lines.
+%    \begin{macrocode}
+\def\IntersectionsOfLine(#1)(#2)WithCircle(#3)#4to#5and#6{%
+\CopyVect#3 to\C \edef\R{#4}
+\CopyVect#1to\Pu \CopyVect#2to\Pd
+\Circlewithcenter\C radius\R
+\segment(\Pu)(\Pd)\SegmentArg(\Pu)(\Pd)to\Diru
+\edef\Dird{\fpeval{\Diru+90}}\Pbox(\C)[b]{C}[2]
+\IntersectionOfLines(\Pu)(\Diru:1)and(\C)(\Dird:1)to\Int 
+\SegmentLength(\C)(\Int)to\A
+\fptest{\A > \R}{\PackageError{euclideangeometry}%
+{Distance of line \A\space larger than radius \R. No intersections}%
+{Check your data; correct and retry}}{%
+\LegFromHypotenuse\R AndOtherLeg\A to\B
+\AddVect\Int and\Diru:-\B to\Pt \edef#5{\Pt}
+\SymmetricalPointOf\Pt respect\Int to\Pq \edef#6{\Pq}
+}}
+%    \end{macrocode}
+%
+% Another useful macro determines the point \meta{p2} symmetric
+% to a given point \meta{p1} with respect to a given segment the
+% end points of which are \meta{Segm1} and \meta{Segm2}:
+%\begin{ttsyntax}
+%\cs{Segment}\parg{Segm1}\parg{Segm2}SymmetricPointOf\marg{p1} to\meta{p2}
+%\end{ttsyntax}
+% where, as usual, the input data may be explicit or macro defined
+% coordinates, while the output result should be a macro name.
+%    \begin{macrocode}
+\def\Segment(#1)(#2)SymmetricPointOf#3to#4{%
+\SegmentArg(#1)(#2)to\Sanguno\edef\Sangdue{\fpeval{\Sanguno+90}}
+\IntersectionOfLines(#1)(\Sanguno:1)and(#3)(\Sangdue:1)to\Smed
+\SymmetricalPointOf#3respect\Smed to#4\ignorespaces}
+%    \end{macrocode}
+%
+% Another useful macro draws a circle given its \meta{center}  and the
+% coordinates of the \meta{ponit}  which the circumference should pass
+% through. The syntax is:
+%\begin{ttsyntax}
+%\cs{CircleThrough}\parg{[point}WithCenter\marg{center}
+%\end{ttsyntax}
+% As usual, the parameters are all explicit or macro defined complex
+% numbers.
+%    \begin{macrocode}
+\def\CircleThrough#1WithCenter#2{%
+\SegmentLength(#1)(#2)to\Radius
+\Circlewithcenter#2radius\Radius}
+%    \end{macrocode}
+% The above macro is the building block for a simple macro that draws
+% two circles that cross at a given point; but it is so simple that
+% it is not worth defining a macro: if the user wants to try his/her
+% ability, s/he may define:
+%\begin{flushleft}\obeylines
+%|   \NewDocumentCommand{r() r() r()}{%|
+%|   \CircleThrough#3 WithCenter{#1}|
+%|   \CircleThrough#3 WithCenter{#2}\ignorespaces}|
+%\end{flushleft}
+% where \cs{ignorespaces} may be superfluous, but is always a safety action
+% when defining commands to be used within the \amb{picture} environment.
+% In any case see example~XXX in \file{euclideangeometry-man.pdf}
+%^^A\ref{fig:twocircles-second intersection}.
+%
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \subsection{Triangle special points}
 %^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1195,7 +1304,7 @@
 % The overall macro that executes all the passages described in
 % the above enumeration follows; the reader can easily recognise
 % the various steps, since the names of the macros are self
-% explanatory; the $G_i$ point names are the symmetrical ones
+% explanatory; the $S_i$ point names are the symmetrical ones
 % to the first focus $F$; the $M_i$ points are the centers of
 % symmetry; the $F'$ point is the second focus; the $T_i$ points
 % are the tangency points. The macro |\EllipseWithFOcus| has the
@@ -1225,26 +1334,26 @@
 \IntersectionOfLines(\Pd)(\Au:1)and(\F)(\fpeval{\Au+90}:1)to\Mu
 \IfBooleanTF{#1}{\Pbox(\Mt)[br]{M_3}[1.5pt]\Pbox(\Md)[t]{M_2}[1.5pt]
   \Pbox(\Mu)[b]{M_1}[1.5pt]}{}
-\SymmetricalPointOf\F respect\Mu to\Gu 
-\IfBooleanTF{#1}{\Pbox(\Gu)[l]{G_1}[1.5pt]}{}
-\SymmetricalPointOf\F respect \Md to\Gd 
-\IfBooleanTF{#1}{\Pbox(\Gd)[t]{G_2}[1.5pt]}{}
-\SymmetricalPointOf\F respect \Mt to\Gt 
-\IfBooleanTF{#1}{\Pbox(\Gt)[r]{G_3}[1.5pt]}{}
-\IfBooleanTF{#1}{\ThreePointCircle*(\Gu)(\Gd)(\Gt)}%
-                {\ThreePointCircle(\Gu)(\Gd)(\Gt)}
+\SymmetricalPointOf\F respect\Mu to\Su 
+\IfBooleanTF{#1}{\Pbox(\Su)[l]{S_1}[1.5pt]}{}
+\SymmetricalPointOf\F respect \Md to\Sd 
+\IfBooleanTF{#1}{\Pbox(\Sd)[t]{S_2}[1.5pt]}{}
+\SymmetricalPointOf\F respect \Mt to\St 
+\IfBooleanTF{#1}{\Pbox(\St)[r]{S_3}[1.5pt]}{}
+\IfBooleanTF{#1}{\ThreePointCircle*(\Su)(\Sd)(\St)}%
+                {\ThreePointCircle(\Su)(\Sd)(\St)}
 \CopyVect\C to\Fp \Pbox(\Fp)[l]{F'}[1.5pt]
 \IfBooleanTF{#1}{%
-\Dotline(\F)(\Gt){2}[1.5pt] 
-\Dotline(\F)(\Gd){2}[1.5pt]
-\Dotline(\F)(\Gu){2}[1.5pt]}{}
-\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\Gt)to\Tt
-\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Gd)to\Td
-\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Gu)to\Tu
+\Dotline(\F)(\St){2}[1.5pt] 
+\Dotline(\F)(\Sd){2}[1.5pt]
+\Dotline(\F)(\Su){2}[1.5pt]}{}
+\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\St)to\Tt
+\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Sd)to\Td
+\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Su)to\Tu
 \IfBooleanTF{#1}{\Pbox(\Tu)[l]{T_1}[1.5pt]
 \Pbox(\Td)[b]{T_2}[1.5pt]
 \Pbox(\Tt)[tl]{T_3}[1.5pt]
-\Dashline(\Fp)(\Gu){1}\Dashline(\Fp)(\Gd){1}\Dashline(\Fp)(\Gt){1}}{}
+\Dashline(\Fp)(\Su){1}\Dashline(\Fp)(\Sd){1}\Dashline(\Fp)(\St){1}}{}
 \DistanceAndDirOfVect\Fp minus\Tt to\DFp and\AFu 
 \DistanceAndDirOfVect\F  minus\Tt to\DF and\AF 
 \SegmentCenter(\F)(\Fp)to\CE \Pbox(\CE)[b]{C}[1.5pt]

Modified: trunk/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty	2020-04-11 22:23:52 UTC (rev 54658)
+++ trunk/Master/texmf-dist/tex/latex/euclideangeometry/euclideangeometry.sty	2020-04-11 22:24:25 UTC (rev 54659)
@@ -11,7 +11,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[2019/01/01]
 \ProvidesPackage{euclideangeometry}%
-        [2020-02-12 v.0.1.5 Extension package for curve2e]
+        [2020-03-30 v.0.1.7 Extension package for curve2e]
 
 \RequirePackage{curve2e}
 \@ifpackagelater{curve2e}{2020/01/18}{}%
@@ -132,6 +132,30 @@
 \ScaleVect\Segm by0.5to#3\ignorespaces}
 
 \let\MiddlePointOf\SegmentCenter
+\def\LegFromHypotenuse#1AndOtherLeg#2to#3{%
+  \edef#3{\fpeval{sqrt(#1**2-#2**2)}}}
+\def\IntersectionsOfLine(#1)(#2)WithCircle(#3)#4to#5and#6{%
+\CopyVect#3 to\C \edef\R{#4}
+\CopyVect#1to\Pu \CopyVect#2to\Pd
+\Circlewithcenter\C radius\R
+\segment(\Pu)(\Pd)\SegmentArg(\Pu)(\Pd)to\Diru
+\edef\Dird{\fpeval{\Diru+90}}\Pbox(\C)[b]{C}[2]
+\IntersectionOfLines(\Pu)(\Diru:1)and(\C)(\Dird:1)to\Int
+\SegmentLength(\C)(\Int)to\A
+\fptest{\A > \R}{\PackageError{euclideangeometry}%
+{Distance of line \A\space larger than radius \R. No intersections}%
+{Check your data; correct and retry}}{%
+\LegFromHypotenuse\R AndOtherLeg\A to\B
+\AddVect\Int and\Diru:-\B to\Pt \edef#5{\Pt}
+\SymmetricalPointOf\Pt respect\Int to\Pq \edef#6{\Pq}
+}}
+\def\Segment(#1)(#2)SymmetricPointOf#3to#4{%
+\SegmentArg(#1)(#2)to\Sanguno\edef\Sangdue{\fpeval{\Sanguno+90}}
+\IntersectionOfLines(#1)(\Sanguno:1)and(#3)(\Sangdue:1)to\Smed
+\SymmetricalPointOf#3respect\Smed to#4\ignorespaces}
+\def\CircleThrough#1WithCenter#2{%
+\SegmentLength(#1)(#2)to\Radius
+\Circlewithcenter#2radius\Radius}
 
 \def\TriangleMedianBase#1on#2and#3to#4{%
 \SubVect#1from#2to\TMBu \SubVect#1from#3to\TMBd
@@ -332,26 +356,26 @@
 \IntersectionOfLines(\Pd)(\Au:1)and(\F)(\fpeval{\Au+90}:1)to\Mu
 \IfBooleanTF{#1}{\Pbox(\Mt)[br]{M_3}[1.5pt]\Pbox(\Md)[t]{M_2}[1.5pt]
   \Pbox(\Mu)[b]{M_1}[1.5pt]}{}
-\SymmetricalPointOf\F respect\Mu to\Gu
-\IfBooleanTF{#1}{\Pbox(\Gu)[l]{G_1}[1.5pt]}{}
-\SymmetricalPointOf\F respect \Md to\Gd
-\IfBooleanTF{#1}{\Pbox(\Gd)[t]{G_2}[1.5pt]}{}
-\SymmetricalPointOf\F respect \Mt to\Gt
-\IfBooleanTF{#1}{\Pbox(\Gt)[r]{G_3}[1.5pt]}{}
-\IfBooleanTF{#1}{\ThreePointCircle*(\Gu)(\Gd)(\Gt)}%
-                {\ThreePointCircle(\Gu)(\Gd)(\Gt)}
+\SymmetricalPointOf\F respect\Mu to\Su
+\IfBooleanTF{#1}{\Pbox(\Su)[l]{S_1}[1.5pt]}{}
+\SymmetricalPointOf\F respect \Md to\Sd
+\IfBooleanTF{#1}{\Pbox(\Sd)[t]{S_2}[1.5pt]}{}
+\SymmetricalPointOf\F respect \Mt to\St
+\IfBooleanTF{#1}{\Pbox(\St)[r]{S_3}[1.5pt]}{}
+\IfBooleanTF{#1}{\ThreePointCircle*(\Su)(\Sd)(\St)}%
+                {\ThreePointCircle(\Su)(\Sd)(\St)}
 \CopyVect\C to\Fp \Pbox(\Fp)[l]{F'}[1.5pt]
 \IfBooleanTF{#1}{%
-\Dotline(\F)(\Gt){2}[1.5pt]
-\Dotline(\F)(\Gd){2}[1.5pt]
-\Dotline(\F)(\Gu){2}[1.5pt]}{}
-\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\Gt)to\Tt
-\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Gd)to\Td
-\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Gu)to\Tu
+\Dotline(\F)(\St){2}[1.5pt]
+\Dotline(\F)(\Sd){2}[1.5pt]
+\Dotline(\F)(\Su){2}[1.5pt]}{}
+\IntersectionOfSegments(\Pu)(\Pt)and(\Fp)(\St)to\Tt
+\IntersectionOfSegments(\Pu)(\Pd)and(\Fp)(\Sd)to\Td
+\IntersectionOfSegments(\Pd)(\Pt)and(\Fp)(\Su)to\Tu
 \IfBooleanTF{#1}{\Pbox(\Tu)[l]{T_1}[1.5pt]
 \Pbox(\Td)[b]{T_2}[1.5pt]
 \Pbox(\Tt)[tl]{T_3}[1.5pt]
-\Dashline(\Fp)(\Gu){1}\Dashline(\Fp)(\Gd){1}\Dashline(\Fp)(\Gt){1}}{}
+\Dashline(\Fp)(\Su){1}\Dashline(\Fp)(\Sd){1}\Dashline(\Fp)(\St){1}}{}
 \DistanceAndDirOfVect\Fp minus\Tt to\DFp and\AFu
 \DistanceAndDirOfVect\F  minus\Tt to\DF and\AF
 \SegmentCenter(\F)(\Fp)to\CE \Pbox(\CE)[b]{C}[1.5pt]



More information about the tex-live-commits mailing list.