summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-12 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2023-07-12 03:01:20 +0000
commit0a2934080da36226eca1cdccfd08d76f67dca95a (patch)
tree05d9e44daaf23767fc0f7f9b235bed0ee9c98ee4 /macros/latex/contrib
parent24bb3e3ee10fe79c39e9202be49c62c4d888f4ae (diff)
CTAN sync 202307120301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/euclideangeometry/README.txt6
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdfbin656085 -> 690345 bytes
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex915
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry.dtx37
-rw-r--r--macros/latex/contrib/euclideangeometry/euclideangeometry.pdfbin463894 -> 468809 bytes
5 files changed, 552 insertions, 406 deletions
diff --git a/macros/latex/contrib/euclideangeometry/README.txt b/macros/latex/contrib/euclideangeometry/README.txt
index 0402ef848d..bf20627608 100644
--- a/macros/latex/contrib/euclideangeometry/README.txt
+++ b/macros/latex/contrib/euclideangeometry/README.txt
@@ -1,5 +1,5 @@
File README.txt for package euclideangeometry
- [2021-10-04 v.0.2.1 Extension package for curve2e]
+ [2023-07-11 v.0.2.2 Extension package for curve2e]
This work is "maintained"
@@ -13,12 +13,12 @@ This work consists of files:
euclideangeometry.dtx is the documented TeX source file of package
euclideangeometry.sty obtained by running pdflatex on euclideangeometry.dtx
-euclideangeometry.pdf obtained by running pdflatex on euclideangeometry.dtx
+euclideangeometry.pdf obtained by running pdflatex on euclideangeometry.dtx.
README.txt, this file, contains general information.
euclideangeometry-man.tex and euclideangeometry-man.pdf are
-the source file and the readable document containing the
+the source file and the readable PDF document containing the
end-user manual.
In other words euclideangeometry.pdf is oriented towards the
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
index 85b35db436..e58129e04c 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.pdf
Binary files differ
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
index c59fb6fdda..d439d7bc3a 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry-man.tex
@@ -1,10 +1,6 @@
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = pdflatex
-%%%% NON USARE ZBOX IN QUESTA DOCUMENTAZIONE: EUCLIDEANGEOMERY LO
-%%%% RIDEFINISCE RISPETTO ALLA DEFINIZIONE CONTENUTA IN CURVE2E
-%%%% E LA NUOVA SINTASSI È COMPLETAMENTE DIVERSA.
-
\documentclass[11pt,titlepage,a4paper]{article}\errorcontextlines=100
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
@@ -13,7 +9,6 @@
\usepackage{amsmath,fancyvrb,graphicx,afterpage,etoolbox,trace}
\usepackage{enumitem,xspace,xcolor,euclideangeometry,pm-isomath}
\usepackage{url}
-
\providecommand\file{}
\renewcommand*\file[1]{{\normalfont\texttt{#1}}}
\providecommand\prog{}
@@ -85,7 +80,8 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\vss}%
}%
\kern-.15em%
- \TeX}}\makeatother
+ \TeX}}%
+\makeatother
\DeclareRobustCommand*\TeXLive{\TeX\ Live\xspace}
\DeclareRobustCommand*\MiKTeX{MiK\TeX}
@@ -96,6 +92,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\lower.5ex\hbox{\rotatebox[origin=c]{180}{E}}%
\ifdim\fontdimen1\font=0pt\kern-0.15em\else\kern-0.275em\fi
\LaTeX}
+\DeclareRobustCommand*\LaTeXe{\LaTeX\kern-0,25em\relax2\raisebox{-0.5ex}{$\epsilon$}\xspace}
\DeclareRobustCommand*\TikZ{Ti\emph{k}Z\xspace}
\DeclareRobustCommand*\TUGboat{\textsl{TUG\-boat}\xspace}
@@ -110,16 +107,16 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% It differs from the previous ones because it accepts an optional
% first argument asterisk; if the asterisk is not specified, the
% environment produces the code and the typeset result side by side.
-% If the asterisk is specified, the code is typeset first, and its
-% typeset result is shown below the code.
+% If the asterisk is specified, the code is typeset first, and its typeset
+% result is shown below the code.
% Very handy when the typeset result cannot be shrunk too much and/or
% when the code is really lengthy possibly with lines that are quite long.
% With reasonably short codes and lines that can be folded, the code font
% size can be specified even with a fractional size; obviously, the
-% default value is \normalsize, but, if necessary, it can be specified with
-% something such as [\setfontsize{8,25}] (if the unit of measure is not
-% specified, pt is assumed; otherwise it is possible to specify something
-% such as 2.33mm).
+% default value is \normalsize, but, if necessary, it can be specified
+% with something such as [\setfontsize{8,25}] (if the unit of measure is
+% not specified, pt is assumed; otherwise it is possible to specify
+% something such as 2.33mm).
% When the asterisk is NOT specified, the \textwidth fraction for the
% code may be specified: default is (0.40); the remaining fraction minus
% \columnsep is used for the code typeset result.
@@ -144,19 +141,19 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\DeclareDocumentEnvironment{Esempio}{ s O{\normalsize} D(){0.40} }%
{%
- \par
+ \par%\addvspace{3.0ex plus 0.8ex minus 0.5ex}\vskip -\parskip
\Wboxu=#3\textwidth
\Wboxd=\dimexpr\linewidth-\columnsep-\Wboxu\relax
\VerbatimOut{\jobname-temp.tex}%
}{%
\endVerbatimOut
- \begin{minipage}{\textwidth}%
- \IfBooleanTF{#1}{\begin{minipage}{\textwidth}}{\begin{minipage}{\Wboxu}}%
+ \begin{minipage}{\linewidth}%
+ \IfBooleanTF{#1}{\begin{minipage}{\linewidth}}{\begin{minipage}{\Wboxu}}%
#2\relax
\VerbatimInput{\jobname-temp.tex}
\end{minipage}%
\IfBooleanTF{#1}{\par\bigskip}{\hfill}%
- \IfBooleanTF{#1}{\begin{minipage}{\textwidth}}{\begin{minipage}{\Wboxd}}%
+ \IfBooleanTF{#1}{\begin{minipage}{\linewidth}}{\begin{minipage}{\Wboxd}}%
\raggedleft
\input{\jobname-temp}
\end{minipage}
@@ -165,8 +162,12 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\makeatother
-\newenvironment{ttsintassi}{\begin{lrbox}{0}
-\minipage{\dimexpr\linewidth-2\fboxrule-2\fboxsep}\ttfamily\obeylines}%
+\providecommand\setfontsize{}
+\RenewDocumentCommand\setfontsize{m O{1.2}}{%
+\fontsize{#1}{\fpeval{#2*#1}}\selectfont}
+
+\NewDocumentEnvironment{ttsintassi}{O{}}{\begin{lrbox}{0}
+\minipage{\dimexpr\linewidth-2\fboxrule-2\fboxsep}\ttfamily#1\obeylines}%
{\endminipage\end{lrbox}\center\fbox{\box0}\endcenter}
\let\ttsyntax\ttsintassi \let\endttsyntax\endttsintassi
@@ -177,7 +178,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\CopyVect\X,\Y to#3}
\let\cuore\heart
-\begin{document}
+\begin{document}\errorcontextlines=100
\begin{titlepage}
\thispagestyle{empty}
@@ -205,23 +206,23 @@ Version \fileversion\ of \filedate
\pack{pict2e} package for the standard \env{picture} environment as
defined in the \LaTeX\ kernel source file.
- The \pack{curve2e} package was upgraded a the beginning of 2020; the
- material of this new package, might have been included in the former
- one, but it is so specific, that we preferred defining a standalone
- one; this package takes care of requesting the packages it depends from.
+ The \pack{curve2e} package was upgraded in 2020 and again in 2023; some
+ material of this package, might have been included in the former pict2e
+ one, but it is so specific, that we preferred defining a standalone one;
+ this package takes care of requesting the packages it depends from.
The purpose is to provide the tools to draw most of the geometrical
constructions that a high school teacher or bachelor degree professor
- might need in order to teach geometry. The connection to Euclide depends
- on the fact that in its times calculations were made with ruler,
- compass, and, apparently, also with ellipsograph.
+ might need in order to teach (plane) geometry. The connection to Euclide
+ depends on the fact that in its times calculations were made with ruler,
+ compass, and, apparently, also with the ellipsograph.
The user of this package has available all the machinery provided by
the \pack{pict2e} and \pack{curve2e} packages, in order to define new
functionalities and build macros that draw the necessary lines, circles,
and other such objects, as they would have done in the old times.
- Actually just one macro is programmed to solve a linear system of
- equations
+ Actually just one macro is defined in this package to solve a linear
+ system of equations
\end{abstract}
\tableofcontents
@@ -236,18 +237,18 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The \pack{picture} environment has been available since the very
- beginning of \LaTeX in 1985. At that time it was a really simple
- environment that allowed to draw very simple line graphics with many
- limitations.
+ beginning
+ of \LaTeX in 1985. At that time it was really a simple environment
+ that allowed to draw very simple line graphics with many limitations.
When \LaTeX was upgraded from \LaTeX\!2.09 to \LaTeXe in 1994, Leslie
Lamport announced an upgrade that eventually became available in 2003
- with package \pack{pict2e}; in 2006 I wrote the \pack{curve2e} package
- that added many more functionalities; both packages were upgraded during
- these years; and now line graphics with the \env{picture} environment
- can perform pretty well. The package \pack{euclideangeometry} adds even
- more specific functionalities in order to produce geometric drawings as
- they were possible in the old times, when calculus and analytic geometry
- were not available.
+ with package \pack{pict2e}; in 2006 I wrote the first version of the
+ \pack{curve2e} package that added many more functionalities; both
+ packages were upgraded during these years; and now line graphics with
+ the \env{picture} environment can perform pretty well. The package
+ \pack{euclideangeometry} adds even more specific functionalities in order
+ to produce geometric drawings as they were possible in the old times,
+ when calculus and analytic geometry were not available.
In these years other drawing programs were made available to the \TeX
community; \pack{PSTricks} and \pack{TikZ} are the most known ones, but
@@ -256,10 +257,13 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\pack{pict2e} and \pack{curve2e}, but extends the functionalities with a
very smart handling of coordinate systems, that allow to draw many line
drawings suitable for teaching geometry in high schools and introductory
- courses in the university bachelor degree programs.
-
- It is worth mentioning that an extension of \pack{TikZ}, called \pack{tkz-euclide} is also available in a complete and updated \TeX
- system installation; at the moment its documentation needs some refinements, at least to consistently use a single language, without switching from English to French and viceversa. It aims at the same readership, but it allows to do many more geometrical constructions than \pack{euclideangeometry}.
+ courses in the university bachelor degree programs. It is worth
+ mentioning that an extension of \pack{TikZ}, called \pack{tkz-euclide},
+ is also available in a complete and updated \TeX system installation; at
+ the moment its documentation needs some refinements, at least to
+ consistently use a single language, without switching from English
+ to French and viceversa. It aims at the same readership, but it allows
+ to do many more geometrical constructions, than \pack{euclideangeometry}.
The real difference is that \pack{euclideangemetry} may be easily
expanded without the need of knowing the complex machinery and coding
of the \pack{tkz-euclide} underlaying \pack{TikZ} package.
@@ -270,14 +274,14 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
the recent \pack{curve2e} package.
It is worth mentioning that now \pack{curve2e} accepts coordinates in
- both cartesian and polar form; it allows to identify specific points
- of the drawing with macros, so the same macro can be used over and over
+ both cartesian and polar form; it allows to identify specific points of
+ the drawing with macros, so the same macro can be used over and over
again to address the same point. The package can draw lines, vectors,
arcs with no arrow tips, or with one arrow tip, or with arrow tips at
- both ends, arcs included. The macros for drawing poly lines, polygons,
+ both ends, arcs included. The macros for drawing polylines, polygons,
circles, generic curves (by means of Bézier cubic or quadratic splines)
are already available; such facilities are documented and exemplified
- in the user manual of \pack{curve2e} package.
+ in the user manual of the \pack{curve2e} package.
In what follows there will be several figures drawn with this package;
in the background there is a red grid where the meshes are
@@ -305,13 +309,16 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
We remember the package dependencies; the primary dependence is package
\pack{curve2e} with a version date more recent or equal to 2020-01-18.
- On turn \pack{curve2e} requires packages \pack{xparse} and \pack{xfp};
+ On turn \pack{curve2e} requires packages \pack{xparse} and
+ \pack{xfp}\footnote{Most functionalities of \pack{xfp} are already
+ included into the \LaTeXe kernel, but this package uses also some
+ functionalities that have not made their way to the kernel.};
missing these two package, it loads its own previous version, that does
not use such packages, but their absence forbids it working, so that,
- after a very visible error message, it directly aborts. It also depends
- on \pack{etoolbox}.
- The chain of dependencies of the above first level packages may be
- controlled directly on those packages documentation
+ after a very visible error message, it directly aborts.
+ It also depends on \pack{etoolbox}. The chain of dependencies of the
+ above first level packages may be controlled directly on those packages
+ documentation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Loading \pack{euclideangeometry}}
@@ -327,8 +334,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\meta{options} are only those usable by \pack{pict2e} because neither
\pack{curve2e} nor \pack{euclideangeometry} use any option. If the
user is invoking \pack{euclideangeometry}, it is certain s/he does
- not want to use the native picture environment, but the modern
- extended one; therefore the only meaningful possible options are
+ not want to use the modern extended picture environment, not the native
+ one; therefore the only meaningful possible options are
\opt{latex} and \opt{pstricks}; such options influence only the shape
of the arrow tips; with option \opt{latex} they are triangular,
while with \opt{pstricks} they have the shape of a stealth
@@ -346,9 +353,10 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\section{Available commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- The commands available with the first extension \pack{pict2e} to the native
- \amb{picture} environment, maintain their names but do not maintain the
- same restrictions; in particular there are the following improvements.
+ The commands available with the first extension \pack{pict2e} to the
+ native \amb{picture} environment, maintain their names but do not
+ maintain the same restrictions; in particular there are the following
+ improvements.
\begin{enumerate}[noitemsep]
\item Lines and vectors are drawn as usual by \cs{put}ting in place
their forms, but their inclinations are not limited to a small set of
@@ -367,7 +375,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item Ovals may be specified the corner curvature; the default
size of the quarter circles that make up the oval corners may be
specified; if no specification is given the radius of such corners
- is the maximum that can be fitted in the oval; in practice it is
+ is the maximum that can fit into the oval; in practice it is
half the shortest value between the oval height and width.
\item The quadratic Bézier splines do not require the specification
@@ -390,8 +398,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item The new command \cs{Line} traces a segment from one given point
to another point; it is very convenient to specify the end points
- instead of the slope the line must have to go form the starting
- point to the ending one. The command does not require the \cs{put}
+ instead of the slope the line must have to go from the starting
+ to the ending point. The command does not require the \cs{put}
command to put the segment in place; nevertheless it can be shifted
somewhere else with \cs{put} if it becomes necessary.
@@ -401,8 +409,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\pack{pict2e} has introduced; they will be described further on.
\item \cs{polygon} and \cs{polygon*} produce closed paths as it would
- be possible when using \cs{polyline} and specifying the last point
- coincident with the first point of that curve. If the asterisk is used
+ be possible when using \cs{polyline} and specifying its last point
+ coincident with its first one of that curve. If the asterisk is used
the closed path is filled with the default color.
\end{enumerate}
@@ -419,7 +427,7 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
\item \cs{curveto} traces a third degree Bézier spline up to the third
specified point, while using the other two ones as control
- points.\footnote{If these terms are unfamiliar, please read the \pack{pict2e} documentation.}
+ points.\footnote{If these terms are unfamiliar, please, read the \pack{pict2e} documentation.}
\item \cs{circlearc} traces a circumference arc from the last line
point to a specified destination; its center, its angle amplitude, its
@@ -448,11 +456,10 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
While describing a line with the above low level commands, or with
the previous high level commands, lines and segments join and finish
- as described hereafter; the following commands must be used, possibly
- within a group, before actually tracing a specific line made up with
- several joined lines or curves. Notice that their effect is just
- visible with lines as thin as 1\,pt, and very visible with thicker
- lines.
+ as described hereafter; the following commands must be used before
+ actually tracing a specific line made up with several joined lines or
+ curves. Notice that their effect is just visible with lines as thin as
+ 1\,pt, and very visible with thicker lines.
\begin{enumerate}[noitemsep]
\item \cs{buttcap} truncates each line with a sharp cut perpendicular
to the line axis exactly through the line end point (default).
@@ -468,7 +475,8 @@ The \pack{euclideangeometry} package requires the advanced functionalities of th
type of joint is the default.
\item \cs{roundjoin} joins each (generally straight) line with
- an arc on the external part of the bend; it is good in most circumstances.
+ an arc on the external part of the bend; it is good in most
+ circumstances.
\item \cs{beveljoin} joins two (generally straight) lines with a miter
joint truncated with a sharp cut perpendicular to the bisector of the
@@ -572,7 +580,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\pack{curve2e}. The user notices that many commands rely on
a delimited argument command syntax; the first arguments can
generally be introduced with point macros, as well as numerical
- coordinates (no matter if cartesian and polar ones) while
+ coordinates (no matter if cartesian or polar ones) while
the output(s) should always be in form of point macro(s). Parentheses
for delimiting the ordered pairs or the point macros are seldom
required. On the other side, the variety of multiple optional
@@ -604,36 +612,30 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
degrees; output quantities are everything that follows the key word
\texttt{to}; output quantities are always supposed to be in the form
of control sequences.
-\begin{itemize}\small
-\item \cs{MakeVectorFrom}\meta{number,number}\meta{numeric macro} to\meta{vector macro}
+\begin{itemize}\setfontsize{9.5}
+\item \cs{MakeVectorFrom}\meta{number,number}\texttt{to}\meta{vector macro}
\item \cs{CopyVect}\meta{vector macro} \texttt{to}\meta{vector macro}
\item \cs{ModOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
\item \cs{DirOfVect}\meta{vector macro} \texttt{to}\meta{versor macro}
-\item \cs{ModAndDirOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
- \texttt{and}\meta{versor macro}
-\item \cs{ModAndAngleOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro}
- and\meta{angle macro}
-\item \cs{DistanceAndDirOfVect}\meta{1st vector macro}
- \texttt{minus}\meta{2nd vector macro} \texttt{to}\meta{distance macro}
- \texttt{and}\meta{versor macro}
+\item \cs{ModAndDirOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro} \texttt{and}\meta{versor macro}
+\item \cs{ModAndAngleOfVect}\meta{vector macro} \texttt{to}\meta{modulus macro} \texttt{and}\meta{angle macro}
+\item {\setfontsize{8.75}\cs{DistanceAndDirOfVect}\meta{$P_1$}
+ \texttt{minus}\meta{$P_2$} \texttt{to}\meta{distance macro}
+ \texttt{and}\meta{versor macro}}
\item \cs{XpartOfVect}\meta{vector macro} \texttt{to}\meta{numerical macro}
\item \cs{YpartOfVect}\meta{vector macro} \texttt{to}\meta{numerical macro}
\item \cs{DirFromAngle}\meta{angle macro} \texttt{to}\meta{versor macro}
\item \cs{ArgOfVect}\meta{vector macro} \texttt{to}\meta{angle macro}
\item \cs{ScaleVect}\meta{vector macro} \texttt{by}\meta{scale factor}
\texttt{to}\meta{vector macro}
-\item \cs{ConjVect}\meta{vector macro} to\meta{conjugate vector macro}
-\item \cs{SubVect}\meta{subtrahend vector} \texttt{from}\meta{minuend vector}
- \texttt{to}\meta{vector macro}
-\item \cs{AddVect}\meta{1st vector} \texttt{and}\meta{2nd vector}
- \texttt{to}\meta{vector macro}
+\item \cs{ConjVect}\meta{vector macro} \texttt{to}\meta{conjugate vector macro}
+\item \cs{SubVect}\meta{subtrahend vector} \texttt{from}\meta{minuend vector} \texttt{to}\meta{vector macro}
+\item \cs{AddVect}\meta{1st vector} \texttt{and}\meta{2nd vector} \texttt{to}\meta{vector macro}
\item \cs{Multvect}\marg{1st vector}\meta{$\star$}\marg{2nd vector}\meta{$
\star$}\meta{output vector macro}\newline the asterisks are optional;
either one changes the \meta{2nd vector} into its complex conjugate
\item \cs{MultVect}\meta{1st vector}\meta{$\star$}\meta{2nd vector}
- \texttt{to}\meta{vector macro}\newline discouraged; maintained for backward
- compatibility; the only optional asterisk changes the \meta{2nd vector}
- into its complex conjugate
+ \texttt{to}\meta{vector macro}\newline discouraged; maintained for backward compatibility; the only optional asterisk changes the \meta{2nd vector} into its complex conjugate
\item \cs{Divvect}\marg{dividend vector}\marg{divisor vector}\marg{output
vector macro}
\item \cs{DivVect}\meta{dividend vector} \texttt{by}\meta{divisor vector}
@@ -644,12 +646,12 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item A new command \cs{segment}\parg{$P_1$}\parg{$P_2$} draws a line that
joins the specified points.
-\item Command \cs{Dashline}\parg{$P_1$}\parg{$P_2$}\marg{dash length}
+\item Command \cs{Dashline}\parg{$P_1$}\parg{$P_2$}\marg{dash and gap length}
draws a dashed line between the specified points; the
\meta{dash length} is specified as a coefficient of
- \cs{unitlenth} so it is a proportioned to the diagram scale. The gap
+ \cs{unitlenth} so it is proportioned to the diagram scale. The gap
between dashes is just as wide as the dashes; they are recomputed by
- the command in order to slightly adjust the \meta{dash length} so
+ the command in order to slightly adjust the \meta{dash and gap length} so
that the line starts at point $P_1$ with a dash, and ends at $P_2$
again with a dash.
@@ -665,7 +667,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item Command \cs{polyline}, \cs{polygon} and \cs{polygon*} are redefined
to accept both coordinate kinds.
-\item Commands \cs{VECTOR}\parg{$P_1$}\parg{$P_2$} (and \cs{VVECTOR}, with the same syntax) draw vectors with one arrow tip at the end, or arrow tips at both ends respectively.l
+\item Commands \cs{VECTOR}\parg{$P_1$}\parg{$P_2$} and \cs{VVECTOR}, with the same syntax, draw vectors with one arrow tip at the end, or arrow tips at both ends respectively.
\item New commands \cs{Arc}\parg{center}\parg{start}\marg{angle} and,
with the same syntax, \cs{VectorArc} and \cs{VectorARC} draw
@@ -673,14 +675,14 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
starting at point \meta{start}, with an aperture of \meta{angle}
degrees (not radians). \cs{Arc} draws the arc without arrow tips;
\cs{VectorArc} draws the arc with one arrow tip at the end point;
- \cs{VectorARC} draws an arc with arrow tips at both ends.
+ \cs{VectorARC} draws an arc with arrow tips at both ends. \cs{VVectorArc} is an alias of \cs{VectorARC}.
\item Command \cs{multiput} has been redefined to accept optional
arguments, besides the use of coordinates of both kinds. The new syntax
is the following:
-\begin{flushleft}\obeylines
+\begin{ttsyntax}[\setfontsize{10.5}]
\cs{multiput}\oarg{shift}\parg{origin}\parg{step}\marg{number}\marg{object}\oarg{handler}
-\end{flushleft}
+\end{ttsyntax}
where, if you neglect the first and the last (optional) arguments,
you have the original syntax; the \meta{origin} point is where the
first \meta{object} is placed; \meta{step} is the displacement of a
@@ -688,13 +690,14 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
total number of \meta{object}s put in place by the command; it is
possible to specify the number trough an integer expression computed
with the \cs{inteval} function of the L3~language, accessed through
- the \pack{xfp} package already loaded by \pack{curve2e}. The new
- features are \meta{shift}, that is used to displace the whole drawing
- somewhere else (in case some fine tuning is required), and \meta{handler};
- the latter is a powerful means to control both the object to be set in
- place and its position; further on there will be examples that show
- that the object can be put not only on straight paths, but also un
- other curves, including parabolas, circles, and other shapes.
+ the \pack{xfp} package functionalities already included into the
+ \LaTeX kernel. The new features are \meta{shift}, that is used to
+ displace the whole drawing somewhere else (in case some fine tuning is
+ required), and \meta{handler}; the latter is a powerful means to control
+ both the object to be set in place and its position; further on there
+ will be examples that show that the object can be put not only on
+ straight paths, but also un other curves, including parabolas, circles,
+ and other shapes.
\item Another version of repetitive commands \cs{xmultiput} is very
similar to \cs{multiput} but the iterations are controlled in a
@@ -702,30 +705,27 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
curves describing analytical functions even with parametric
equations. Further on there will be some examples.
-\item The preloaded \pack{xfp} package provides two important
- functionalities, i.e. two L3 “functions”, \cs{fpeval} and \cs{inteval};
- the latter executes expressions on integer numbers containing the usual
+\item The \pack{xfp} package is preloaded because not all functionalities have been made available in the \LaTeX\ kernel; among such functionalities two two are very important, i.e. the L3 “functions”, \cs{fpeval} and \cs{inteval}; the latter executes expressions on integer numbers containing the usual
operators \texttt{+, -, *, /}; the division quotient is rounded to the
nearest (positive or negative) integer. The former operates with real
- fractional numbers and, in addition to the usual arithmetical operators as
- \cs{inteval}, it can use many mathematical functions, from square roots,
- to exponentials, logarithms, trigonometric and hyperbolic direct and
- inverse functions\footnote{The implementation of inverse hyperbolic
- function at the moment is on the L3~Team “to do” list.}, plus other ones.
- Normally fractional numbers are operated on decimal strings, with 16
- fractional places, and 14 integer places but the L3~functions accept also
- scientific notation. The user can specify truncation or rounding to a
- specified number of digits. Such integer and fractional mathematical
+ fractional numbers and, in addition to the usual arithmetical operators
+ as \cs{inteval}, it can use many mathematical functions, from square
+ roots, to exponentials, logarithms, trigonometric and hyperbolic direct
+ and inverse functions\footnote{The implementation of inverse hyperbolic
+ functions at the moment is on the L3~Team “to do” list.}, plus other
+ ones. Normally fractional numbers are operated on decimal strings, with
+ 16 fractional places, and 14 integer places but the L3~functions accept
+ also scientific notation. The user can specify truncation or rounding to
+ a specified number of digits. Such integer and fractional mathematical
operations are already integrated in most computations performed by
\pack{curve2e}.
-\item \pack{curve2e} provides three more L3 functions: \cs{fptest} and
- \cs{fpdowhile} with the following syntax:
-\begin{flushleft}\obeylines
+\item \pack{curve2e} provides three more L3 functions: \cs{fptest}, \cs{fpwhiledo}, and \cs{fpdowhile} with the following syntax:
+\begin{ttsyntax}
\cs{fptest}\marg{test}\marg{true}\marg{false}
\cs{fpdowhile}\marg{test}\marg{actions}
\cs{fowhiledo}\marg{test}\marg{actions}
-\end{flushleft}
+\end{ttsyntax}
For all these macros the \meta{test} is a logical L3~expression; its
operands are logical constants, logical values, logical numeric
comparisons; its operators are the typical \texttt{||}, \texttt{\&\&},
@@ -733,29 +733,34 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
comparisons are mathematical constants or expressions connected with
relation operators, such as \texttt{>, =, <}; such operators may be
negated with the NOT operator; therefore, for example, \texttt{!>} means
- “not greater than”, therefore “lower or equal to”.
+ “not greater than”, therefore “lower or equal to”; such operators may be
+ coupled, for example \texttt{>=} makes a valid comparison and it is equal
+ to \texttt{!<}.
\item The above tests are very useful to control both \cs{fptest} and
- \cs{fpdowhile} and \cs{fowhiledo}. The logical \meta{test} result lets
+ \cs{fpdowhile} and \cs{fpwhiledo}. The logical \meta{test} result lets
\cs{fptest} execute only the \meta{true} or the \meta{false} code.
- Before using \cs{fpdowhile} or \cs{fpwhiledo}
- the \meta{test} expression must be initialised to be \texttt{true};
- the \meta{actions} should contain some code to be iteratively executed,
- but they must contain some assignments, typically a change in an
- iteration counter, such that eventually the \meta{test} logical
- expression becomes \texttt{false}. Lacking this assignments, the
- loop continues to infinity, or better, until a fatal error message
- is issued that informs that the program working memory is exhausted.
- The difference between \cs{fpdowhile} and \cs{fpwhiledo} ie the order
- in which the \meta{test} and the first\meta{action} is executed; in facts
- \cs{fpdowhile} first does the \meta{action} then the \meta{test}, while
- \cs{fpwhiledo} first executes the \meta{test} then the \meta{action}.
+ Before using \cs{fpdowhile} or \cs{fpwhiledo} the \meta{test} expression
+ must be initialised to be \texttt{true}; the \meta{actions} should
+ contain some code to be iteratively executed, but they must contain some
+ assignments, typically a change in an iteration counter, such that
+ eventually the \meta{test} logical expression becomes \texttt{false}.
+ Lacking this assignments, the loop continues to infinity, or better,
+ until a fatal error message is issued that informs that the program
+ working memory is exhausted.
+
+ \item
+ The difference between \cs{fpdowhile} and \cs{fpwhiledo} is the order
+ in which the \meta{test} and the first\meta{action} are executed; in
+ facts \cs{fpdowhile} first does the \meta{action} then the \meta{test},
+ while \cs{fpwhiledo} first executes the \meta{test} then the
+ \meta{action}.
Since the modification of the test logical value is done by the commands
contained in the \meta{actions} this switching of the \meta{test} and
- \meta{action} produces different results. Adjusting the \meta{test} it is
- possible to get the same results, but the expressiveness of the \meta{test}
- may be easier to understand in one way rather than the other. Some of the
- examples show the such different \meta{test} syntaxes.
+ \meta{action} produces different results. By adjusting the \meta{test} it
+ is possible to get the same results, but the expressiveness of the
+ \meta{test} may be easier to understand in one way rather than the other.
+ Some of the examples show such different \meta{test} syntaxes.
\item Such new commands are already used to code the \cs{multiput} and
\cs{xmultiput} commands, but they are available also to the user who can
@@ -770,25 +775,26 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item The new command \cs{Curve} joins a sequence of third order
splines by simply specifying the node-direction coordinates; i.e. at the
- junction of two consecutive splines, in a certain interpolation node the
+ junction of two consecutive splines, in an interpolation node the
final previous spline tangent has the same direction as that
at the second spline first node; if a change of direction is required, an
optional new direction can be specified. Therefore this triplet of
information has the following syntax:
-\begin{flushleft}
+\begin{center}
\parg{node}\aarg{direction}\oarg{new direction}
-\end{flushleft}
+\end{center}
Evidently the \meta{new direction} is specified only for the nodes
that correspond to a cusp. A variation of the command arguments is
available by optionally specifying the “looseness” of the curve:
-\begin{flushleft}
+\begin{center}
\parg{node}\aarg{direction\texttt{;}start\texttt{,}end}\oarg{\dots}
-\end{flushleft}
+\end{center}
where \meta{start} is the spline starting “looseness” and \meta{end}
is the spline ending one. These (generally different) values
are an index of how far the control point is from the adjacent node.
With this functionality the user has a very good control on the curve
- shape and curvature.
+ shape and curvature. The optional new direction at a cusp point has the
+ sane extended syntax
\item A similar command \cs{Qurve} works almost the same way, but it
traces a quadratic Bézier spline; this one is specified only with two
@@ -801,9 +807,9 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\item A further advanced variation is obtained with the new
\cs{CurveBetween} command that creates a single cubic spline between two
given points with the following syntax:
-\begin{flushleft}\ttfamily
-\cs{CurveBetween}\meta{node1} And\meta{node2} WithDirs \meta{dir1}
- And\meta{dir2}
+\begin{flushleft}
+\cs{CurveBetween}\meta{node1} \texttt{And}\meta{node2} \texttt{WithDirs}\meta{dir1}
+ \texttt{And}\meta{dir2}
\end{flushleft}
\item A similar variant command is defined with the following syntax:
@@ -819,10 +825,11 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{ Euclidean geometry commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%% In questa sezione ci vorrebbero esempi per ogni singolocomando!!!
- With the already large power of \pack{curve2e} there was a push towards
- specialised applications; the first of which was, evidently, geometry;
- that kind of geometry that was used in the ancient times when
+ With the already large available power of \pack{curve2e} there was a push
+ towards specialised applications; the first of which was, evidently,
+ geometry; that kind of geometry that was used in the ancient times when
mathematicians did not have available the sophisticated means they
have today; they did not even have a positional numerical notation, that
arrived in the “western world” we are familiar with, just by
@@ -846,8 +853,8 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\[
x^2 + x -1 = 0
\]
- and we know that the equation has two solution of opposite signs, and that
- their magnitudes are the reciprocal of one another. Since we are
+ and we know that the equation has two solution of opposite signs, and
+ that their magnitudes are the reciprocal of one another. Since we are
interested in their magnitudes, we adapt the solutions in the form
\begin{equation}
x_{1,2} = \frac{\sqrt{5} \pm 1}{2}= \sqrt{1+0.5^2}\pm 0.5 \Longrightarrow
@@ -857,17 +864,17 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
one the \emph{golden section}.
Luca Pacioli, by the turn of centuries XV–XVI, was the tutor of
- Guidubaldo, the son and heir of Federico di Montefeltro, Duke of
+ Guidu\-baldo, the son and heir of Federico di Montefeltro, Duke of
Urbino\footnote{If you never visited this Renaissance city and its Ducal
Palace, consider visiting it; it is one of the many UNESCO Heritage
places.}; he wrote the famous book \emph{De Diuina Proportione} that
contained also the theory of the golden section accompanied by beautiful
drawings of many Platonic solids and other non convex ones, drawn by
- Leonardo da Vinci. Everything was executed with perfect etchings, even the
- construction of the golden section; in its basic form\footnote{The third
- formula in equation~\eqref{equ:aureo} is written in such a way as to
- explain the graphical construction in figure~\ref{fig:aureo}.} it is
- replicated in figure~\ref{fig:aureo}.
+ Leonardo da Vinci. Everything was executed with perfect etchings, even
+ the construction of the golden section; in its basic form\footnote{The
+ third formula in equation~\eqref{equ:aureo} is written in such a way as
+ to explain the graphical construction in figure~\ref{fig:aureo}.} it is
+ reproduced in figure~\ref{fig:aureo}.
\begin{figure}
\begin{Esempio}[\setfontsize{7}](0.40)
\unitlength=0.005\linewidth
@@ -897,7 +904,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\end{figure}
By the way figure~\ref{fig:aureo} shows also the code that is used
- for the drawing done completely with the facilities available just with \pack{curv2e}. It is also a usage example of several commands.
+ for the drawing done completely with the facilities available just with \pack{curve2e}. It is also a usage example of several commands.
Illiteracy was very widespread; books were expensive and were
common just in the wealthy people mansions.
@@ -925,41 +932,67 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
kind of geometry they teach.
Here we describe the new commands provided by this package; then in
- section~\ref{sec:examples} we show their usage by means examples.
+ section~\ref{sec:examples} we show their usage by means of examples.
\begin{enumerate}[noitemsep]
%
-\item Command \cs{polyvector} is simple extension of the \cs{polyline} command introduced by \pack{pict2e}: draws a polyline with an arrow tip at its end; it turns out to be very handy while drawing block diagrams.
+\item Command \cs{polyvector} is simple extension of the \cs{polyline} command introduced by \pack{pict2e}: its syntax is identical to that of \cs{polyline}; it draws a polyline with an arrow tip at the last segment; it turns out to be very handy while drawing block diagrams. See figure~\ref{fig:vectors}.
%
\item Command \cs{IntersectionOfLines} is a fundamental one; its syntax is
the following:
-\begin{ttsyntax}
-\cs{IntersecionOfLines}\parg{point1}\parg{dir1} and\parg{point2}\parg{dir2}
-\qquad to\meta{vector}
+\begin{ttsyntax}\setfontsize{9.5}%
+\cs{IntersecionOfLines}\parg{point1}\parg{dir1} and\parg{point2}\parg{dir2} to\meta{vector}
\end{ttsyntax}
- were each line is identified with its \meta{point} and its \emph{direction}
- \meta{dir}; the intersection coordinates go to the output \meta{vector}.
+ were each line is identified with its \meta{point} and its \emph{direction}; \meta{vector} is the complex number that identifies the coordinates of the intersection point; the intersection coordinates go to the output \meta{vector}.
+
+\begin{Esempio}[\normalsize](0.40)
+\unitlength=0.01\linewidth
+\begin{picture}(100,30)
+\AutoGrid
+\Dashline(0,0)(100,30){2}
+\Dashline(100,0)(0,30){2}
+ \IntersectionOfLines%
+ (0,0)(10,3)and%
+ (100,0)(-10,3)to\P
+\Pbox(\P)[b]{P}[3]
+\end{picture}
+\end{Esempio}
%
\item A second command\cs{IntersectionOfSegments} does almost the same
- work, but the coordinates of a segment end points define also its direction,
- which is the argument of the difference of the terminal nodes of each
- segment; the syntax therefore is the following:
+ work, but the coordinates of a segment end points define also its
+ direction, which is the argument of the difference of the terminal nodes
+ of each segment; the syntax therefore is the following:
\begin{ttsyntax}
\cs{IntersectionOfSegments}\parg{point11}\parg{point12}
-\qquad and\parg{point21}\parg{point22}to\meta{vector}
+\qquad and\parg{point21}\parg{point22}to\meta{intersection point}
\end{ttsyntax}
- Again the intersection point coordinates go to the output \meta{vector}.
+ Again the intersection point coordinates go to the output \meta{intersection point}.
The first segment is between points 11 and 12, and, similarly, the second
segment is between points 21 and 22.
+ \begin{Esempio}[\normalsize](0.40)
+\unitlength=0.01\linewidth
+\begin{picture}(100,30)
+\AutoGrid
+\segment(0,0)(100,30)
+\segment(0,30)(100,0)
+ \IntersectionOfSegments%
+ (0,0)(100,30)and%
+ (100,0)(0,30)to\P
+\Pbox(\P)[b]{P}[3]
+\end{picture}
+\end{Esempio}
%
-\item Another “intersection” command is \cs{IntersectionsOfLine} to
- determine the two intersection of a line with a circle. The syntax is:
+\item \label{item:CircleWithCenter}Another “intersection” command is
+ \cs{IntersectionsOfLine} to determine both intersections of a line
+ with a circle. The syntax is:
\begin{ttsyntax}
-\cs{IntersectionsOfLine}\parg{point}\parg{dir}
+\cs{IntersectionsOfLine}\parg{point1}\parg{point2}
\qquad 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
+ where \meta{point1} and \meta{point2} identify a segment joining such
+ points, and therefore a specific line with the segment direction
+ and passing through a given point; the segment should cross the circle;
+ this 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
@@ -967,6 +1000,21 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
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.
+\begin{Esempio}[\normalsize](0.40)
+\unitlength=0.01\linewidth\raggedleft
+\begin{picture}(60,40)(-10,0)
+\AutoGrid
+\def\Radius{20}%
+\Circlewithcenter 20,20 radius\Radius
+\segment(10,0)(50,40)
+\IntersectionsOfLine(10,0)(50,40)%
+ WithCircle(20,20)(20)%
+ to\Pu and\Pd
+\Pbox(\Pu)[b]{P_1}[3]
+\Pbox(\Pd)[l]{P_2}[3]
+\end{picture}
+\end{Esempio}
+\medskip
%
\item It is difficult to numerically determine the coordinates of the
intersection points of two circles; it becomes easier if one of the
@@ -975,20 +1023,46 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\begin{ttsyntax}
\cs{CircleThrough}\meta{point}WithCenter\marg{center}
\end{ttsyntax}
- draws such circumference.
+ draws such circumference.\\[1ex]
+ \begin{Esempio}[\normalsize](0.40)
+ \unitlength=0.01\linewidth\raggedleft
+ \begin{picture}(60,40)
+ \AutoGrid
+ \CopyVect10,15to\P
+ \Pbox(\P)[tr]{P}[2]
+ \Pbox(30,20)[b]{C}[2]
+ \def\Ce{30,20}\relax
+ \CircleThrough\P WithCenter\Ce
+ \end{picture}
+ \end{Esempio}
+ \medskip
%
\item With the above macro it becomes easy to draw two circumferences
with different centers and passing through the same point; therefore
it becomes easy to determine the other intersection point by means of the
following macro:
\begin{ttsyntax}
-\cs{Segment}\parg{endpoint1}\parg{endpoint2}SymmetricPointOF\meta{p1}
+\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}.
+ The following small example displays how to find point $P_2$ symmetrical to $P_1$ with respect to a given line.\\[1ex]
+ \begin{Esempio}[\normalsize](0.40)
+ \raggedleft\unitlength=0.01\linewidth
+ \begin{picture}(60,30)
+ \AutoGrid
+ \segment(0,0)(60,30)
+ \CopyVect40,5to\Pu
+ \Segment(0,0)(60,30)%
+ SymmetricPointOf\Pu to\Pd
+ \Pbox(\Pu)[b]{P_1}[2]
+ \Pbox(\Pd)[t]{P_2}[2]
+ \end{picture}
+ \end{Esempio}
+\medskip
%
\item It would be interesting to solve the same problem with help of
the following macro relating to right triangles identified with their
@@ -998,17 +1072,19 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\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 whith 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.
+In facts, 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, the chord; therefore the segment joining
+ the circle centers, coincides with 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. See figure~\ref{fig:2circle-intersections}
+ where such right triangle legs are used for several tasks.
%
\item Command \cs{ThreePointCircle} draws a circle that goes through three
given points; the syntax is the following:
@@ -1018,13 +1094,14 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
A sub product of this macro is formed by the vector \cs{C} that contains
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.
+ draw the circle, but its center is available. See figure~\ref{fig:circumcenter}, where this construction has been used.
+
\item Alternatively
-\begin{ttsyntax}\setfontsize{10.5}
- \cs{ThreePointCircleCenter}\parg{point1}\parg{point2}\parg{point3}to\meta{vector}
+\begin{ttsyntax}\setfontsize{9.65}%
+ \cs{ThreePointCircleCenter}\parg{point1}\parg{point2}\parg{point3}to\meta{center vector}
\end{ttsyntax}
computes the three point circle center assigning its coordinates to
- \meta{vector}.
+ \meta{center vector}.
%
\item Command \cs{CircleWithCenter} draws a circle given its center and it
radius; in facts the syntax is the following:
@@ -1032,8 +1109,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\cs{CircleWithCenter}\meta{center} Radius\meta{Radius}
\end{ttsyntax}
This macro does not require the \cs{put} command to put the circle
- in place.
-%
+ in place; it is very handy when the radius value is saved into a macro. %
\item A similar macro \cs{Circlewithcenter} does almost the same; its
syntax is the following:
\begin{ttsyntax}
@@ -1043,17 +1119,34 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
differently: in the former command the \meta{Radius} is a vector the
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.
+ used. See item~\ref{item:CircleWithCenter} of this enumeration where this
+ command was used.
+
%
-\item Command with syntax:
+\item The command with syntax:
\begin{ttsyntax}
\cs{AxisOf}\meta{point1} and\meta{point2} to \meta{point3} and\meta{point4}
\end{ttsyntax}
is used to determine the axis of a segment; the given
segment is specified with its end points \meta{point1} and \meta{point2}
and the axis is determined by point \meta{point3} and \meta{point4};
- actually \meta{point3} is the middle point of the given segment.
-
+ actually \meta{point3} is the middle point of the given segment.\\[1ex]
+ \begin{Esempio}[\normalsize](0.40)
+ \raggedleft
+ \unitlength=0.01\linewidth
+ \begin{picture}(50,30)
+ \AutoGrid
+ \segment(10,0)(40,30)
+ \AxisOf 10,0 and 40,30 to\Pu\Pd
+ \Dashline(\Pu)(\Pd){1}
+ \Pbox(10,0)[br]{P_1}[2]
+ \Pbox(40,30)[tl]{P_2}[2]
+ \Pbox(\Pu)[tl]{P_3}[2]
+ \Pbox(\Pd)[t]{P_4}[2]
+ \end{picture}
+ \end{Esempio}
+\medskip
+%
\item These two commands with syntax:
\begin{ttsyntax}
\cs{SegmentCenter}\parg{point1}\parg{point2}to\meta{center}
@@ -1072,8 +1165,8 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\cs{TriangleMedianBase}\meta{vertex} on\meta{base1} and\meta{base2}
\qquad to\meta{base middle point}
\end{ttsyntax}
-%
-\item A similar command \cs{TriangleHeightBase} is used to determine the
+
+A similar command \cs{TriangleHeightBase} is used to determine the
intersection of the height segment from one vertex to the opposite side;
with triangles that have an obtuse angle, the height base might lay
externally to one of the bases adjacent to such an angle. The syntax is
@@ -1081,13 +1174,14 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\begin{ttsyntax}
\cs{TriangleHeigthtBase}\meta{vertex} on\meta{base1} and\meta{base2} to\meta{height base}
\end{ttsyntax}
-%
-\item Similarly there is the \cs{TriangleBisectorBase} macro with
+
+ Similarly there is the \cs{TriangleBisectorBase} macro with
a similar syntax:
\begin{ttsyntax}
\cs{TriangleBisectorBase}\meta{vertex} on\meta{base1} and\meta{base2}
\qquad to\meta{bisector base}
\end{ttsyntax}
+See figure~\ref{fig:MHBlines} that contains all three special lines: the median (M) the height (H) and the bisector (B) lines.%%%%!!!!!!!!!
%
\item A triangle \emph{barycenter} is the point where its median lines
intersect; command \cs{TriangleBarycenter} determines its coordinates
@@ -1125,9 +1219,9 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\begin{equation}a^2= b^2 +c^2\label{equ:axes-foci}\end{equation}
that connects such three quantities; $a$ is always the largest of the
three quantities; therefore the macro tests if the first entry is larger
- than the second one: if is is, it computes a Pitagorean difference,
+ than the second one: if is is, it computes a Pytagorean difference,
otherwise the user should pay attention to use as the first entry the
- smaller among $b$ and $c$, so as to compute a Pitagorean sum. The command
+ smaller among $b$ and $c$, so as to compute a Pytagorean sum. The command
is the following:
\begin{ttsyntax}
\cs{AxisFromAxisAndFocus}\meta{axis or focus} and\meta{focus or axis}
@@ -1135,33 +1229,54 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\end{ttsyntax}
The word “axis” stands for “semi axis length”; the word “focus" stands
for “focal semi distance”; actually the macro works equally well with
- full lengths, instead of half lengths; its is important not to mix
+ full lengths, instead of half lengths; it is important not to mix
full and half lengths. Such lengths are expressed as factors of
\cs{unitlength}, not as absolute values. This command is described
again when dealing with the specific problem referred to at the
beginning of this list item; the description is going to be more
- detailed and another macro is added to avoid possible errors.
+ detailed and another macro is added to avoid possible errors.\\[1ex]
+\begin{Esempio}[\setfontsize{9.25}](0.40)
+\raggedleft\unitlength=0.01\linewidth
+\begin{picture}(80,60)(-40,-30)
+\AutoGrid
+\ellisse{40}{30}
+\CopyVect\fpeval{sqrt(700)},0to\Focus
+\segment(0,0)(0,30)
+\segment(0,0)(\Focus)
+\segment(\Focus)(0,30)
+\Pbox(0,0)[tr]{O}[2]
+\Pbox(\Focus)[t]{F}[2]
+\Pbox(0,15)[r]{b}[0pt]
+\Pbox(15,0)[t]{c}[0pt]
+\Pbox(14,14)[bl]{a}[0pt]
+\end{picture}
+\end{Esempio}
+\medskip
%
\item Given a segment, i.e. the coordinates of its end points, it is
useful to have a macro that computes its length; at the same time it is
useful to to compute its direction; this operation is not the same as to
compute modulus and argument of a vector, but consists in computing such
quantities from the difference of the vectors pointing to the segment
- end points. These two macros are the following:
+ end points. Possibly better names should be devised for such macros, for
+ example \cs{DistanceBetweenPoints...} and \cs{AngleOf..} But I could not
+ find anything really more expressive. These two macros are the
+ following:
\begin{ttsyntax}
\cs{SegmentLength}\parg{point1}\parg{point2} to\meta{length}
-\cs{SegmentArg}\parg{point1}\parg{point2} to\meta{argument}
+\cs{SegmentArg}\parg{point1}\parg{point2} to\meta{angle}
\end{ttsyntax}
- The \meta{argument} is computed in the interval $-180^\circ < \phi \leq
- +180^\circ$; it represents the argument of the vector that goes from
- \meta{point1} to \meta{point2}, therefore the user must pay attention to
- the order s/he enters the end point coordinates.
+ The \meta{angle} is computed in the interval $-180^\circ < \phi \leq
+ +180^\circ$; it represents the with respect to the positive real axis of
+ the vector that goes from \meta{point1} to \meta{point2}, therefore the
+ user must pay attention to the order s/he enters the end point
+ coordinates.
%
\item The next command \cs{SymmetricalPointOf} is used to find the
reflection of a specified point with respect to a fixed point; of course
the latter is the middle point of the couple, but the unknown to be
determined is not the center of a segment, but one of its end points.
- The syntax is the following:
+ The syntax is the following: In a sense this macro completes the \cs{AxisOf} by finding the other extremity of the axis.
\begin{ttsyntax}
\cs{SymmetricalPointOf}\meta{point1} respect\meta{fixed} to\meta{point2}
\end{ttsyntax}
@@ -1171,13 +1286,13 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
optional arguments allow to specify color and thickness of the sides,
or the polygon interior color; this macro operates differently from the
one for drawing ellipses, that draws simultaneously an ellipse with
- the border of a color and the interior of another one; with this macro the
- user who wants to achieve this effect must superimpose to polygons with
- different settings; but it would not be too difficult to arrange a new
- macro or to modify this one in order to get “bicolor” polygons.
+ the border of a color and the interior of another one; with this macro
+ the user who wants to achieve this effect must superimpose to polygons
+ with different settings; but it would not be too difficult to arrange a
+ new macro or to modify this one in order to get “bicolor” polygons.
It is not necessary for the purpose of this package, therefore we
- let the user express his/her phantasy by creating other macros. The actual
- syntax is the following:
+ let the user express his/her phantasy by creating other macros. The
+ actual syntax is the following:
\begin{ttsyntax}
\cs{RegPolygon}\meta{$\star$}\parg{center}\marg{radius}\marg{sides}\oarg{angle}\aarg{settings}
\end{ttsyntax}
@@ -1191,16 +1306,18 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
respect to the \meta{center}; the optional \meta{angle} modifies
this value to what is necessary for a particular polygon. The
\meta{center} itself is optional, in the sense that if it is not
- specified the center lays in the origin of the \env{picture} axes; if this
- argument is specified, the polygon center is displaced accordingly.
+ specified the center lays in the origin of the \env{picture} axes; if
+ this argument is specified, the polygon center is displaced accordingly.
The number of sides in theory may be very high, but it is not wise
to exceed a couple of dozen sides; if the number of sides is too
high, a polygon (completely contained in an A4 page) may become
undistinguishable from a circumference.
+ Some examples are shown in figures~\ref{fig:pentagon}
+ and~\ref{fig:filled-pentagon}.
%
-\item Several macros are dedicated to ellipses; their names are spelled
+\item {\tolerance=3000 Several macros are dedicated to ellipses; their names are spelled
in Italian, “ellisse”, because the name “ellipse” is already taken by
- other packages; with an Italian user command names there should be no
+ other packages; with Italian command names there should be no
interference with other packages, or the risk is reduced to
a minimum. The various macros are \cs{ellisse}, \cs{Sellisse},
\cs{Xellisse}, \cs{XSellisse}, \cs{EllisseConFuoco} \cs{EllisseSteiner};
@@ -1208,19 +1325,19 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
English ones \cs{EllipseWithFocus} and \cs{SteinerEllipse}. For the
other four ones it is wise to avoid English names for the reasons
explained above. After all the Italian and the English names are very
- similar and are pronounced almost identically.
+ similar and are pronounced almost identically.\par}
{\tolerance=3000 Actually \cs{ellisse} is practically a shorthand for
\cs{Sellisse} because some optional arguments are already fixed, but the
meaning of \cs{fillstroke} depends on the presence or absence of an
initial asterisk; similarly \cs{Xellisse} is a sort of a shorthand for
\cs{XSellisse}; in facts those commands, that contain an ‘S’ in their
- names, can optionally perform also the affine \emph{shear} transformation,
- while those without the ‘S’ do not execute such transformation.
- Figure~\ref{fig:shear} displays a normal ellipse with its bounding
- rectangle, and the same ellipse to which the shear affine transformation
- is applied; the labeled points represent the third order Bézier spline
- nodes and control points.\par}
+ names, can optionally perform also the affine \emph{shear}
+ transformation, while those without the ‘S’ do not execute such
+ transformation. Figure~\ref{fig:shear} displays a normal ellipse with
+ its bounding rectangle, and the same ellipse to which the shear affine
+ transformation is applied; the labeled points represent the third order
+ Bézier spline nodes and control points.\par}
\begin{figure}[!htb]
\dimendef\Wmp=2000 \Wmp=\dimexpr(\textwidth-\columnsep)/2\relax
\begin{minipage}{\Wmp}\centering
@@ -1254,7 +1371,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
All require the semi axis lengths; the \meta{semiaxis-h} and
\meta{semiaxis-v} refer to the semi axes before possible rotation by
\meta{angle} degrees, and do not make assumptions on which axis is the
- largger one. The optional parameter \meta{shear} is the angle in degrees
+ larger one. The optional parameter \meta{shear} is the angle in degrees
by which the vertical coordinate lines are slanted by effect of shearing.
If \meta{shear}, that by default equals zero, is not set
to another value, the asterisks of command \cs{Sellisse} and
@@ -1273,7 +1390,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
some position \emph{inside} the triangle. The \cs{SteinerEllipse}
requires less data, in the sense that such ellipse is unique; it
is the ellipse internally tangent to the triangle at its side middle
- points.
+ points. See detailed examples in the following section.
%
\end{enumerate}
@@ -1283,7 +1400,6 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Here we can show some examples of the advanced \pack{curve2e} commands
and of what can be done with this \pack{euclideangeometry} extension.
- If the user wants to practice by replicating the following examples, remember to load the \pack{pm-isomath} package, very useful to typeset the labels of some drawings. Matter of facts, this very documentation is being typeset by using the following package list, in addition to the usual encoding and language related ones: \pack{lmodern}, \pack{textcomp}, \pack{mflogo}, \pack{amsmath}, \pack{fancyvrb}, \pack{graphicx}, \pack{afterpage}, \pack{etoolbox}, \pack{enumitem}, \pack{xspace}, \pack{xcolor}, \pack{euclideangeometry}, \pack{pm-isomath}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Straight and curved vectors}
@@ -1302,9 +1418,9 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\put(20,30){\Vector(10,20)}
\VECTOR(40,30)(50,50)
\VVECTOR(60,30)(70,60)
-\Arc(100,60)(80,60){90}
-\VectorArc(0,0)(20,0){90}
-\VectorARC(100,0)(80,0){-90}
+\Arc(100,60)(100,40){-90}
+\VectorArc(0,0)(0:20){90}
+\VectorARC(100,0)(0:80){-90}
\polyvector(30,0)(35,10)(55,20)(60,0)
\end{picture}
\end{Esempio}
@@ -1371,7 +1487,7 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Dashed and dotted lines}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- For dashedl ines it is mandatory to specify the dash length, that
+ For dashed lines it is mandatory to specify the dash length, that
is just as long as the gap between dashes. For dotted lines it is
mandatory to specify the dot gap.
For dotted lines it is also possible to specify the dot size;
@@ -1393,97 +1509,12 @@ z^2 &= m^2\eu^{\iu 2\phi}\\
\Dashline(0,25)(20,40){4}
\put(0,25){\circle*{1}}
\put(20,40){\circle*{1}}
-\Dotline(0,0)(40,40){2}[0.75mm]
-\put(40,40){\circle*{1}}
+\Dotline(0,0)(40,40){2}[2]
\end{picture}
\end{Esempio}
\caption{Dashed and dotted lines}\label{fig:DashDot}
\end{figure}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{A simple application: Pitagoras' theorem}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Everybody know Pitagoras' theorem and its famous final formula: «If a right triangle has arms of lengths $a$ and $b$, and hypothenuse of length $c$, then the squares built on the arms are collectively equivalent to the square built on the hypothenuse: $a^2 + b^2 = c^2$.»Or, in simpler terms the sum of areas of the squares built on the arms is equal to the area of the square built on the hypothenuse.
-
-\subsection{First solution}
-This result may be proved with a simple geometrical construction that is shown in figure~\ref{fig:pitagora}.
-
-\begin{figure}[!tbp]
-\centering
-\begin{Esempio}*[\normalsize](0.40)
-\unitlength=0.0125\linewidth
-\begin{picture}(70,80)(-10,-50)
-\AutoGrid
-\thicklines\polygon(0,0)(50,0)(18,24)
-\thinlines\polyline(0,0)(0,-50)(50,-50)(50,0)
-\Pbox(0,0)[r]{C}[0.75ex]\Pbox(18,0)[tr]{H}[0.75ex]
-\Pbox(50,0)[l]{B}[0.75ex]\Pbox(18,24)[b]{A}[0.75ex]
-\Pbox(0,-50)[br]{E}[0.75ex]\Pbox(50,-50)[bl]{D}[0.75ex]
-\Pbox(18,-50)[br]{F}[0.75ex]\Pbox(10,12)[br]{a}[0]
-\Pbox(33,12)[bl]{b}[0]\Pbox(25,0)[t]{c}[0]
-\Pbox(9,0)[b]{d}[0]\Pbox(30,0)[b]{e}[0]
-\Pbox(50,-25)[r]{c}[0]\Pbox(25,-50)[b]{c}[0]
-\Pbox(0,-25)[l]{c}[0]
-\Dashline(18,24)(18,-50){1.5}
-\end{picture}
-\end{Esempio}
-\caption{Geometrical construction to prove Pitagoras' theorem}
-\label{fig:pitagora}
-\end{figure}
-
-The proof is based in the fact the the heigh of the right triangle \textsf{ABC} with respect to the hypotenuse divide the triangle in two smaller and similar ones; so that triangles \textsf{ABC}, \textsf{AHC}, and \textsf{ABH}, are similar to one another. This similatity allows us to write:
-\begin{align*}
-d : a = a : c &\Longrightarrow d = a^2/c\\
-e : b = b : c &\Longrightarrow e = b^2/c
-\end{align*}
-
-The dashed height \textsf{AH} may be continued until the opposite side of the square built on the hypothenuse and dives such square in two rectangles \textsf{CHFE} and \textsf{HBDF}; the former rectangle area equals $ c\cdot a^2/c = a^2$, while the later rectangle area equals $ c\cdot b^2/c= b^2$; therefore the full hypothenuse square, sum of these two rectangles, equals:
-\[ c^2 = a^2 + b^2\]
-
-Of course Euclid did not have the modern mathematical “language” available, and reading his book \emph{Elements} (in ancient Greek) is not that simple and requires a deep knowledge of the scientific prose of his time. But substantially his proof was purely geometric and based on equivalence of triangles and rectangles areas (Euclide, \emph{Elements}, book \~I,47).
-
-\subsection{Second solution}
-Another simple purely geometrical proof is shown in figures~\ref{fig:pitagora2}~$(a)$ and~$(b)$.
-Build a square of side $a+b$ where two grays squares of sides $a$ and $b$
-are contained as in figure~\ref{fig:pitagora2}-$(a)$: their total area
-equals $a^2+b^2$. Notice that the white triangles contained in this figure have arms of length $a$ and $b$ and hypothenuse $c$. In figure~\ref{fig:pitagora2}~$(b)$ such four white triangles are moved to the corners of the larger square, so that the gray interior is a square of side $c$. Due to the identity of the four white triangles in both figures, the gray areas are equivalent, therefore the square with side equal to the hypotenuse $c$ is equivalent to the squares built on the triangle arms $a$ and $b$, and this, again, proves Pitagoras' theorem.
-\begin{figure}
-\begin{Esempio}*[\small](0.40)
-\unitlength=0.00675\linewidth
-\begin{picture}(70,70)
-\AutoGrid
-\polygon(0,0)(70,0)(70,70)(0,70)
-{\color{lightgray}
-\polygon*(0,40)(30,40)(30,70)(0,70)
-\polygon*(30,0)(70,0)(70,40)(30,40)}
-\segment(30,70)(70,40)
-\segment(0,0)(30,40)
-\Pbox(15,55)[cc]{a^2}[0]\Pbox(50,20)[cc]{b^2}[0]
-\Pbox(15,40)[t]{a}[0]\Pbox(15,00)[b]{a}[0]
-\Pbox(70,55)[r]{a}[0]\Pbox(30,55)[l]{a}[0]
-\Pbox(00,20)[l]{b}[0]\Pbox(30,20)[r]{b}[0]
-\Pbox(50,40)[b]{b}[0]\Pbox(50,70)[t]{b}[0]
-\Pbox(15,20)[br]{c}[0]\Pbox(50,55)[tr]{c}[0]
-\put(0,-6){\makebox(0,0)[bl]{$(a)$}}
-\end{picture}
-\hfill
-\begin{picture}(70,70)
-\AutoGrid
-\polygon(0,0)(70,0)(70,70)(0,70)
-{\color{lightgray}
-\polygon*(40,0)(70,40)(30,70)(0,30)}
-\put(70,-6){\makebox(0,0)[br]{$(b)$}}
-\Pbox(35,35)[cc]{c^2}[0]
-\Pbox(55,00)[b]{a}[0]\Pbox(70,55)[r]{a}[0]
-\Pbox(00,15)[l]{a}[0]\Pbox(15,70)[t]{a}[0]
-\Pbox(00,55)[l]{b}[0]\Pbox(55,70)[t]{b}[0]
-\Pbox(15,00)[b]{b}[0]\Pbox(70,20)[r]{b}[0]
-\Pbox(15,50)[br]{c}[0]\Pbox(50,55)[bl]{c}[0]
-\Pbox(20,15)[tr]{c}[0]\Pbox(55,20)[tl]{c}[0]
-\end{picture}
-\end{Esempio}
-\caption{Another proof of Pitagoras' theorem}\label{fig:pitagora2}
-\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Generic curves}
@@ -1559,7 +1590,7 @@ With the \cs{Curve} macro it is possible to make line art or filled shapes. The
\end{figure}
Another interesting construction is a clock quadrant; this is shown
- in figure~\ref{fig:orologio}; remember that in order to rotate any object, therefore using the \cs{rotatebox} command, the \pack{graphicx} package is necessary; package \pack{euclideangeomentry} and its partners do no load it. This very manual explicitly loads it together with the other necesssary packages.
+ in figure~\ref{fig:orologio}
\begin{figure}[!htb]
\begin{Esempio}[\setfontsize{9.5}](0.525)
@@ -1590,8 +1621,8 @@ With the \cs{Curve} macro it is possible to make line art or filled shapes. The
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Figure~\ref{fig:iperbole} shows an equilateral hyperbola; since it
- has asymptotes, the drawing must be carefully done avoiding overflows,
- parts of drawing out of the \env{picture} area. Nevertheless
+ has asymptotes, the drawing must be carefully done avoiding overflows,
+ and parts of drawing out of the \env{picture} area. Nevertheless
the possibility of describing mathematical functions in terms of L3
functions (in spite of the same name, they are completely different
things) makes it possible to exploit the \meta{settings} argument to
@@ -1626,8 +1657,8 @@ y(t) = f_2(t)
because it is easy to code the $x$ and the $y$ component and use the
\cs{fpdowhile} command to trace the curve with a piecewise continuous
line; actually a continuous line with a piecewise continuous derivative;
- it is important to sample the curve in a sufficient dense way.
- A heart shaped mathematical function taken from the internet
+ it is important to sample the curve in a sufficiently dense way.
+ A heart shaped mathematical function taken from the internet%
\footnote{\url{http://mathworld.wolfram.com/HeartCurve.html} reports
several formulas, including the cardioid, but the one we use here is
a different function.} is the following
@@ -1767,13 +1798,13 @@ the intersections do exist, even if it is possible that the circles are tangent
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 are 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 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 is 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.
+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 triangles $IC_1P_1$ and $IC_2P_1$, Pythagoras' theorem lets us determine the relation between the common leg $IP_1$ and the other triangle sides; this is 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.
+The 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}
@@ -1789,10 +1820,10 @@ Th symbols are self explanatory; as usual, input data (those entered before the
\Circlewithcenter\Kdue radius\RKdue
\thinlines
\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno and\RKdue to\Puno and\Pdue
-\Pbox(\Kuno)[br]{C_1}[4] \Pbox(\Kdue)[bc]{C_2}[4]
+\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(26, 2)[bl]{R_2}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25, 3)[bl]{R_2}[0]
\Pbox(\CI)[t]{I}[4]
%
\segment(\Kuno)(\Kdue)\segment(\Puno)(\Pdue)
@@ -1820,13 +1851,13 @@ Th symbols are self explanatory; as usual, input data (those entered before the
\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}
+\caption{Intersections of two generic circles}\label{fig;Intersections-of-two-circles}\label{fig:2circle-intersections}
\end{figure}
The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the following.
\begin{Verbatim}
-\begin{minipage}{0.475\linewidth}% Geometrical construcion
+\begin{minipage}{0.475\linewidth}% Geometrical construction
\unitlength0.01\linewidth
\begin{picture}(100,100)(-50,-50)
\AutoGrid
@@ -1840,10 +1871,10 @@ The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the follow
\thinlines
\TwoCirclesIntersections(\Kuno)(\Kdue)withradii\RKuno
and\RKdue to\Puno and\Pdue
-\Pbox(\Kuno)[br]{C_1}[4] \Pbox(\Kdue)[bc]{C_2}[4]
+\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(26, 2)[bl]{R_2}[0]
+\put(\Kdue){\Vector(-45:\RKdue)}\Pbox(25, 3)[bl]{R_2}[0]
\Pbox(\CI)[t]{I}[4]
%
\segment(\Kuno)(\Kdue)\segment(\Puno)(\Pdue)
@@ -1885,13 +1916,13 @@ The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the follow
with the side perpendicular line, and the intersection with the bisector
line. Figure~\ref{fig:MHBlines} displays the construction of the three
special lines relative to a specific vertex. Thanks to the macros
- described earlier in this list, this drawing is particularly simple; most
- of the code is dedicated to labelling the various points and to
- assign coordinate values to the macros that are going to be used
+ described earlier in the preceding section, this drawing is particularly
+ simple; most of the code is dedicated to labelling the various points and
+ to assign coordinate values to the macros that are going to be used
in a symbolic way. The generic triangle (not a regular polygon) requires
one line of code, and the determination of the intersections of the lines
- with the suitable triangle side, and their tracing requires two code lines
- each.
+ with the suitable triangle side, and their tracing requires two code
+ lines each.
\begin{figure}[!tb]\centering
\begin{Esempio}[\setfontsize{6.9}](0.4)
@@ -1920,19 +1951,19 @@ The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the follow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Special triangle centers}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- Each triplet of a triangle special lines of the same kind intersect each
+ Three triangle special lines of the same kind intersect each
other in a special point; the median lines intersect in the
\emph{barycenter}, the height lines in the \emph{orthocenter}, the
- bisectors lines in the \emph{incenter}; these centers may be those of
- special circles: Figures~\ref{fig:barycenter} to~\ref{fig:circumcenter};
- the \emph{incircle}, centred in the incenter,
+ bisector lines in the \emph{incenter}; these centers may be those of
+ special circles: see figures~\ref{fig:barycenter}
+ to~\ref{fig:circumcenter}; the \emph{incircle}, centred in the incenter,
has a special name, because it has the property of being tangent to all
- the three triangle sides; there is also the circumcircle that passes
+ three triangle sides; there is also the circumcircle that passes
through the three vertices, its center is the intersection of the
- three side axes. There is also the \emph{nine point circle}.
+ three side axes.
Figures~\ref{fig:barycenter}, \ref{fig:orthocenter}, \ref{fig:incenter},
and~\ref{fig:circumcenter} display the necessary constructions and,
- possibly, also the special circles they are centers of.
+ possibly, also the special circles they are centers of. There is also the \emph{nine point circle}, figure~\ref{fig:9point-circle}. It is worth noting the alla centers fall inside the various triangles, except the orthocenter that falls outside when the triangle is obtuse.
\begin{figure}[!htb]
\begin{Esempio}[\setfontsize{6.5}](0.45)
@@ -2006,43 +2037,84 @@ The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the follow
\end{figure}
\begin{figure}[!htb]
-\begin{Esempio}[\setfontsize{6.25}](0.45)
-\unitlength=0.01\linewidth
-\begin{picture}(100,110)
+\begin{Esempio}*[\normalsize](0.45)
+\unitlength=0.007\linewidth\centering
+\begin{picture}(110,110)(-5,0)
\AutoGrid
\CopyVect20,10to\Pu \Pbox(\Pu)[t]{P_1}
\CopyVect10,90to\Pd \Pbox(\Pd)[br]{P_2}
\CopyVect100,70to\Pt \Pbox(\Pt)[l]{P_3}
{\linethickness{0.6pt}\polygon(\Pu)(\Pd)(\Pt)}%
-\AxisOf\Pd and\Pu to\Mu\Du
-\AxisOf\Pu and\Pt to\Md\Dd
-\AxisOf\Pt and\Pd to\Mt\Dt
-\IntersectionOfLines(\Mu)(\Du)and(\Md)(\Dd)to\C
-\AddVect\Mu and\Du to\Du\Dotline(\Mu)(\Du){3}[2]
-\AddVect\Md and\Dd to\Dd\Dotline(\Md)(\Dd){3}[2]
-\AddVect\Mt and\Dt to\Dt\Dotline(\Mt)(\Dt){3}[2]
-\Pbox(\C)[l]{C}[3.5]
+\AxisOf\Pd and\Pu to\Mu\Du \segment(\Mu)(\Du)
+\AxisOf\Pu and\Pt to\Md\Dd \segment(\Md)(\Dd)
+\AxisOf\Pt and\Pd to\Mt\Dt\segment(\Mt)(\Dt)
+\IntersectionOfSegments(\Mu)(\Du)and(\Md)(\Dd)to\C
\ThreePointCircle*(\Pu)(\Pd)(\Pt)
+\Pbox(\C)[l]{C}[3.5]
\end{picture}
\end{Esempio}
\caption{Determination of the circumcenter and of the circumcircle}\label{fig:circumcenter}
\end{figure}
- These examples require some new simple macros, described in the previous
- sections; some more more examples can be made that require more complex
- macros. Even these macros are just examples. For other applications it is
- probably necessary to add even more macros.
+\begin{figure}
+\begin{Esempio}*[\small](0.40)
+\unitlength=0.007\linewidth\centering
+\begin{picture}(100,100)(0,-10)
+\AutoGrid
+\CopyVect20,0to\Pu \Pbox(\Pu)[t]{P_1}[2pt]
+\CopyVect10,80to\Pd \Pbox(\Pd)[b]{P_2}[2pt]
+\CopyVect100,60to\Pt \Pbox(\Pt)[b]{P_3}[2pt]
+{\polygon(\Pu)(\Pd)(\Pt)\ignorespaces}
+\TriangleMedianBase\Pu on\Pd and\Pt to\Pmu\Pbox(\Pmu)[bl]{M_1}[2pt]
+\TriangleMedianBase\Pd on\Pt and\Pu to\Pmd\Pbox(\Pmd)[tl]{M_2}[2pt]
+\TriangleMedianBase\Pt on\Pu and\Pd to\Pmt \Pbox(\Pmt)[tr]{M_3}[2pt]
+ \ThreePointCircle(\Pmu)(\Pmd)(\Pmt)
+ \TriangleHeightBase\Pu on\Pd and\Pt to\Phu\Pbox(\Phu)[b]{H_1}[2pt]
+ \TriangleHeightBase\Pd on\Pt and\Pu to\Phd\Pbox(\Phd)[tl]{H_2}[2pt]
+ \TriangleHeightBase\Pt on\Pu and\Pd to\Pht\Pbox(\Pht)[br]{H_3}[2pt]
+ \segment(\Pu)(\Phu) \segment(\Pd)(\Phd) \segment(\Pt)(\Pht)
+ \SubVect\Pu from\Phu to\DirHu \SubVect\Pd from\Phd to\DirHd
+ \SubVect\Pt from\Pht to\DirHt
+ \IntersectionOfLines(\Pu)(\DirHu)and(\Pt)(\DirHt)to\Po
+ \Pbox(\Po)[tl]{O}[2pt]
+ \MiddlePointOf(\Po)(\Pu)to\Pou \Pbox(\Pou)[l]{O_1}[2pt]
+ \MiddlePointOf(\Po)(\Pd)to\Pod \Pbox(\Pod)[b]{O_2}[2pt]
+ \MiddlePointOf(\Po)(\Pt)to\Pot \Pbox(\Pot)[bl]{O_3}[2pt]
+ \ThreePointCircle*(\Pou)(\Pod)(\Pot)
+ \end{picture}
+\end{Esempio}
+\caption{The nine point circle with its code}\label{fig:9point-circle}
+\end{figure}
+
+ Given the triangle with vertices $P_1, P_2, P_3$, the nine point circle is shown in figure~\ref{fig:9point-circle} with its code. The nine point are the triples of $(a)$ the height base point if the height lines; $(b)$ the middle points of the fraction of each height line between each vertex and the orthocenter; $(c)$ the middle points of the sides. It goes by itself that any point triple among the three ones of the nine point circle is good to draw he final circle.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Triangles and ellipses}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+There are some situations where an ellipse should be inserted within a triangle with some constraints. Some examples are described in the following sub subsections.
+
+The following examples require some new simple macros, described in the
+ previous sections; some more more examples can be made that require more
+ complex macros. Even these macros are just examples. For other
+ applications it is probably necessary to add even more macros.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection{The Steiner ellipse}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Let us proceed with the construction of the Steiner ellipse: given a
triangle, there exists only one ellipse that is internally tangent to
the side mid-points.
-
+
The geometrical construction goes on this way; suppose you have to draw
the Steiner ellipse of triangle $T$; finding the side middle points
has already been shown, but the process to build the ellipse is still
to be found. So let us chose a side to work as the base of triangle $T$,
and perform an affine shear transformation parallel to the base
- so as to move the vertex of triangle $T$, opposite to the base, to the
+ so as to move the vertex of triangle $T$, opposite to the base, on the
base axis, we get another triangle $T_1$ that is isosceles; if it is
not yet so, let us make another compression/expansion affine
transformation, so as to get an equilateral triangle $T_2$; this last
@@ -2085,15 +2157,8 @@ The code for drawing figure~\ref{fig;Intersections-of-two-circles} is the follow
\label{fig:Steiner-intermedio}
\end{figure}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{The tangent to an ellipse}\label{ssec:diretriz}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Ellipses have many interesting properties. One that I was not able to find anywhere in the documentation I examined (of course not the totality of available documents on ellipses) except an on-line document written in Portuguese by Sergio Alvez,
-\begin{flushleft}\setfontsize{10}%
-\url{https://docplayer.com.br/345411-Elipses-inscritas-num-triangulo.html}\end{flushleft}
-is the \emph{director circumference}, literal translation of the Portuguese definition \emph{circunfência diretriz}.
-\begin{figure}[!htbp]\centering
+\begin{figure}[!tbp]\centering
\begin{Esempio}*[\setfontsize{8.2}](0.40)
\unitlength=0.005\linewidth
\begin{picture}(170,160)(-60,-80)
@@ -2107,9 +2172,8 @@ is the \emph{director circumference}, literal translation of the Portuguese defi
\edef\P{\X,\Y}\Pbox(\P)[b]{P}[3]
% Foci coordinates
\edef\C{\fpeval{sqrt(\A**2-\B**2)}}
-\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]
-\segment(\P)(\F)
+\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]
% Director circumference
\edef\Raggio{\fpeval{2*\A}}
\Circlewithcenter\Fp radius\Raggio \Pbox(80,60)[tr]{\ISOGamma{lmss}}[0]
@@ -2130,28 +2194,37 @@ is the \emph{director circumference}, literal translation of the Portuguese defi
\end{figure}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsubsection{The tangent to an ellipse}\label{ssec:diretriz}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Ellipses have many interesting properties. One that I was not able to find anywhere in the documentation I examined (of course not the totality of available documents on ellipses) except an on-line document written in Portuguese by Sergio Alvez,
+\begin{flushleft}\setfontsize{10}%
+\url{https://docplayer.com.br/345411-Elipses-inscritas-num-triangulo.html}\end{flushleft}
+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 $FP$ and another segment $PF'$; these segments measure the distances from point $P$ to each focus: their sum is the length of the main ellipse axis $2a$, where $a$ is 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$.
+Trace a segment from $F\,P$ and another segment for $P\,F'$; these segments measure the distances from point $P$ to each focus: their sum is the length of the main ellipse axis $2a$, where $a$ is 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 $P$ 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$ with radius $2a$, centred in the other focus $F'$;
-\item the axis of segment $SF$ is tangent to the ellipse;
+\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$ determines the 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} on page~\pageref{fig:diretriz}.
+Such properties can be viewed and controlled in figure~\ref{fig:diretriz}.
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}
+\subsubsection{A triangle internally tangent ellipse given one of its foci}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
It is possible to draw an ellipse that is internally tangent to
a triangle if one of its foci is specified; without this specification
- the problem is not definite, and the number of such ellipses is countless.
+ the problem is not definite, and the number of such ellipses is
+ countless.
But with the focus specification, just one ellipse exists with that
tangency constraint. It suffices to find the other focus and at least
one point of tangency, because the focal distance and the sum of
@@ -2174,7 +2247,7 @@ Of course the geometrical construction of figure~\ref{fig:diretriz} can be used
\end{figure}
\begin{figure}[!tb]
-\begin{Esempio}[\setfontsize{7}](0.375)
+\begin{Esempio}*[\normalsize](0.375)
\unitlength0.0065\linewidth
\begin{picture}(150,150)(-30,-20)
\AutoGrid
@@ -2211,11 +2284,76 @@ focus with respect to the sides of the triangle;
\item equation~\eqref{equ:axes-foci} allows to find the second axis
length; the segment that joins the foci has the required inclination
of the main axis; its middle point is the ellipse center; therefore all
- necessary pieces of information to draw the ellipse are known.
+ necessary pieces of information to draw the ellipse are known.
\end{itemize}
Figures~\ref{fig:ellisse-interna-finale} and~\ref{fig:ellisse-interna}
display the construction steps and the final result.
+
+ \begin{figure}
+\begin{Esempio}*[\setfontsize{8.5}](0.40)
+\begin{minipage}{0.475\linewidth}\unitlength=0.00815\linewidth
+\begin{picture}(120,120)(-10,-10)
+\AutoGrid
+\polygon(0,0)(0,100)(100,100)(100,0)
+{\color{black!10!white}
+\polygon*(0,60)(0,0)(60,0)(60,60)
+\polygon*(0,60)(40,60)(40,100)(0,100)}
+\linethickness{2pt}
+\polygon(0,60)(0,0)(60,0)(60,60)
+\polygon(0,60)(40,60)(40,100)(0,100)
+\linethickness{1pt}
+{\color{red}\polygon(60,0)(100,60)(60,60)
+\polygon(40,60)(40,100)(100,60)
+\Pbox(75,45)[cc]{T_1}[0pt]\Pbox(60,0)[t]{C_1}[3pt]
+\Pbox(55,75)[cc]{T_2}[0pt]\Pbox(40,100)[b]{C_2}[3pt]}
+\Pbox(20,100)[b]{a}[0pt]\Pbox(70,100)[b]{b}[0pt]
+\Pbox(100,80)[l]{a}[0pt]\Pbox(100,30)[l]{b}[0pt]
+\Pbox(30,0)[t]{b}[0pt] \Pbox(80,0)[t]{a}[0pt]
+\Pbox(0,30)[r]{b}[0pt] \Pbox(0,80)[r]{a}[0pt]
+\Pbox(70,80)[bl]{c}[0pt]\Pbox(80,30)[tl]{c}[0pt]
+\end{picture}
+\end{minipage}
+\hfill
+\begin{minipage}{0.475\linewidth}\unitlength=0.00815\linewidth
+\begin{picture}(120,120)(-10,-10)
+\AutoGrid
+\polyline(60,0)(100,0)(100,100)(40,100)
+\Pbox(20,100)[b]{a}[0pt]\Pbox(70,100)[b]{b}[0pt]
+\Pbox(100,80)[l]{a}[0pt]\Pbox(100,30)[l]{b}[0pt]
+\Pbox(30,0)[t]{b}[0pt] \Pbox(80,0)[t]{a}[0pt]
+\Pbox(0,20)[r]{a}[0pt] \Pbox(0,70)[r]{b}[0pt]
+{\color{black!10!white}\polygon*(60,0)(100,60)(40,100)(0,40)}%
+{\thicklines\color{red}\polygon(60,0)(100,60)(40,100)(0,40)
+\Pbox(15,80)[cc]{T_2}[0pt]\Pbox(60,0)[t]{C_1}[3pt]
+\Pbox(20,15)[cc]{T_1}[0pt]\Pbox(40,100)[b]{C_2}[3pt]
+\polyline(40,100)(0,100)(0,0)(60,0)}
+\Pbox(70,80)[tr]{c}[0pt]\Pbox(80,30)[br]{c}[0pt]
+\Pbox(20,70)[tl]{c}[0pt]\Pbox(30,20)[bl]{c}[0pt]
+\end{picture}
+\end{minipage}
+\end{Esempio}
+\caption{Two squares partitioned in differente ways}
+\label{fig:two squares}
+\end{figure}
+
+
+
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \subsection{A simple proof of Pythagoras' theorem}
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ Euclide at his time could not use the algebra symbology we use today; he did not have even an effective way to write numbers; in his time in Greece and in the Near East the numbers were written with letters, the usual alphabetic letters; the Greek alphabet of 24 letters, was extended with three more symbols, stigma (\stigma), qoppa (\qoppa) and sampi (\sampi), for a total of 27 seven symbols divided in three groups of 9 symbols. The first group represented the modern values from~1 to~9, the second group represented the values from~10 to~90, the last group represented the values from~100 to~900. therefore they could easily write numbers up to~999‘, an apex denoting the fact that the letter string meant a number, not a word. For the thousands they used the same symbols preceded by an inverted apex.so they could arrive to ‚9‚9‚9 999‘. The same use of letters for denoting numbers, was in use also among the Phoenicians and the Palestinians; the Kabala is a practice that suggests special informations to those that can interpret such letter/number signs. But it was practically impossible to do any serious calculations, in any case no square roots. This is why geometry was the only means to make “impossible” calculations.
+
+The “Elements” by Euclide contain many theorems and statements that are demonstrated with geometrical constructions; The demonstration of Pythagoras' theorem to my eyes appears too complicated and difficult to understand; the geometrical construction developed hereafter is particularly ingenious and simple to understand.
+
+Assume you have a square triangle of legs $a$ and $b$ and hypothenuse $c$; the theorem states that the area of the square built on the hypotenuse equals the sum of the areas of the squares built on each leg.
+
+Let us prepare two similar squares of equal areas partitioned in differente ways. See figure~\ref{fig:two squares}.
+In both images you see the overall squares have side lengths equal to the sum of the right triangle legs; in the left image the grey squares have side lengths equalling each right triangle leg respectively. The overall square contains also two rectangles with side lengths $a$ and $b$ so that the diagonal equals the right triangle hypothenuse.
+
+These diagonals, therefore, partition the respective rectangles in two right triangles with the same dimensions of the original right triangle. In particular two of such triangles are labeled $T_1$ and $T_2$ and the vertices labeled $C_1$ and $C_2$ are emphasised. Let us now rotate both labelled triangles around their labelled vertices so as to obtain the right image, where the overall square has the same sides as the original one, although partitioned in a slightly differente way; their areas are the same; but in this second image the grey square has its side equal to the original right triangle hypothenuse; since the four right triangles contained in the overall squares of both images are equal, thus the sum of their areas are he same; therefore the grey areas in each image are the same and this means that the area of the square built on the hypotenuse equals the sum of the area of the squares built on the legs of the original right triangle. Pythagoras' theorem is proved without any use of algebra.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusion}
@@ -2228,19 +2366,20 @@ focus with respect to the sides of the triangle;
The reader can easily understand that this package is far from being
exhaustive for all geometrical problems to be solved with ruler and
- compass; it shows a way to add more commands to approach further problems;
- if any author, who creates new commands, would like to contribute more
- macros to this package, I will be happy to integrate his/her contribution
- to a new version of this package; depending on the contribution, I would
- be very happy to add its author name to this package author list; for
- simpler contributions each contributor will be duly acknowledged.
+ compass; it shows a way to add more commands to approach further
+ problems; if any author, who creates new commands, would like to
+ contribute more macros to this package, I will be happy to integrate
+ his/her contribution to a new version of this package; depending on the
+ contribution, I would be very happy to add its author name to this
+ package author list; for simpler contributions each contributor will be
+ duly acknowledged.\enlargethispage*{\baselineskip}
Creating new macros to solve more problems is pleasant; the more
difficult the problem, the greater the satisfaction in solving it.
\begin{center}\bfseries
- Have fun with \LaTeX and its possible applications!
+ Enjoy using \LaTeX and its possible applications!
\end{center}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx b/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
index 90008b0ac4..dfe452388f 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry.dtx
@@ -6,7 +6,7 @@
\keepsilent
\preamble
- Copyright (C) 2020-2021 Claudio Beccari all rights reserved.
+ Copyright (C) 2020-2023 Claudio Beccari all rights reserved.
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
@@ -17,7 +17,6 @@
\askforoverwritefalse
\generate{\file{euclideangeometry.sty}{\from{euclideangeometry.dtx}{package}}}
-%\generate{\file{README.txt}{\from{euclideangeometry.dtx}{readme}}}
\def\tmpa{plain}
\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
@@ -33,7 +32,7 @@
%<package>\ProvidesPackage{euclideangeometry}%
%<readme>File README.txt for package euclideangeometry
%<*package|readme>
- [2021-10-04 v.0.2.1 Extension package for curve2e]
+ [2023-07-11 v.0.2.2 Extension package for curve2e]
%</package|readme>
%<*driver>
\documentclass{ltxdoc}\errorcontextlines=100
@@ -146,7 +145,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% installed with your updated complete \TeX system installation.
% Please refer to the user manual before using this package.
-% \CheckSum{1294}
+% \CheckSum{1315}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\StopEventually{}
%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -295,12 +294,12 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% evolution of a command that I have been using for years in several
% documents of mine. It uses some general text, not necessarily
% connected to a particular point of the |picture| environment,
-% as a legend; it can draw short text as a simple horizontal box,
+% as a legend; It can draw short text as a simple horizontal box,
% and longer texts as a vertical box of specified width and height
%
% Is syntax is the following:
%\begin{ttsyntax}
-%\cs{Zbox}\parg{position}\parg(dimensions)\oarg{alignment}\marg{text}
+%\cs{Zbox}\parg{position}\parg{dimensions}\oarg{alignment}\marg{text}
%\end{ttsyntax}
% where \meta{position} is where the box reference point has
% to be put in the picture; \meta{dimensions} are optional; if not
@@ -418,13 +417,13 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% The first and principal command is |\IntersectionOfLines| and
% it has the following syntax:
%\begin{ttsyntax}
-%\cs{IntersectionOfLines}\parg{point1}\parg{dir1}and\parg{point2}\parg{dir2}to\meta{crossing}
+%\cs{IntersectionOfLines}\parg{point1}\parg{dir1}and\parg{point2}\parg{dir2}to\meta{crossing point}
%\end{ttsyntax}
% where \meta{point1} and \meta{dir1} are respectively a point of the
% first line and its \emph{direction}, not a second point, but the
% \emph{direction} — it is important to stress this point; similarly
% for the second line; the output is stored in
-% the macro that identifies the \meta{crossing} point. The directions
+% the macro that identifies the \meta{crossing point}. The directions
% do not need to be expressed with unit vectors, but the lines must not
% be parallel or anti parallel (equal directions or differing by
% $180^\circ$); the macro contains a test that checks this anomalous
@@ -486,7 +485,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% a little while. Meanwhile the syntax of the whole macro is the
% following:
%\begin{ttsyntax}
-%\cs{ThreePointCircle}\meta{$\star$}\parg{vetex1}\parg{vertex2}\parg{vertex3}
+%\cs{ThreePointCircle}\meta{$\star$}\parg{vertex1}\parg{vertex2}\parg{vertex3}
%\end{ttsyntax}
% where the three vertices are the three points where the circle
% must pass, but they identify also a triangle. Its side axes
@@ -500,7 +499,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
% into another macro; for this reason another macro should be more
% easy to use; its syntax is the following:
%\begin{ttsyntax}
-%\cs{ThreePointCircleCenter}\parg{vetex1}\parg{vertex2}\parg{vertex3}
+%\cs{ThreePointCircleCenter}\parg{vertex1}\parg{vertex2}\parg{vertex3}
%\qquad to\meta{center}
%\end{ttsyntax}
% where the vertices have the same meaning, but\meta{center} is
@@ -510,7 +509,7 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
\NewDocumentCommand\ThreePointCircle{s r() r() r()}{%
\AxisOf#2and#3to\Mu\Du \AxisOf#2and#4to\Md\Dd
-\IntersectionOfLines(\Mu)(\Du)and(\Md)(\Dd)to\C
+\IntersectionOfSegments(\Mu)(\Du)and(\Md)(\Dd)to\C
\SubVect#2from\C to\R
\IfBooleanTF{#1}{\CircleWithCenter\C Radius\R}{}\ignorespaces}
@@ -548,12 +547,16 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
%
% As announced, here we have a macro to compute the axis of a segment;
% given two points $P_1$ and $P_2$, for example the end points of a
-% segment, or better the end point of the vector that goes from
+% segment, or better the end points of the vector that goes from
% $P_1$ to $P_2$, the macro determines the segment middle point and
% a second point the lays on the perpendicular at a distance equal to half
% the first two points distance; this second point lays at the left of
% vector $P_2-P_1$, therefore it is important to select the right initial
% vector, in order to have the second axis point on the desired side.
+% This macro did not work well because sometimes its internal variables
+% interfered with other commands internal ones; enclosing everything
+% within an auto deleting group by means of the auto deleting |\x| macro
+% usual trick, such interferences should be avoided.
%\begin{ttsyntax}
%\cs{AxisOf}\meta{P1} and\meta{P2} to\meta{Axis1}\meta{Axis2}
%\end{ttsyntax}
@@ -563,12 +566,16 @@ g\raisebox{-0.715ex}{\kern-0.26em u}\kern-0.13em\I\kern-0.14em t}\xspace}
%\cs{SegmentCenter}\parg{P1}\parg{P2}to\meta{center}
%\cs{MiddlePointOf}\parg{P1}\parg{P2}to\meta{center}
%\end{ttsyntax}
-% \meta{P1}, \meta{p2} and \meta{center} are all vectors.
+% \meta{P1}, \meta{P2}, \meta{Axis1}, \meta{Axis2} and \meta{center} are
+% all ordered pairs (vectors).
% \begin{macrocode}
-\def\AxisOf#1and#2to#3#4{%
+\def\AxisOf#1and#2to#3#4{\bgroup
\SubVect#1from#2to\Base \ScaleVect\Base by0.5to\Base
-\AddVect\Base and#1to#3 \MultVect\Base by0,1to#4}
+\AddVect\Base and#1to\Mout \MultVect\Base by0,1to\Base
+\AddVect\Mout and\Base to\Dout
+\edef\x{\egroup\noexpand\CopyVect\Mout to\noexpand#3\relax
+ \noexpand\CopyVect\Dout to\noexpand#4}\x\ignorespaces}
\def\SegmentCenter(#1)(#2)to#3{\AddVect#1and#2to\Segm
\ScaleVect\Segm by0.5to#3\ignorespaces}
diff --git a/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf b/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
index 1a837c1d5a..5e18a88115 100644
--- a/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
+++ b/macros/latex/contrib/euclideangeometry/euclideangeometry.pdf
Binary files differ