From c99b51dafa4da48e2375e50ed76d7894f51d209e Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Fri, 6 Oct 2023 19:38:56 +0000 Subject: [PATCH] feat: Start implementing Rostamian's pages (#39) Began with incenter.html, the first one alphabetically. Needed one new point construction method, and a new option to see what was going on. Got the planar diagrams on that page working. The next step on #36 will be to get 3D diagrams as the theorem on this page generalizes to 3D. That will be a bigger task, so merging this now. Reviewed-on: https://code.studioinfinity.org/glen/archematics/pulls/39 Co-authored-by: Glen Whitney Co-committed-by: Glen Whitney --- etc/options.html | 7 +- public/index.html | 1 + public/rostamian/incenter.html | 393 +++++++++++++++++ public/rostamian/inequality.html | 156 +++++++ .../inscribed-equilateral-solution.html | 131 ++++++ public/rostamian/inscribed-equilateral.html | 135 ++++++ public/rostamian/steve_gray.html | 142 ++++++ public/rostamian/trisect-alberts.html | 403 ++++++++++++++++++ public/rostamian/trisect-baker.html | 268 ++++++++++++ public/rostamian/trisect-cdsmith.html | 154 +++++++ public/rostamian/trisect-dudley.html | 169 ++++++++ public/rostamian/trisect-dudley2.html | 155 +++++++ public/rostamian/trisect-durham.html | 267 ++++++++++++ public/rostamian/trisect-jamison-ext.html | 185 ++++++++ public/rostamian/trisect-jamison.html | 219 ++++++++++ public/rostamian/trisect-pllana.html | 173 ++++++++ public/rostamian/trisect-raiford.html | 152 +++++++ public/rostamian/trisect-stark.html | 399 +++++++++++++++++ src/adapptlet.civet | 68 +-- src/adapptypes.civet | 2 +- src/options.civet | 7 +- 21 files changed, 3549 insertions(+), 37 deletions(-) create mode 100644 public/rostamian/incenter.html create mode 100644 public/rostamian/inequality.html create mode 100644 public/rostamian/inscribed-equilateral-solution.html create mode 100644 public/rostamian/inscribed-equilateral.html create mode 100644 public/rostamian/steve_gray.html create mode 100644 public/rostamian/trisect-alberts.html create mode 100644 public/rostamian/trisect-baker.html create mode 100644 public/rostamian/trisect-cdsmith.html create mode 100644 public/rostamian/trisect-dudley.html create mode 100644 public/rostamian/trisect-dudley2.html create mode 100644 public/rostamian/trisect-durham.html create mode 100644 public/rostamian/trisect-jamison-ext.html create mode 100644 public/rostamian/trisect-jamison.html create mode 100644 public/rostamian/trisect-pllana.html create mode 100644 public/rostamian/trisect-raiford.html create mode 100644 public/rostamian/trisect-stark.html diff --git a/etc/options.html b/etc/options.html index 2d982bb..45e7440 100644 --- a/etc/options.html +++ b/etc/options.html @@ -7,12 +7,17 @@

Debugging

- Trace the following to the JavaScript console:

Java Geometry Applets

