Skip to content

Commit

Permalink
automatic angle naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmybutton committed Jan 8, 2017
1 parent fac8e5b commit 43012a3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
MetaPost + ConTeXt rendition of Oliver Byrne's "The first six books of the Elements of Euclid"

The book itself (byrne_context.tex) is licensed under CC-BY-SA 4.0.
MetaPost library (byrne.mp) and lettrines generator (lettrines.mp) are licensed under GPLv3 or later.
39 changes: 18 additions & 21 deletions byrne_context.tex
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
{\tfa github.com/jemmybutton}
\vskip 0.25\baselineskip

{\tfb 2017 ed.\,0.1}
{\tfb 2017 ed.\,0.1a}
\vskip \baselineskip

\symbol[cc][cc-by-sa-nc]
\symbol[cc][cc] \symbol[cc][by] \symbol[cc][sa]

\startnarrower
\setuplocalinterlinespace[line=2ex]
Expand Down Expand Up @@ -206,8 +206,8 @@
\startitemize[m,joinedup,nowhite]
\item $\drawAngle{A} + \drawAngle{B} + \drawAngle{C} = 2 \drawAngle{B} = \drawTwoRightAngles$. \\ That is, the red angle added to the yellow angle added to the blue angle, equal twice the yellow angle, equal two right angles.
\item $\drawAngle{A} + \drawAngle{C} = \drawAngle{B}$. \\ Or in words, the red angle added to the blue angle, equal the yellow angle.
\item $\drawAngle{B} < \drawAngle{A} \mbox{ or } < \drawAngle{C}$. \\ The yellow angle is greater that either the red or blue angle.
\item $\drawAngle{A} \mbox{ or } \drawAngle{C} > \drawAngle{B}$. \\ Either the red or blue angle is less that the yellow angle.
\item $\drawAngle{B} > \drawAngle{A} \mbox{ or } > \drawAngle{C}$. \\ The yellow angle is greater that either the red or blue angle.
\item $\drawAngle{A} \mbox{ or } \drawAngle{C} < \drawAngle{B}$. \\ Either the red or blue angle is less that the yellow angle.
\item $\drawAngle{B} \mbox{ minus } \drawAngle{C} = \drawAngle{A}$. \\ In other terms, the yellow angle made less be the blue angle equal red angle.
\item $\drawUnitLine{BC}^2 = \drawUnitLine{AB}^2 + \drawUnitLine{CA}^2$. \\ That is, the square of the yellow line is equal to the sum of the squares of the blue and red lines.
\stopitemize
Expand Down Expand Up @@ -1336,13 +1336,15 @@
C := B xscaled -1;
D := 9/5[A,B];
E := 9/5[A,C];
draw byAngleWithName(B, A, C, black, 0)(A);
draw byAngleWithName(A, B, C, byblue, 0)(B);
draw byAngleWithName(B, C, A, byblue, 0)(C);
draw byAngle(B, A, C, black, 0);
draw byAngle(A, B, C, byblue, 0);
draw byAngle(B, C, A, byblue, 0);
draw byAngle(C, B, E, byyellow, 0);
draw byAngle(D, C, B, byyellow, 0);
draw byAngleWithName(B, D, C, byred, 0)(D);
draw byAngleWithName(C, E, B, byred, 0)(E);
draw byAngle(B, D, C, byred, 0);
draw byAngle(C, E, B, byred, 0);
byAngleDefine(E, B, D, black, 1);
byAngleDefine(D, C, E, black, 1);
byLineDefine(B, D, byyellow, 0, 0);
byLineDefine(C, E, byyellow, 0, 0);
byLineDefine(B, E, byblue, 0, 0);
Expand All @@ -1351,8 +1353,6 @@
byLineDefine(A, C, byred, 0, 0);
byLineDefine(B, C, black, 0, 0);
draw byNamedLineSeq(0)(BE,noLine,BC,noLine,CD,BD,AB,AC,CE);
byAngleDefine(E, B, D, white, 0);
byAngleDefine(D, C, E, white, 0);
}
\drawCurrentPictureInMargin
\problemNP{I}{n}{any isosceles triangle \drawLine[bottom]{AB,AC,BC} if the equal sides be produced, the external angles at the base are equal, and the internal angles at the base are also equal.}
Expand All @@ -1364,26 +1364,23 @@

Then in
\drawFromCurrentPicture{
draw byNamedAngle(A);
draw byNamedAngle(BAC);
draw byNamedLineSeq(0)(AB,AC,CE,BE);
}
and
\drawFromCurrentPicture{
draw byNamedAngle(A);
draw byNamedAngle(BAC);
draw byNamedLineSeq(0)(AB,AC,CD,BD);
}\\
we have $\drawUnitLine{AB,BD} = \drawUnitLine{AC,CE}$ (const.),\\
\drawAngle{A} common to both,\\
\drawAngle{BAC} common to both,\\
and $\drawUnitLine{AB} = \drawUnitLine{AC}$ (hyp.)\\
$\therefore \drawAngle{C,DCB} = \drawAngle{B,CBE}$, $\drawUnitLine{BE} = \drawUnitLine{CD}$ and $\drawAngle{E} = \drawAngle{D}$ \inprop[prop:I.IV].
$\therefore \drawAngle{BCA,DCB} = \drawAngle{ABC,CBE}$, $\drawUnitLine{BE} = \drawUnitLine{CD}$ and $\drawAngle{CEB} = \drawAngle{BDC}$ \inprop[prop:I.IV].

Again in
\drawLine{BC,CE,BE}
and
\drawLine{BC,CD,BD}\\
we have $\drawUnitLine{BD} = \drawUnitLine{CE}$, $\drawAngle{E} = \drawAngle{D}$ and $\drawUnitLine{BE} = \drawUnitLine{CD}$,\\
Again in \drawLine{BC,CE,BE} and \drawLine{BC,CD,BD}\\
we have $\drawUnitLine{BD} = \drawUnitLine{CE}$, $\drawAngle{CEB} = \drawAngle{BDC}$ and $\drawUnitLine{BE} = \drawUnitLine{CD}$,\\
$\therefore \drawAngle{DCE,DCB} = \drawAngle{EBD,CBE}$ and $\drawAngle{DCB} = \drawAngle{CBE}$ \inprop[prop:I.IV]\\
but $\drawAngle{C,DCB} = \drawAngle{B,CBE}$, $\therefore \drawAngle{C} = \drawAngle{B}$.
but $\drawAngle{BCA,DCB} = \drawAngle{ABC,CBE}$, $\therefore \drawAngle{BCA} = \drawAngle{ABC}$.
\stopCenterAlign

\qed
Expand Down

0 comments on commit 43012a3

Please sign in to comment.