+ Trace the following to the JavaScript console:
+
+
+ Alter execution of the translated applet:
+ + diff --git a/public/index.html b/public/index.html index 2767047..cb5c34d 100644 --- a/public/index.html +++ b/public/index.html @@ -11,6 +11,7 @@
  • Revived
  • After
  • Book I Def 2
  • +
  • Dr. Rostamian's unconverted pages
  • WRL Files

    • Target two
    • diff --git a/public/rostamian/incenter.html b/public/rostamian/incenter.html new file mode 100644 index 0000000..cf80186 --- /dev/null +++ b/public/rostamian/incenter.html @@ -0,0 +1,393 @@ + + + + + + + +The incenter via algebra + + + + + + + +

      A triangle's incenter via algebra

      +

      … and extension to tetrahedra

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag $C$ to change the geometry.
      +Press “r” to reset the diagram to its initial state.
      +The incenter lies at the intersection of angle bisectors. +
      +
      + + +

      Statement of the problem

      + +

      +It is a fact of elementary geometry that the center of +a triangle's incircle—known as its incenter—lies +at the point of intersection of the +triangle's angle bisectors. This leads to an elegant expression for +the location of the incenter as a linear combination of the +triangle's vertices, as stated in: + +

      +Proposition 1: + +Let $a$, $b$, $c$ be the lengths of the +sides opposite to the vertices $A$, $B$, $C$ of the triangle $ABC$. +Then the incenter, $O$, is expressed as a linear combination of +the vertices as: +\[ + O = \frac{a}{p}A + \frac{b}{p}B + \frac{c}{p}C, +\] +where $p = a + b + c$ is the triangle's perimeter. + + +

      +To make sense of this statement, you need to know something about +the algebra of points. The following capsule summary is all that's needed: + +

      +

      +The algebra of points: +Consider the points $A$ and $B$ and a variable $t$ that takes +values in the range 0 to 1. +If $T$ is a point on the segment $AB$ +such that $AT/AB = t$, we write $T = (1-t)A + tB$. Note that when +$t=0$ we get $T=A$, and when $t=1$ we get $T=B$. +As the value of $t$ ranges from 0 to 1, the point $T$ slides +from $A$ to $B$. +

      + + +

      A preliminary proposition

      + +

      +The following elementary proposition is needed for the proof of +Proposition 1. This one is a standard result and is +likely to be found in Euclid's Elements but I haven't checked. + +

      +PS: +After this web page was written, +I found out that +Proposition 2 appears in Euclid's Elements as +Book VI, Proposition 3 +with a simpler and more elegant proof! +Nevertheless, I am retaining my original proof here as +a not-so-elegant alternative. + +

      +Proposition 2: + +Let the bisector of the angle $C$ in the triangle $ABC$ meet the side $AB$ +at point $P$. We have: +\[ +\frac{PA}{PB} = \frac{b}{a}, +\] +where $a$ and $b$ are as in Proposition 1. + + +

      +Proof: +From $P$ drop perpendicular $PM$ and $PN$ onto the sides $AC$ and $BC$; +see the diagram below. The right triangles $CMP$ and $CNP$ are congruent +because they share a common hypotenuse and their angles at $C$ are equal. +Therefore, $PM = PN$. + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag $C$ to change the geometry.
      +Press “r” to reset the diagram to its initial state.
      +
      +
      + +

      +Let $H$ be the foot of the altitude dropped from $C$. Let us note +the area of the triangle $APC$ may be expressed in two different ways +in terms of the altitudes $CH$ and $PM$: +\[ + \frac{1}{2} AP \cdot CH = \frac{1}{2} AC \cdot PM. +\] +Similarly, the area of the triangle $BPC$ may be expressed in two +different way in terms of the altitudes $CH$ and $PN$: +\[ + \frac{1}{2} BP \cdot CH = \frac{1}{2} BC \cdot PN. +\] + +Dividing these two equalities and recalling that $PM = PN$, +we arrive at the desired assertion.   QED + +

      The proof of Proposition 1

      + +

      +The diagram below shows the bisector $CC'$ of the angle $C$. +It is known from elementary geometry that the incenter $O$ lies +on the bisector. +From Proposition 2 we have $C'A/C'B = b/a$. It +follows that $AC'/AB = b/(a+b)$. In terms of the notation of +the algebra of points introduced earlier in this page, +this is expressed as: +\[ + C' = \Big(1 - \frac{b}{a+b} \Big) A + \frac{b}{a+b} B + = \frac{a}{a+b} A + \frac{b}{a+b} B. +\] +Since $O = (1-t)C + tC'$ for some $t$, we arrive at: +\[ + O = (1-t)C + t\Big[ \frac{a}{a+b} A + \frac{b}{a+b} B \Big]. +\] +This expresses the triangle's incenter $O$ in terms of its vertices, +sides lengths, and a yet unknown quantity $t$ that takes values in the range +0 to 1. + + + +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag $C$ to change the geometry.
      +Press “r” to reset the diagram to its initial state.
      +
      +
      + +

      +If we repeat the same calculation by replacing the vertex $C$ by vertex $A$, +we arrive at: +\[ + O = (1-s)A + s\Big[ \frac{b}{b+c} B + \frac{c}{b+c} C \Big], +\] +where $s$ is yet another unknown that takes values in the range from 0 to 1. + +

      +Equating the two expressions for $O$ and collecting the terms, we arrive at: +\[ + \Big[\frac{ta}{a+b} + s - 1\Big] A + + + \Big[\frac{tb}{a+b} - \frac{sb}{b+c} \Big] B + + + \Big[1 - t - \frac{sc}{b+c} \Big] C = 0. +\] + +In this equations, +if the coefficient of $C$ is nonzero, then we may solve for $C$, +obtaining $C = \alpha A + \beta B$ for some $\alpha$ +and $\beta$. But this would +mean that $C$ lies along the line $AB$ which would mean the the +three points $A$, $B$ and $C$ are collinear, therefore the +triangle $ABC$ is degenerate. We conclude that if the triangle is +non-degenerate, then the coefficient of $C$ is zero. Similar +arguments show that the coefficients of $A$ and $B$ are zero. +Thus, the following system of three equations hold: +\[ + \frac{ta}{a+b} + s - 1 = 0, + \quad + \frac{tb}{a+b} - \frac{sb}{b+c} = 0, + \quad + 1 - t - \frac{sc}{b+c} = 0. +\] +Solving this system for the unknowns $t$ and $s$ we obtain: +\[ + t = \frac{a+b}{a+b+c}, \quad s = \frac{b+c}{a+b+c}. +\] + +Substituting these in either of the expressions for $O$ we arrive at: +\[ + O = \frac{a}{a+b+C}A + \frac{b}{a+b+C}B + \frac{c}{a+b+C}C, +\] +which is equivalent to Proposition 1's +assertion.   QED + +

      Extension to tetrahedra

      + +

      +Propositions 1 extends to tetrahedra: + +

      +Proposition 3 +Let +$a$, $b$, $c$, $d$ +be the areas of the faces opposite to the vertices +$A$, $B$, $C$, $D$ of the tetrahedron $ABCD$. The the tetrahedron's +incenter $O$ is given by: +\[ + O + = \frac{a}{\mathcal{A}} A + + \frac{b}{\mathcal{A}} B + + \frac{c}{\mathcal{A}} C + + \frac{d}{\mathcal{A}} D, +\] +where $\mathcal{A} = a + b + c + d$ is the tetrahedron's surface area. + +

      +This is proved with the aid of the following extension of Proposition 2: + +

      +Proposition 4 + +Let +$a$, $b$, $c$, $d$ +be the areas of the faces opposite to the vertices +$A$, $B$, $C$, $D$ of the tetrahedron $ABCD$. +Let the bisector plane of the (internal) dihedral angle of edge $CD$ +intersect edge $AB$ at point $P$. +The we have: +\[ + \frac{PA}{PB} = \frac{b}{a}. +\] + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag $D$ to change the geometry.
      +Press “r” to reset the diagram to its initial state.
      +The plane $CDP$ bisects the dihedral angle of edge $CD$. +
      +
      + +

      +I leave the proofs to you, the diligent reader. You will find +useful information in a +discussion +in the sci.math newsgroup from January 17, 2006. + + + + + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on June 26, 2010. + +

      + + + + + +
      Go to Geometry Problems and Puzzles + +Valid HTML + +Valid CSS +
      + + + + diff --git a/public/rostamian/inequality.html b/public/rostamian/inequality.html new file mode 100644 index 0000000..49f7824 --- /dev/null +++ b/public/rostamian/inequality.html @@ -0,0 +1,156 @@ + + + + + + + +A geometric inequality + + + + + + + +

      A geometric inequality

      +

      …and its solution by + Dan Hoey

      + + + +
      + + + + + + + + + + + + + + + + +
      + +Drag the point $P$.
      +Press “r” to reset the diagram to its initial state.
      +Proposition: $PC \le PA + PB$. +
      +
      + +

      The problem

      + +

      +Proposition: Let $ABC$ be an equilateral triangle and $P$ +be an arbitrary point in its plane. Then $PC \le PA + PB$. + +

      +This was brought up in +a message +on the geometry.puzzles newsgroup on November 11, 2001. +Go to that message and scroll to the bottom of the page to see the discussion +thread. + +

      +On November 22, 2001 +Dan Hoey +offered a particularly nice solution. He also commented that he +had learned that problem may be related to the Van Schooten Theorem, +which indeed it is. See +Van +Schooten's and Pompeiu's Theorems: What are these? for much detail and +historical background. + +

      The proof

      + +

      +Here is Dan Hoey's proof of the proposition as stated above. + +

      +On the line segment $AP$ construct the equilateral triangle +$APD$, as shown in the diagram below, then add the line segment $DC$. + +

      +Let us show that the triangles $APB$ and $ADC$ are congruent. For this, +Let us observe that the sides $AP$ and $AB$ in the triangle $APB$ +equal the sides $AD$ and $AC$ in the triangle $ADC$, by the construction. +Moreover, the angles $BAP$ and $CAD$ are equal because each equals +the difference of +a 60 degree angle and the angle $DAB$. Therefore, the triangles $APB$ and +$ADC$ are congruent by the side-angle-side equality. +We conclude, in particular, that $PB = DC$. + +

      +In the triangle $PDC$ we have $PC \le PD + DC$. In this inequality +replace $PD$ and $DC$ by their equivalents $PA$ and $PB$ to arrive at +$PC \le PA + PB$.   QED + + + +
      + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $P$.
      +Press “r” to reset the diagram to its initial state.
      +Observation: The triangles $APB$ and $ADC$ are congruent. +
      +
      + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on November 23, 2001.
      +Cosmetic revisions on June 23, 2010. +
      +

      + + + + + +
      Go to Geometry Problems and Puzzles + +Valid HTML + +Valid CSS +
      + + + + diff --git a/public/rostamian/inscribed-equilateral-solution.html b/public/rostamian/inscribed-equilateral-solution.html new file mode 100644 index 0000000..761d1c6 --- /dev/null +++ b/public/rostamian/inscribed-equilateral-solution.html @@ -0,0 +1,131 @@ + + + + + + + +An equilateral triangle inscribed in a rectangle + + + + + + + +

      An equilateral triangle inscribed in a rectangle

      + +

      +The following solution to the +inscribed triangle puzzle +is due to Peter Renz +who communicated it to me on December 2016. + +

      +For the sake of completeness, let's begin with the statement of the puzzle. +The figure below depicts a equilateral triangle $AEF$ inscribed in a rectangle +in such a way that the two share a vertex. We wish to show that the +area of the pink triangle ($ECF$) is the sum of the areas of the other two +colored triangles. + +

      + [frame000.png] +
      + +

      +As noted in the referring page (see the link above), a solution with +the aid of trigonometry is quite straightforward. The purpose of this +page is to present a solution in the style of Euclid, without appeal +to trigonometry. + +

      +The following animation encapsulates Peter Renz's solution in its +entirety. + +

      + [animation.gif] +
      + +The animation should be self-explanatory if you stare at it long enough. +Nevertheless, I will now proceed to point out the reasoning through +several still images extracted from that animation. + +
        + +
      1. +Construct a circle on the diameter $FE$, and then subdivide its boundary +into six 60-degree wedges starting at the vertex $C$. Mark the division +points $C$, $P$, $Q'$, $C'$, $P'$, and $Q$, as shown. + +
        + [frame007.png] +
        + +
      2. +Rotate the triangle $FDA$ about $F$ by 60 degrees to bring the edge $FA$ to +coincide with $FE$. + +
        + [frame073.png] +
        + +The key observation is that the rotation moves the vertex $D$ into $P'$. + +
      3. +Further rotate the triangle about the circle's center by 180 degrees to +place it in the $FPE$ position. + +
        + [frame111.png] +
        + +
      4. +Rotate the triangle $EBA$ about $E$ by 60 degrees to bring the edge $EA$ to +coincide with $EF$. Then the vertex $B$ will move onto $Q'$ for reasons +similar to those explained above. + +
        + [frame177.png] +
        + +
      5. +The two red line segments in the figure below are parallel and of equal lengths +by virtue of being the side and the “radius” of the +regular hexagon (not shown) inscribed in the circle. + +
        + [frame180.png] +
        + +The altitudes of the three triangles, dropped from the vertices $C$, +$P$, and $Q'$ are shown in dashed lines. It should be clear that the +altitude dropped from $C$ is equal in length to the sum of those of +the other two altitudes. Since the three triangles share a common base, +the area of one is the sum of the areas of the other two. Q.E.D. + +
      + + + + + +
      Go to Geometry Problems and Puzzles + +Valid HTML + +Valid CSS +
      + + + + diff --git a/public/rostamian/inscribed-equilateral.html b/public/rostamian/inscribed-equilateral.html new file mode 100644 index 0000000..440dde8 --- /dev/null +++ b/public/rostamian/inscribed-equilateral.html @@ -0,0 +1,135 @@ + + + + + + + +An equilateral triangle inscribed in a rectangle + + + + + + + +

      An equilateral triangle inscribed in a rectangle

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Slide the “@” up and down to change the geometry.
      +Press “r” to reset the diagram to its initial state.
      +Proposition: The blue area equals the sum of the two pink areas. +
      +
      + +

      Problem statement

      + +

      +The diagram above shows an equilateral triangle inscribed in a rectangle +in such a way that the two have a vertex in common. This subdivides the +rectangle into four disjoint triangles. +The original equilateral triangle is shown in white +in the diagram; the other three are shown in color. + +

      +Proposition + +The area of the blue triangle equals the sum +of the areas of the two pink triangles. + + +

      +The trigonometric proof is quite straightforward. I don't +know of a classical proof a la Euclid. +(Well, actually I haven't tried much.) +If you can think of a neat non-trigonometric proof, let me know. I will +put it here with due credit. + +

      +This problem appeared as a conjecture +in an article +in the geometry.puzzles newsgroup on March 15, 1997. + +

      +Note added January 8, 2017: +Here is a +clever solution +that Peter Renz sent me a in December 2016. Thanks, Peter! + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on July 2, 2010. + +

      + + + + + +
      Go to Geometry Problems and Puzzles + +Valid HTML + +Valid CSS +
      + + + + diff --git a/public/rostamian/steve_gray.html b/public/rostamian/steve_gray.html new file mode 100644 index 0000000..60e3aee --- /dev/null +++ b/public/rostamian/steve_gray.html @@ -0,0 +1,142 @@ + + + + + + + +Triangles with common base + + + + + + + +

      Triangles with common base

      +

      An interesting problem proposed by + Steve Gray

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $D$.
      +Press “r” to reset the diagram to its initial state.
      +Proposition: $A'B'C'$ is equilateral and its centroid $M$ is fixed. +
      +
      + +

      The construction

      + +

      +This problem was proposed by +Steve Gray +in the geometry.puzzles newsgroup +(see +the original message) on July 26, 2002. +Scroll to the bottom of that page for a link to the solution. + +

      +Consider an equilateral triangle $ABC$, a line segment $PQ$, +and an arbitrary point $D$, as seen in the diagram above. +On the segment $PQ$ construct three triangles +$PC'Q$, +$PA'Q$, +$PB'Q$, +similar to the triangles +$ADB$, +$BDC$, +$CDA$, +respectively. + +

      +Proposition 1: +The triangle $A'B'C'$ is equilateral. + +

      +Proposition 2: +The centroid of $A'B'C'$ is independent of $D$. + + +

      +Steve adds: +

      +

      +Now generalize this for a regular $n$-gon. The new points form a +regular $n$-gon whose centroid is independent of $D$. +This problem is original so far as I know. I am interested in the +simplest synthetic solution; no algebra, please. +

      + + +
      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +July 26, 2002.
      +Cosmetic revisions on June 17, 2010. +
      +

      + + + + + +
      Go to Geometry Problems and Puzzles + +Valid HTML + +Valid CSS +
      + + + + diff --git a/public/rostamian/trisect-alberts.html b/public/rostamian/trisect-alberts.html new file mode 100644 index 0000000..fda5356 --- /dev/null +++ b/public/rostamian/trisect-alberts.html @@ -0,0 +1,403 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      Construction by Chris Alberts

      + +

      +The construction described in this page is due to Chris Alberts, who +sent it to me in an email on March 15, 2011. +I have paraphrased and rearranged his construction, but the +differences from the original are cosmetic. The error analysis is mine. + +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$ +(but keep $AOB$ to less than 90 degrees).
      +Press “r” to reset the diagram to its initial state.
      +The red line ($OT$) is an approximate trisector of the angle $AOB$. +
      +
      + +

      +Consider the circular arc $AB$ on the circle $C$ centered at $O$, +shown in the diagram above. +Assume that the angle $AOB$ is between 0 and 90 degrees. +To trisect $AOB$, do: + +

        + +
      1. +Draw the circle $C'$ centered at $O$ with a radius 1/3 $OA$. +Mark $A'$ and $B'$ its intersections with the line segments $OA$ and $OB$, +respectively. + +
      2. +Draw the circle $C''$ (shown in green) centered at $B'$ through the point $O$. + +
      3. +Let $E$ be the midpoint of the line segment $OB'$. +Draw a line through $E$ parallel to $OA$ and mark its intersections +$P$ and $R$ with the circles $C''$ and $C'$, as shown. + +
      4. +Let $M$ be the midpoint of the line segment $PR$. Draw the line $B'M$ +and extend to the intersection point $N$ with the circle $C'$. + +
      5. +Draw a line through $B'$ parallel to $OA$, and select the point $F$ on +it so that $NB' = NF$. + +
      6. +Extend the line segment $NF$ to intersect the circle $C$ at $G$. + +
      7. +Draw the line $GO$ and extend it to the point of intersection $H$ +with the circle $C'$. +Note: If you look at the diagram closely, you will be able to +see that the line segments $GO$ and $GN$ +are not collinear. + +
      8. +Let $D$ be diagonally opposite the point $B'$ in the +circle $C'$. Draw a line through $D$ parallel to $OA$, and +select the point $J$ on it so that $HD=HJ$. +Note: Although it is impossible to discern visually, +the line segments $OH$ and $HJ$ +are not collinear. + +
      9. +Extend the line segment $HJ$ to intersect the circle $C$ at $K$. + +
      10. +Reflect $K$ about the line $OA$ to get the point $T$. + +
      + +The line $OT$ is an approximate trisector of the angle $AOB$. + +

      Error analysis

      + +

      +The calculation of the coordinates of all the points that appear +in the construction is elementary but +the resulting expressions are massively large, therefore I will refrain +from putting them on this web page. (I did the calculations in Maple). +

      +Let $\alpha$ and $\beta(\alpha)$ be the sizes of the angles $AOB$ and $AOT$, +respectively. +Express the trisection error as $e(\alpha) = \frac{\alpha}{3} - \beta(\alpha)$. +It turns out that $e(0) = e(\pi/2) = 0$. +In the range $0$ to $\pi/2$ the error is the largest near +1.22175 radians = 70.0013 degrees. The maximum error is +$2.32\times10^{-18}$ radians = $1.33\times10^{-16}$ degrees. + +

      +Expanding $\beta(\alpha)$ in power series we get: +\[ + \beta(\alpha) + = \frac{1}{3} \alpha + + \frac{5^9}{2^{13} \cdot 3^{40}} \alpha^{27} + O(\alpha^{29}) + = \frac{1}{3} \alpha + + \frac{1953125}{99595595440594360737792} \alpha^{27} + O(\alpha^{29}). +\] + + +

      Alberts' refinement

      + +

      +The extraordinary precision of Chris Alberts' trisection +is a result of the application of a refinement technique which +I will call Alberts' refinement. +The 10 steps of his trisection procedure, described above, +consist of three distinct stages: +

        +
      1. Stage 1, corresponding to the steps 1–5 of the construction, +produces the angle $FB'N$ which is roughly one third of the angle $AOB$. +The trisection error at this stage may be as large as 0.7 degrees. + +
      2. Stage 2, corresponding to the steps 6–7 of the construction, +produces the angle $A'OH$ which is quite close to $\frac13 \alpha$. The worst +error is 0.00013791 degrees and +occurs when $AOB$ is near 70 degrees. + +
      3. Stage 3, corresponding to the steps 8–10 of the construction, +produces the angle $AOT$ which, as noted above, is within +$1.33\times10^{-16}$ degrees of the exact trisection. +
      + +Each of the stages 2 and 3 consists of one application +of Alberts' refinement which may be formulated as +a stand-alone geometric proposition illustrated +in the diagram below. + +

      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $X$. +Press “r” to reset the diagram to its initial state.
      +If the blue angle is an approximate trisection of the angle $AOB$, +then the red angle is a much better trisection.
      +Note that the red angle hardly changes as the point $X$ varies. +
      +
      + +

      +The lines $L_1$ and $L_2$ intersect at the point $O$. Suppose that the +line $OX$ is a crude trisector of the angle between $L_1$ and $L_2$. +The rest of the diagram shows a +straightedge and compass construction +that produces a much finer trisection. + +Here are the details of the construction: + +

        +
      1. Pick an arbitrary point $A$ (other than $O$) on the line $L_1$. +
      2. Locate the point $P$ on the line $OX$ so that $AO = AP$. +
      3. Locate the point $B$ on the line $L_2$ so that $PO = PB$. +
      4. Draw a circle centered at $A$ and radius equal to three +times the length of $OA$. (This circle is shown in magenta.) +
      5. Extend the line segment $PB$ to a intersect that circle at a point $G$. +(This extension is shown in cyan.) +
      6. Draw a line $AL$ through $A$ and parallel to the line $L_2$. +
      + +The angle $LAG$ is quite close to being one third of the angle $AOB$. +To see this, let us write $\alpha$, $\beta$, and $\beta'$ for +the measures (in the radian units) +of the angles $AOB$, $XOB$, and $LAG$, respectively. +Let $\beta = \frac13 \alpha + \delta$ and $\beta' = \frac13 \alpha + \delta'$. +Thus, $\delta$ and $\delta'$ measure the trisection errors corresponding to the +angles $\beta$ and $\beta'$. + +

      +A quite straightforward calculation, involving an application of the +law of sines in the triangle $APG$ leads to the equation: +\[ + \delta' = \delta - \arcsin\Big(\frac13 \sin3\delta\Big). +\] +Expanding this into power series in $\delta$, we obtain: +\[ + \delta' = \frac43 \delta^3 - \frac45 \delta^7 + O(\delta^9). +\] +This explains the notable efficiency of the refinement. For instance, +if the value of $\beta$ has two significant digits after the decimal point, +the value of $\beta'$ will have six significant digits after the decimal +point. + +

      +Remark 1: Move the point $X$ in the diagram and note +how insensitive the angle +$LAG$ is to the choice of $X$. This indicates that even a crude +initial approximation produces an excellent trisection. + +

      +Remark 2: If you examine closely Chris Alberts' trisection +described earlier in +this page, you will find buried in it two instances of Alberts' +refinement. + + +

      A final comment

      + +

      +Comparing the precision of the trisection described in this +page to those of others presented on my website may not +seem to be quite fair. After all, any approximate trisection may +be applied iteratively to refine its own result. +Nevertheless, I am making an exception in this case because in +Chris Alberts' trisection, the iterative refinement is an +inherent feature of the method. + + + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet on +March 23, 2011. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-baker.html b/public/rostamian/trisect-baker.html new file mode 100644 index 0000000..bc7e500 --- /dev/null +++ b/public/rostamian/trisect-baker.html @@ -0,0 +1,268 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      Construction by + Wayne Baker

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line is an approximate trisector of the angle $AOB$. +
      +
      + +

      The Basic Construction

      + +

      +Here is a very simple straightedge and compass +construction of an approximate angle trisector due to +Wayne Baker. + +

      +Let us represent the angle by +the circular arc $AB$ centered at $O$; see the diagram above. +The angle's size may be anything from 0 to 180 degrees. +To trisect, do: + +

        + +
      1. +Quadrisect the angle $AOB$, that is, divide it into four +equal parts. The arc $AP$ in the diagram above represents one quarter +of the original arc $AB$. Let $L$ be the length of the chord $AP$ (shown in green). + +
      2. +Draw a circular arc (shown in orange) +centered at $O$ and radius 3/4 of $OA$. Mark $A'$ and $B'$ its intersections +with the rays $OA$ and $OB$, respectively. + +
      3. +Swing an arc (not shown) of radius $L$ centered at $A'$ and mark $P'$ its intersection with +the arc $A'B'$, as shown. + +
      + +

      +The line $OP'$ is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta=\tau(\alpha)$ be the sizes of the angles $AOB$ and $A'OP'$, +respectively. It is straightforward to show that +\[ + \beta + = 2 \arcsin\big(\frac{4}{3}\sin\frac{\alpha}{8}\big) + = \frac{\alpha}{3} + \frac{7}{2^7\cdot3^4}\alpha^3 + O(\alpha^5) + = \frac{\alpha}{3} + \frac{7}{10368}\alpha^3 + O(\alpha^5). +\] + + +

      +The error +$ + \ds e(\alpha) = \tau(\alpha) - \frac{\alpha}{3} +$ +is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2)$ = 0.002695 radians = 0.154 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.0237 radians = 1.360 degrees. + + +

      Iterative Improvement

      + +

      +As we see in the asymptotic expansion shown above, the +angle $\tau(\alpha)$ is slightly larger than the target value of $\alpha/3$. +Making three copies of the constructed angle, and putting them +end-to-end as in arcs $A'P'$, $P'P''$, and $P''P'''$ shown in the diagram below, +we arrive at the endpoint $P'''$ which is very slightly off the point $B'$, +and just outside the arc $A'B'$. The constructible angle $B'OP'''$ is exactly +three times the error $e(\alpha)$. +If we were able to trisect $B'OP'''$ exactly, then we +would know the error, and consequently will have achieved +the exact trisection of the original angle. +Of course the exact trisection of $B'OP'''$ is impossible in general, but we +may repeat the method outlined in the Basic Construction above +to obtain an approximate trisection of $B'OP'''$, +which will yield $ \tau\big(3\tau(\alpha) - \alpha\big) $, +and consequently an improved trisection $\tau_{\mathrm{improved}}(\alpha)$ +of the original angle: +\[ + \tau_{\mathrm{improved}}(\alpha) = \tau(\alpha) - \tau\big(3\tau(\alpha) - \alpha\big) + = \frac{\alpha}{3} - \frac{7^4}{2^{28}\cdot3^{13}} \alpha^9 + + O(\alpha^{11}). +\] + +The error +$ \ds e_{\mathrm{improved}}(\alpha) = \frac{\alpha}{3} - \tau_{\mathrm{improved}}(\alpha)$ +is monotonically increasing in $\alpha$. In particular, +$e_{\mathrm{improved}}(\pi/2) = 1.5\times 10^{-9}$ radians +$ = 8.6\times10^{-8}$ degrees. + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line is an approximate trisector of the angle $AOB$.
      +The arcs $P'P''$ and $P''P'''$ are copies of $A'P'$. The endpoint $P'''$ +is just slightly off the point $B'$.
      +The (very small and nearly indiscernible) +angle $B'OP'''$ is three times the trisection error. +
      +
      + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet on +May 31, 2010. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-cdsmith.html b/public/rostamian/trisect-cdsmith.html new file mode 100644 index 0000000..1860b94 --- /dev/null +++ b/public/rostamian/trisect-cdsmith.html @@ -0,0 +1,154 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      +Construction by cdsmith +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red lines $OC$ and $OD$ are approximate trisectors of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +To trisect the angle $AOB$ (with $OA=OB$), do: + +

        + +
      1. +Find the midpoint $M$ of the line segment $AB$. + +
      2. +Draw circles centered at $A$, $M$, and $B$, each of radius $\frac{1}{2}AB$, +and mark their intersection points $C$ and $D$, as shown in the diagram +above. + +
      + +The lines $OC$ and $OD$ are approximate trisectors of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $AOC$, +respectively. One may verify that +\[ + \beta = + \arctan\bigg( + \frac{ + \sin\frac{\alpha}{2} + \sin\big(\frac{\pi}{6}+\frac{\alpha}{2}\big) + }{ + 1 + + \sin\frac{\alpha}{2} + \cos\big(\frac{\pi}{6}+\frac{\alpha}{2}\big) + } + \bigg) + = + \frac{1}{4}\alpha + \frac{\sqrt{3}}{16} \alpha^2 - \frac{1}{16} \alpha^3 + + O(\alpha^4). +\] + +

      +This says that $\ds \beta \approx \frac{1}{4}\alpha$ when $\alpha$ is small, +so small angles are quadrisected, rather than trisected! +(This is clearly visible in the interactive diagram above.) +For not-so-small angles, +the method works reasonably well. In fact, it produces +exact trisection for angles $\alpha=\pi/2$ and $\alpha=\pi$. + +

      +The worst error in +the range $0 \le \alpha \le \pi$ is +0.0214 radians = 1.23 degrees. +This occurs at +$\alpha=2\arctan(\sqrt{3}\pm\sqrt{2})$ which corresponds to +angles of approximately 35 degrees and 145 degrees. + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on June 14, 2010. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-dudley.html b/public/rostamian/trisect-dudley.html new file mode 100644 index 0000000..575478b --- /dev/null +++ b/public/rostamian/trisect-dudley.html @@ -0,0 +1,169 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      From page 26 of
      +Underwood Dudley, The Trisectors, 2nd edition, 1996. +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$ +(but keep it less than 90 degrees).
      +Press “r” to reset the diagram to its initial state.
      +The red line, $OT$, is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +We wish to trisect the given angle $AOB$. Assume the angle is less than +90 degrees; see the diagram above. + +

        + +
      1. +Draw a line through $B$ parallel to $OA$. + +
      2. +Extend $OA$ and mark off $AC$ and $CD$ along it, each equal to $OA$. + +
      3. +Draw the arc $DE$ with center $C$ and radius $CD$. + +
      4. +Drop a perpendicular from $E$ to $OD$ and let $F$ be the foot of the perpendicular. + +
      5. +Draw the arc $FT$ with center $O$ and radius $OF$ (shown in green). + +
      + +The line $OT$ is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $FOT$, +respectively. It is straightforward to show that +\[ + \beta + = \frac{\sin \alpha}{2+\cos \alpha} + = \frac{\alpha}{3} - \frac{1}{2^2 \cdot 3^3 \cdot 5} \alpha^5 + + O(\alpha^7) + = \frac{\alpha}{3} - \frac{1}{540} \alpha^5 + O(\alpha^7). +\] +The error +$ + \ds e(\alpha) = \frac{\alpha}{3} - \beta +$ +is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2) =$ 0.0236 radians = 1.352 degrees. + +

      +It is interesting that the error is $O(\alpha^5)$ rather than $O(\alpha^3)$ +as one might have expected. Despite this, the method's accuracy +is not particularly remarkable for angles that are not very close to zero. + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on July 26, 2002.
      +Cosmetic revisions on June 6, 2010. +
      +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-dudley2.html b/public/rostamian/trisect-dudley2.html new file mode 100644 index 0000000..8d563e3 --- /dev/null +++ b/public/rostamian/trisect-dudley2.html @@ -0,0 +1,155 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      Construction attributed to A. G. O
      +From page 133 of
      +Underwood Dudley, The Trisectors, 2nd edition, 1996. +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line, $OT$, is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +We wish to trisect the given angle $AOB$ represented by the circular arc +$AB$ centered at $O$, as shown in the diagram above. + +

        + +
      1. +Draw the bisector $OC$ of the angle $AOB$. + +
      2. +Draw the circular arc $DE$ centered at $O$ so that $OD = \frac{1}{3} OA$. +Let $G$ be where the line $OC$ intersects the arc $DE$. + +
      3. +Locate $F$ on the extension of $OA$ so that $OF=OD$. + +
      4. +Connect $FG$ and extend to the intersection point $T$ with +the arc $AB$. + +
      + +The line $OT$ (shown in red) is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $AOT$, +respectively. It is straightforward to show that +\[ + \beta + = \frac{\alpha}{4} + \arcsin\Big( + \frac{1}{3}\sin\frac{1}{4}\alpha \Big) + = \frac{1}{3}\alpha - \frac{1}{2^4\cdot3^4} \alpha^3 + O(\alpha^7) + = \frac{1}{3}\alpha - \frac{1}{1296} \alpha^3 + O(\alpha^7). +\] +The term after $\alpha^3$ is $\alpha^7$. That's not a typo. + +

      +The error +$ + \ds e(\alpha) = \frac{\alpha}{3} - \beta +$ +is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2) =$ 0.003 radians = 0.171 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.024 radians = 1.367 degrees. + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on July 26, 2002.
      +Cosmetic revisions on June 13, 2010. +
      +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-durham.html b/public/rostamian/trisect-durham.html new file mode 100644 index 0000000..27c1908 --- /dev/null +++ b/public/rostamian/trisect-durham.html @@ -0,0 +1,267 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      +R. L. Durham, A simple construction for the approximate trisection +of an angle, +American Mathematical Monthly, +vol. 51, no. 4, April 1944, pp. 217–218. +

      + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +; +; + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line, $OT$, is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +We wish to trisect the given angle $AOB$ represented by the circular arc +$AB$ centered at $O$, as shown in the diagram above. + +

        + +
      1. +Draw the bisector $OC$ of the angle $AOB$. + +
      2. +Draw the chord $AC$ and trisect it at point $F$ so that $CF=\frac{1}{3}CA$. + +
      3. +Locate point $G$ on the extension of the chord $AC$ so that $GC=CF$. + +
      4. +Draw a circle (shown in green) centered at $G$ and through point $F$. + +
      5. +Let $T$ on the green circle be such that $TC$ is perpendicular to $OC$. + +
      + +The line $OT$ (shown in red) is an approximate trisector of the angle $AOB$. + +

      +R. L. Durham +(see the reference at the top of this page) goes one step further. +Using the line $OT$ as a starting point, he produces a substantially +better approximation $OT'$. The construction for this second stage is +complex and not particularly pretty, so I won't go into that here. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta $ be the sizes of the angles $AOB$ and $AOT$, +respectively. It is possible to show that +\[ + \beta + = \frac{1}{2}{\alpha} + - + \arctan\bigg( + \frac{4}{3}\sin\Big( + \frac{\alpha}{4} - + \arcsin\big(\frac{1}{2}\sin\frac{\alpha}{4}\big) + \Big)\bigg) + = \frac{1}{3}\alpha + \frac{7}{2^7\cdot3^4} \alpha^3 + O(\alpha^5) + = \frac{1}{3}\alpha + \frac{7}{10368} \alpha^3 + O(\alpha^5). +\] + + + +

      +The error $\ds e(\alpha) = \beta - \frac{\alpha}{3}$ +is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2) =$ 0.00265 radians = 0.152 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.0218 radians = 1.252 degrees. + +

      Calculation details

      + +

      +The derivation of the formula for $\beta$ shown above is a straightforward +application of trigonometry. Here are the details. + +

      +The angles $AOC$ and $ACT$ subtend the arc $AB$ of the circle centered +at $O$. Since $AOC = \alpha/2$, then $ACT=\alpha/4$. Consequently, +the angle $GCT$ is $\pi - \alpha/4$. + +

      +We apply the law of sines in the triangle $GCT$. (The edge $GT$ +is not shown in the diagram to reduce clutter.) Let us write +$\theta$ for the angle $CGT$. The the angle $CTG$ is +$\alpha/4 - \theta$. The law of sines is: +\[ + \frac{\sin\theta}{CT} = \frac{\sin(\alpha/4-\theta)}{CG} = \frac{\sin(\pi-\alpha/4)}{GT}. +\] +But $GT=2CG$, therefore $2\sin(\alpha/4-\theta) = \sin(\pi-\alpha/4) = \sin(\alpha/4)$, whence +\[ + \theta = \frac{\alpha}{4} - \arcsin\big(\frac{1}{2}\sin\frac{\alpha}{4}\big). +\] +Going back to the equation of law of since, we compute $CT$: +\[ + CT = \frac{\sin\theta}{\sin(\alpha/4)} GT. +\] +But $GT = GF = 2CF = \frac{2}{3} AC += \frac{2}{3} \big(2OA\sin\frac{\alpha}{4}\big) = \frac{4}{3} OA\sin\frac{\alpha}{4}$. +We conclude that $CT = \frac{4}{3} OA\sin\theta$. +Then $COT = \arctan \frac{CT}{OC} = \arctan \frac{4}{3} \sin\theta$. Finally, the angle +$\beta$, which equals $COA - COT$, is given by: +\[ + \beta = \frac{\alpha}{2} - \arctan \frac{4}{3} \sin\theta. +\] +Substituting the expression for $\theta$ calculated above, we arrive at the desired +expression for $\beta$. + +

      Aside

      + +

      +In 1990, the well-known logician +Willard Van Orman Quine +wrote an expository article in +the Mathematics Magazine where he proves that +some angles cannot be trisected by ruler and compass. The proof +is elementary (but not short) and requires +nothing but simple algebra. Here is the full reference: + +

      +W. V. Quine, Elementary proof that some angles cannot be trisected by ruler +and compass, +Mathematics Magazine, +vol. 63, no. 2, April 1990, pp. 95–105. +

      + +

      +In a prefatory note he refers to Durham, the author of the trisection +described in this web page. He writes: + +

      +

      +This purely expository paper dates from April 1946. +Robert Lee Durham, +president emeritus of Southern Seminary Junior and College, +had sent me a hundred dollars and asked me to make it clear to him +why an angle cannot in general be trisected by ruler +and compass. He had himself presented a way of almost trisecting +any angle by ruler and compass, to an accuracy for acute angles of +1/720 of a degree. [Here he refers to Durham's +1944 article cited at the top of this web page.] + +

      +I welcomed the money and the occasion to familiarize myself +with the famous proof. I was guided in large part by +L. E. Dickson, +Why it is impossible trisect to an +angle or construct a regular polygon of 7 or 9 sides by ruler and compass, +Mathematics Teacher, vol. 14 (1921), 217–223. + +

      +Mr. Durham +expressed satisfaction with my report and proposed +paying for publishing it as a pamphlet. With his approval I +submitted instead to a mathematics journal. After waiting +nineteen months for a decision from the journal, I recalled +the paper and dropped the matter. +

      + +

      +Quine +goes on to explain how this article was eventually published +more than 50 years after it was written. + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on June 13, 2010. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-jamison-ext.html b/public/rostamian/trisect-jamison-ext.html new file mode 100644 index 0000000..f3030b4 --- /dev/null +++ b/public/rostamian/trisect-jamison-ext.html @@ -0,0 +1,185 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      +Free Jamison, Trisection Approximation, American Mathematical Monthly, +vol. 61, no. 5, May 1954, pp. 334–336. +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + +Drag the point $B$ to change the angle $AOB$ +(but stay on the right half of the circle).
      +Press “r” to reset the diagram to its initial state.
      +The red line $OE$ is an approximate trisector of the angle $AOB$. +
      +
      + + +

      The construction

      + +

      +This construction, due to Free Jamison +(see the reference at the top of this page) +is a more accurate variant of the construction described in +a simpler construction. + +

      +Consider the circular arc $AB$ centered at $O$, shown in the diagram above. +Assume the angle $AOB$ is between 0 and 180 degrees. +To trisect $AOB$, do: + +

        + +
      1. Pick the points $F$ and $D$ on the arc $BA$ such that +arc $BF$ = 2/8 of the arc $BA$ and +arc $BD$ = 3/8 of the arc $BA$. + +
      2. Extend $FO$ to intersect the circle at a point $C$. + +
      3. Draw the line $CD$ and extend it to a point $E$ such that $DE$ equals the +circle's diameter. + +
      + +

      +The line $OE$ is an approximate trisector of the angle $AOB$. + + +

      Error Analysis

      + +

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $EOB$, respectively. +The angle $FOD$ equals $\alpha/8$ by the construction, therefore the +angle $FCD$, which is half the central angle $FOD$, is equal to +$\alpha/16$. +The triangle $DOC$ is isosceles, therefore the angle $ODC$ also equals $\alpha/16$. + +

      +In the triangle $OED$, let $x$ and $y$ be the sizes of the angles +$OED$ and $EOD$, respectively. Since the sum $x+y$ of the triangle's internal +angles equals the triangle's +external angle $ODC$, we have $x+y = \alpha/16$. Let us note, however, +that the angle $y$ equals $DOB$ minus $EOB$. Thus $y = 3\alpha/8 - \beta$, +whence $x = \beta - 5\alpha/16$. + +

      +In the triangle $OED$, the side $DE$ is twice the side $OD$ by the construction, +therefore the law of sines gives $\sin y = 2 \sin x$. Consequently, +$\sin(3\alpha/8 - \beta) = 2 \sin(\beta - 5\alpha/16)$. +Solving this for $\beta$ we arrive at: +\[ + \beta + = \frac{5}{16} \alpha + \arctan \frac{\sin(a/16)}{2+\cos(a/16)} + = \frac{1}{3} \alpha - \frac{1}{2^{12}\cdot3^4} \alpha^3 + O(\alpha^5) + = \frac{1}{3} \alpha - \frac{1}{331776} \alpha^3 + O(\alpha^5). +\] + +

      +We see that the trisection error $e(\alpha) = \alpha/3 - \beta$ is given by: +\[ + e(\alpha) = \frac{1}{48}\alpha - \arctan \frac{\sin(a/16)}{2+\cos(a/16)}. +\] +(This formula is also given in Jamison's article.) +The function $e(a)$ is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2)$ = 0.0000117 radians = 0.00067 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.000093756 radians = 0.00537 degrees. +Quite impressive! + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet on +July 22, 2002. +
      Cosmetic revisions on June 7, 2010. +
      +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-jamison.html b/public/rostamian/trisect-jamison.html new file mode 100644 index 0000000..d63b275 --- /dev/null +++ b/public/rostamian/trisect-jamison.html @@ -0,0 +1,219 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      +Construction attributed to C. R. Lindberg, as reported in
      +Free Jamison, Trisection Approximation, American Mathematical Monthly, +vol. 61, no. 5, May 1954, pp. 334–336. +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$ +(but stay on the right half of the circle).
      +Press “r” to reset the diagram to its initial state.
      +The red line $OE$ is an approximate trisector of the angle $AOB$. +
      +
      + +

      The construction

      + +

      +According to Jamison (see the reference at the top of this page) +the construction's main idea +comes from an unpublished work by C. R. Lindberg. + +

      +Consider the circular arc $AB$ centered at $O$, shown in the diagram above. +Assume the angle $AOB$ is between 0 and 180 degrees. +To trisect $AOB$, do: + +

        + +
      1. +Extend $BO$ to intersect the circle at a point $C$. + +
      2. +Draw the bisector $OD$ of the angle $AOB$. + +
      3. +Draw the line $CD$ and extend it to a point $E$ such that $DE$ equals the +circle's diameter. + +
      + +

      +The line $OE$ is an approximate trisector of the angle $AOB$. + +

      +Here is a heuristic explanation for why the construction works, +as explained by Jamison. The key lies +in the observation that (i) in the triangle $ODE$ the angles $O$ and $E$ are +“small”, and (ii) the side $ED$ is twice as long as the side $OD$. +Therefore from the law of sines we have $\sin(O)/\sin(E) = ED/OD = 2$, +which implies that the angle $O$ is approximately twice the angle $E$ in +the triangle $ODE$. + +

      +Let the measure of the angle $OED$ be $x$. +Then the triangle's external angle at $D$, that is the angle $ODC$, is the sum of +the internal angles $O$ and $E$, therefore it is approximately $3x$. +Therefore the angle $OCD$ is $3x$. Therefore the angle $BOD$ is $6x$. +Since the angle $E'OD$ is $2x$, we conclude that the angle $BOE'$ is $4x$. +Furthermore, since the angle $BOD$ is $6x$, the angle $BOA$ is $12x$. This shows +that $BOA$ is 3 times $BOE'$, as asserted. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $EOB$, respectively. +The angle $DOB$ is half of $AOB$ by the construction, therefore it is equal to +$\alpha/2$. Consequently the angle $DCB$, which is half the +central angle $DOB$, equals $\alpha/4$. +The triangle $DOC$ is isosceles, therefore the angle $ODC$ also equals $\alpha/4$. + +

      +In the triangle $OED$, let $x$ and $y$ be the sizes of the angles +$OED$ and $EOD$, respectively. Since the sum $x+y$ of the triangle's internal +angles equals the triangle's +external angle $ODC$, we have $x+y = \alpha/4$. Let us note, however, +that the angle $y$ equals $DOB$ minus $EOB$. Thus $y = \alpha/2 - \beta$, +whence $x = \beta - \alpha/4$. + +

      +In the triangle $OED$, the side $DE$ is twice the side $OD$ by the construction, +therefore the law of sines gives $\sin y = 2 \sin x$. Consequently, +$\sin(\alpha/2 - \beta) = 2 \sin(\beta - \alpha/4)$. Solving this for $\beta$ +we arrive at: +\[ + \beta + = \frac{1}{4} \alpha + \arctan \frac{\sin(a/4)}{2+\cos(a/4)} + = \frac{1}{3} \alpha - \frac{1}{2^6\cdot3^4} \alpha^3 + O(\alpha^5) + = \frac{1}{3} \alpha - \frac{1}{5184} \alpha^3 + O(\alpha^5). +\] + +

      +We see that the trisection error $e(\alpha) = \alpha/3 - \beta$ is given by: +\[ + e(\alpha) = \frac{1}{12}\alpha - \arctan \frac{\sin(a/4)}{2+\cos(a/4)}. +\] +(This formula is also given in Jamison's article.) +The function $e(a)$ is monotonically increasing. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2)$ = 0.000757 radians = 0.0434 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.0063 radians = 0.361 degrees. +That's quite good for such a simple construction. + +

      An interesting coincidence

      + +

      +The angle $\beta$ constructed by this method coincides exactly +with that of Pllana's construction, +where $\beta$ is given as: +\[ + \beta + = \arctan \frac + {\sin\frac{\alpha}{2} + 2\sin\frac{\alpha}{4}} + {\cos\frac{\alpha}{2} + 2\cos\frac{\alpha}{4}}. +\] +One way to verify that the seemingly different expressions +for $\beta$ are in fact identical, +is to compare their derivatives. In both cases we have: +\[ + \frac{d\beta}{d\alpha} = + \frac{3(1 + \cos\frac{\alpha}{4})}{2(5 + 4\cos\frac{\alpha}{4})}. +\] + +

      An extension

      + +

      +Although this construction is quite good as is, Jamison proceeds to give +an extension of Lindberg's method +which requires a bit more work but is substantially more accurate. + + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet on +July 22, 2002.
      +Cosmetic revisions on June 7, 2010. +
      +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-pllana.html b/public/rostamian/trisect-pllana.html new file mode 100644 index 0000000..496b03a --- /dev/null +++ b/public/rostamian/trisect-pllana.html @@ -0,0 +1,173 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      Construction due to +Avni Pllana

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +This approximate trisection, due to Avni Pllana, was announced +in a +message +in the geometry.puzzles newsgroup on July 23, 2003. +Scroll to the bottom of that page to view the related discussion thread. + +

      +Consider the angle $AOB$ given by the circular arc $AB$ centered at $O$, +as shown in the diagram above. + +

        + +
      1. +Pick points $C$ and $D$ on the arc $AB$ so that $OC$ bisects the angle $AOB$ +and $OD$ bisects the angle $AOC$. + +
      2. +Let $M$ be the midpoint of the line segment $OC$. + +
      3. +Let $N$ be the midpoint of the line segment $MD$. + +
      + +The line $ON$ is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $AON$, +respectively. One may verify that: +\[ + \beta + = \arctan \frac + {\sin\frac{\alpha}{2} + 2\sin\frac{\alpha}{4}} + {\cos\frac{\alpha}{2} + 2\cos\frac{\alpha}{4}} + = \frac{1}{3}\alpha - \frac{1}{2^6\cdot3^4} \alpha^3 + O(\alpha^5) + = \frac{1}{3}\alpha - \frac{1}{5184} \alpha^3 + O(\alpha^5). +\] + +Hint: Represent the points as complex numbers +in the polar form $re^{i\theta}$. + +

      +The error +$ + \ds e(\alpha) = \frac{\alpha}{3} - \beta +$ +increases monotonically with $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2)$ = 0.000757 radians = 0.0434 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.00630 radians = 0.361 degrees. +That's quite good for such a simple construction. + + +

      An interesting coincidence

      + +

      +The angle $\beta$ constructed by this method coincides exactly +with that of Lindberg's construction, +where $\beta$ is given as: +\[ + \beta + = \frac{1}{4} \alpha + \arctan + \frac{\sin\frac{\alpha}{4}}{2+\cos\frac{\alpha}{4}}. +\] +One way to verify that the seemingly different expressions +for $\beta$ are in fact identical, +is to compare their derivatives. In both cases we have: +\[ + \frac{d\beta}{d\alpha} = + \frac{3(1 + \cos\frac{\alpha}{4})}{2(5 + 4\cos\frac{\alpha}{4})}. +\] + + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on June 10, 2010. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-raiford.html b/public/rostamian/trisect-raiford.html new file mode 100644 index 0000000..1a4536c --- /dev/null +++ b/public/rostamian/trisect-raiford.html @@ -0,0 +1,152 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      +William R. Raiford, An approximate trisection, +American Mathematical Monthly, +vol. 68, no. 9, Nov 1961, p. 917. +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$.
      +Press “r” to reset the diagram to its initial state.
      +The red line $OT$ is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +The construction described in the article cited at the top of the page, +is quite straightforward. Consider the angle $AOB$ represented by the +circular arc $AB$ centered at $O$, as shown in the diagram above. +To trisect $AOB$ do: + +

        + +
      1. +Erect a perpendicular to $OA$ at $A$ (shown in green). + +
      2. +Construct the bisector $OC$ of the angle $AOB$. + +
      3. +Connect $B$ to $C$ and extend to intersect the green line at a point $T$. + +
      + +The line $OT$ is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $AOT$, +respectively. One may verify that +\[ + \beta + = \arctan \Big( \sin\alpha - (1 - \cos\alpha) + \cot \big( \frac{3}{4}\alpha \big) \Big) + = \frac{1}{3}\alpha + \frac{1}{2^3\cdot3^4} \alpha^3 + O(\alpha^5) + = \frac{1}{3}\alpha + \frac{1}{648} \alpha^3 + O(\alpha^5). +\] + +

      +The error +$ + \ds e(\alpha) = \beta - \frac{\alpha}{3} +$ +is monotonically increasing in $\alpha$. +The worst error on the interval $0 \le \alpha \le \pi/2$ is +$e(\pi/2)$ = 0.0063 radians = 0.361 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.06 radians = 3.435 degrees. + +

      +Raiford, whose affiliation is given as IBM, +states that he has calculated +the error in increments of one degree in an IBM 709. Computers +were novelties when that article was published. + + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet +on June 14, 2010. + +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/public/rostamian/trisect-stark.html b/public/rostamian/trisect-stark.html new file mode 100644 index 0000000..1dce5a9 --- /dev/null +++ b/public/rostamian/trisect-stark.html @@ -0,0 +1,399 @@ + + + + + + + +An angle trisection + + + + + + + +

      An angle trisection

      + +

      Construction by + Mark Stark +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +Drag the point $B$ to change the angle $AOB$ +(but stay on the upper half of the semicircle).
      +Drag the point “$E$” to change the radius of the circle +centered at $A'$. Note how little $G$ is affected by the choice of $E$.
      +Press “r” to reset the diagram to its initial state.
      +The red line ($O$T) is an approximate trisector of the angle $AOB$. +
      +
      + +

      Construction

      + +

      +This construction, due to Mark Stark, was announced + +in an message in the geometry.puzzles newsgroup on +Jun 20, 2002. +Scroll to the bottom of that page to view the related discussion thread. + +

      +The construction is unusual +because one of the steps involves an arbitrary choice. It is interesting +that the result is quite insensitive to that choice. + +

      +Here I have paraphrased Mark's construction but +differences from the original are cosmetic. The error analysis is mine. + +

      +Consider the circular arc $AB$ on the circle $C$ centered at $O$, +shown in the diagram above. +Assume the angle $AOB$ is between 0 and 180 degrees. +To trisect $AOB$, do: + +

        + +
      1. +Draw a circle $C'$ centered at $O$ with a radius 1/3 $OA$. +Mark $A'$ and $B'$ its intersections with the line segments $OA$ and $OB$, +respectively. + +
      2. +Draw the line $A'B'$ (shown in green). + +
      3. +Draw a circle $C''$ centered at $A'$ with an arbitrary(!) radius. +The accuracy of the trisection will be affected by the choice +of the radius, albeit only slightly. Best results are obtained +when the angle $EA'D$ (see the next step) is close to one third +of the angle $AOB$. + +
      4. +Let $D$ be the intersection of $C''$ with the line segment $A'B'$.
        +Let $E$ be the intersection of $C''$ with the $C'$, as shown. + +
      5. +Draw the line $ED$ and extend to the intersection point $G$ with the the +circle $C$. + +
      6. +Draw the diameter $GOT$. + +
      + +The line $OT$ is an approximate trisector of the angle $AOB$. + +

      Error Analysis

      + +

      +In the diagram below, I have duplicated the previous diagram +and added the lines $OE$ and $EA'$ which are not needed in +the construction, but are needed for the error analysis. + +

      +You may zoom and translate the diagram to examine its details. +To zoom in, grab the point $B'$ with the mouse +and move it away from $O$. To translate, +grab $O$ and move it around. As always, type “r” to +reset the diagram to its initial state. + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +To zoom in, grab the point $B'$ with the mouse +and move it away from $O$.
      +To translate, grab $O$ and move it around.
      +Type “r” to return to the initial state. +
      +
      + +

      +Let $\alpha$ and $\beta$ be the sizes of the angles $AOB$ and $AOT$, +respectively. We will show that $\beta \approx \frac{1}{3}\alpha$. + +

      +The construction leaves the size of the circle $C''$ (centered at $A'$) +unspecified. We parametrize the circle by the position of the point +$E$ along the arc $A'B'$, or more precisely, by the value $\gamma$ of the +angle angle $B'A'E$. +Thus $\gamma=0$ when $E$ coincides with $B'$ +and $\gamma=\alpha/2$ (easy to verify) when E coincides with $A'$. + +

      +Since the angles $B'A'E$ and $B'OE$ subtend the arc $B'E$ of the +circle $C'$, then the angle $B'OE$ is $2\gamma$. Therefore the angle +$EOA'$ is $\alpha - 2\gamma$. But $EOA'$ is the vertex angle of the +triangle $EOA'$, therefore the base angle $OEA'$ is $\frac{1}{2}(\pi - \alpha + +2\gamma)$. + +

      +In the isosceles triangle $DA'E$, the vertex angle is $\gamma$, therefore +the base angle $DEA'$ is $\frac{1}{2}(\pi - \gamma)$. + +

      +Putting the assertions of the two previous paragraphs together, we +calculate the angle $OED$: +\[ + OED = OEA' - DEA' = \frac{1}{2}(3\gamma - \alpha) +\] + +

      +In the triangle $GOE$, we have just computed the angle at $E$ (because +$OED$ is the same as $OEG$). Let us write $x$ for the angle at $G$. +Then $x$ may be computed by applying the law of sines and noting +that the ratio of the sides $OG$ to $OE$ is 3. We get: +$3\sin x = \sin\frac{1}{2}(3\gamma-\alpha)$. + +

      +The external angle $EOT$ of the triangle $GOE$ equals the sum of the +remaining internal angles, that is: +\[ + EOT = x + \frac{1}{2}(3\gamma-\alpha). +\] + +On the other hand, +\[ + EOT + = EOB' - TOB' + = EOB' - (A'OB' - A'OT) + = 2\gamma - (\alpha - \beta). +\] + +We see then $x + \frac{1}{2}(3\gamma-\alpha) = 2\gamma - (\alpha - \beta)$, +whence $x = \beta + \gamma/2 - \beta/2$. This leads to the equation: +\[ + 3\sin\big(\beta + \frac{1}{2}\gamma - \frac{1}{2}\beta\big) + = + \sin\frac{1}{2}(3\gamma-\alpha), +\] +which we may solve for $\beta$: +\[ + \beta = + \frac{1}{3}\alpha + \frac{1}{6}(\alpha-3\gamma) + - + \arcsin\bigg[ + \frac{1}{3}\sin\Big(\frac{\alpha-3\gamma}{2} \Big) + \bigg] +\] + +

      +As expected, the constructed angle, +$\beta$, depends on the original angle $\alpha$ we well as the choice +of $\gamma$. Let us express this dependence as $\beta = \tau(\alpha,\gamma)$. +Expanding $\tau$ in power series we get: +\[ + \beta = \tau(\alpha,\gamma) + = \frac{1}{3}\alpha + + \frac{4}{3}\Big(\frac{\alpha-3\gamma}{6} \Big)^3 + - \frac{4}{5}\Big(\frac{\alpha-3\gamma}{6} \Big)^7 + + O\bigg( \Big(\frac{\alpha-3\gamma}{6}\Big)^9 \bigg). +\] + +The term with exponent 5 is absent in the series expansion; that's not a typo. + +

      On the choice of $\gamma$

      + +

      +We see that $\tau(\alpha,\alpha/3) = \alpha/3$, that is, +the construction produces an exact trisection +with the choice $\gamma=\alpha/3$. +Of course, constructing such a $\gamma$ +is equivalent to solving the original trisection problem, therefore +that is not an option. On the other hand, a constructible $\gamma$ that +comes close to $\alpha/3$ will serve just fine. The function $\tau$ is +not very sensitive to the variations of $\gamma$ as is evident from: +\[ + \frac{\partial \tau(\alpha,\gamma)}{\partial \gamma} + = + \frac{1}{2} \bigg( + \frac{3\cos 3x}{\sqrt{9 - \sin^2 3x}} -1 \bigg), +\] +where I have let $x=(\alpha-3\gamma)/6$ to simplify the notation. +As noted above, best +results are achieved when $\gamma$ is close to $\alpha/3$. Even +with a not-so-optimal choice of $\gamma=\alpha/4$ we get $x=\alpha/24$. +With such a choice, the value of partial derivative in the range +$0 \le \alpha \le \pi/2$ does not exceed 0.01, indicating that +the value of the function is essentially independent of $\gamma$ +on that range. + +

      +An excellent choice for $\gamma$ is obtained as follows. +In Step 3 of the construction, first select the point $D$ on +the line segment $A'B'$ such that $A'D = \frac{1}{3} A'B'$. +Then draw the circle $C''$ with center $A'$ passing through $D$. +One may verify that this results in an angle $\gamma$ given by: +\[ + \hat{\gamma} = \frac{1}{2} \alpha + - \arcsin\Big( \frac{1}{3} \sin\frac{\alpha}{2} \Big) + = \frac{1}{3} \alpha + \frac{1}{2\cdot3^4} \alpha^3 + O(\alpha^7). +\] + +Then, the constructed angle is: +\[ + \beta = \tau(\alpha,\hat{\gamma}) + = \tau\bigg(\alpha, \frac{1}{2} \alpha + - \arcsin\Big( \frac{1}{3} \sin\frac{\alpha}{2} \Big) + \bigg) + = \frac{1}{3} \alpha - \frac{1}{2^4\cdot3^{13}} \alpha^9 + + O(\alpha^{13}). +\] +The construction error, $e(\alpha) = \frac{1}{3}\alpha-\beta$, +is monotone increasing. Since $e(\alpha) = O(\alpha^9)$, +we expect it to be very small. +Indeed, the worst error on the interval $0 \le \alpha \le \pi/2$ is +the incredibly small +$e(\pi/2)$ = 0.00000226 radians = 0.00013 degrees. +The worst error on the interval $0 \le \alpha \le \pi$ is +$e(\pi)$ = 0.00103 radians = 0.0592 degrees. + +

      +Despite its extraordinary accuracy, this is not +among my favorite trisection methods because the points $D$ and $E$ are +too close to each other for locating the point $G$ reliably. For practical +purposes, should there be such a need, I would much rather use a more +robust, albeit less accurate, method. + +


      +

      +This applet was created by +Rouben Rostamian +using +David Joyce's +Geometry +Applet on +July 26, 2002. +
      The error analysis was thoroughly revised and extensive +cosmetic changes were made on June 7, 2010. +
      +

      + + + + + +
      Go to list of trisections + +Valid HTML + +Valid CSS +
      + + + diff --git a/src/adapptlet.civet b/src/adapptlet.civet index 78146eb..ca478f2 100644 --- a/src/adapptlet.civet +++ b/src/adapptlet.civet @@ -303,6 +303,7 @@ function jToG( cmdr function invisible(cname: string): boolean + if adapParams.config?.showall then return false cname is '0' or cname is 'none' function joyce2rgb(cname: string, backgroundRGB?: RGB): RGB @@ -378,16 +379,6 @@ classHandler: Record := aux := name + 'aUx' parts[0].push name switch method - /free|fixed/ - commands.push `${name} = (${args.scalar?.join ','})` - if method is 'fixed' - callbacks.push (api: AppletObject) => api.setFixed name, true - 'perpendicular' - // Note only the two-point option implemented so far - unless args.subpoints return - [center, direction] := args.subpoints - // Note clockwise 90° rotation (3π/2) confirmed in Joyce source - commands.push `${name} = Rotate(${direction}, 3*pi/2, ${center})` 'angleDivider' // Note doesn't yet handle plane argument unless args.subpoints return @@ -406,6 +397,27 @@ classHandler: Record := `${aux}4 = Rotate(${start}, ${aux}3/${n}, ${center})` `${name} = Intersect(${destination}, Ray(${center}, ${aux}4))` auxiliaries.push ...[2..4].map (i) => `${aux}${i}` + 'extend' + unless args.subpoints then return + sp := args.subpoints + direction .= `UnitVector(Vector(${sp[0]},${sp[1]}))` + if args.line and ( + not args.point or args.point[0] !== args.subpoints[0]) + direction = `UnitVector(${args.line[0]})` + displacement := `Distance(${sp[2]}, ${sp[3]})*${direction}` + commands.push `${name} = Translate(${sp[1]}, ${displacement})` + 'first' + unless args.subpoints then return + commands.push `${name} = ${args.subpoints[0]}` + /fixed|free/ + commands.push `${name} = (${args.scalar?.join ','})` + if method is 'fixed' + callbacks.push (api: AppletObject) => api.setFixed name, true + 'foot' + pt := args.subpoints + unless pt then return + commands.push + `${name} = ClosestPoint(Line(${pt[1]},${pt[2]}), ${pt[0]})` 'intersection' // Checking Joyce source, means intersection of lines, not // intersection of line segments @@ -413,6 +425,9 @@ classHandler: Record := l1 := `Line(${args.subpoints[0]},${args.subpoints[1]})` l2 := `Line(${args.subpoints[2]},${args.subpoints[3]})` commands.push `${name} = Intersect(${l1},${l2})` + 'last' + unless args.subpoints then return + commands.push `${name} = ${args.subpoints.at(-1)}` 'lineSegmentSlider' segment .= args.line?[0] unless segment @@ -424,35 +439,28 @@ classHandler: Record := if args.scalar and args.scalar.length callbacks.push (api: AppletObject) => api.setCoords name, ...args.scalar as XYZ - 'first' - unless args.subpoints then return - commands.push `${name} = ${args.subpoints[0]}` - 'last' - unless args.subpoints then return - commands.push `${name} = ${args.subpoints.at(-1)}` - 'extend' - unless args.subpoints then return - sp := args.subpoints - direction .= `UnitVector(Vector(${sp[0]},${sp[1]}))` - if args.line and ( - not args.point or args.point[0] !== args.subpoints[0]) - direction = `UnitVector(${args.line[0]})` - displacement := `Distance(${sp[2]}, ${sp[3]})*${direction}` - commands.push `${name} = Translate(${sp[1]}, ${displacement})` - 'vertex' - commands.push - `${name} = Vertex(${args.polygon?[0]},${args.scalar?[0]})` 'midpoint' if args.line commands.push `${name} = Midpoint(${args.line[0]})` else commands.push `${name} = Midpoint(${args.point?[0]},${args.point?[1]})` - 'foot' + 'perpendicular' + // Note only the two-point option implemented so far + unless args.subpoints return + [center, direction] := args.subpoints + // Note clockwise 90° rotation (3π/2) confirmed in Joyce source + commands.push `${name} = Rotate(${direction}, 3*pi/2, ${center})` + 'proportion' pt := args.subpoints unless pt then return + len := `Distance(${pt[2]},${pt[3]})*Distance(${pt[4]},${pt[5]})` + + `/ Distance(${pt[0]},${pt[1]})` + direction := `UnitVector(Vector(${pt[6]}, ${pt[7]}))` + commands.push `${name} = Translate(${pt[6]}, ${len}*${direction})` + 'vertex' commands.push - `${name} = ClosestPoint(Line(${pt[1]},${pt[2]}), ${pt[0]})` + `${name} = Vertex(${args.polygon?[0]},${args.scalar?[0]})` line: (name, method, args) => return := freshCommander() diff --git a/src/adapptypes.civet b/src/adapptypes.civet index bfabb13..af3e20c 100644 --- a/src/adapptypes.civet +++ b/src/adapptypes.civet @@ -1,4 +1,4 @@ -export const flags = ['commands', 'color'] as const +export const flags = ['color', 'commands', 'showall'] as const export type FlagType = (typeof flags)[number] export type ConfigType = Partial> diff --git a/src/options.civet b/src/options.civet index 3353449..dcf6809 100644 --- a/src/options.civet +++ b/src/options.civet @@ -1,11 +1,8 @@ import {flags} from ./adapptypes.ts -console.log('arrived') -boxes := ['commands', 'color'] -cache := await browser.storage.local.get boxes -console.log('Found', cache) +cache := await browser.storage.local.get flags -for each box of boxes +for each box of flags checkbox := document.getElementById(box) as HTMLInputElement unless checkbox then continue checkbox.checked = cache[box] ?? false