This post was updated on .
Hello Hilaire
I'd like to do the construction of an equilateral triangle with DrGeo scripting. The construction is from Euclid's elements book I. Title: The First Six Books of the Elements of Euclid http://www.gutenberg.org/files/21076/21076h/21076h.htm PROP. I.—Problem. On a given finite right line (AB) to construct an equilateral triangle. http://www.gutenberg.org/files/21076/21076h/images/f012.png The code so far:  c ptA ptB ptC ptD ptE ptG ptH segC rayAB rayBA lineAB lineAC lineCB circleA circleB helpLineColor  helpLineColor := Color white. c := DrGeoCanvas new. ptA := c point: 1@0. ptA name: 'A'. ptB := c point: 1@0. ptB name: 'B'. segC := c segment: ptA to: ptB. circleA := c circleCenter: ptA to: ptB. circleB := c circleCenter: ptB to: ptA. ptC := c intersectionOf: circleB and: circleA. ptC name: 'C'. lineAB := c line: ptA to: ptB. lineAB color: helpLineColor. rayBA := c ray: ptB to: ptA. rayBA color: helpLineColor. rayAB := c ray: ptA to: ptB. rayAB color: Color green. ptD := c intersectionOf: circleA and: lineAB. ptD name: 'D'. ptE := c intersectionOf: rayAB and: circleB. ptE name: 'E'. lineAC := c line: ptA to: ptC. lineAC color: helpLineColor. ptG := c intersectionOf: circleA and: lineAC. ptG name: 'G'. lineCB := c line: ptB to: ptC. lineCB color: helpLineColor. ptH := c intersectionOf: circleB and: lineCB. ptH name: 'H'. c segment: ptA to: ptC. c segment: ptB to: ptC. The result: The problems: a) I want the helper lines to be invisible: helpLineColor := Color transparent. does not work; so I use helpLineColor := Color white. But this gives the problem that some of the point marks (the small red squares) have a white line crossing them. b) How do I get point E : the intersection of the ray with origin A going to B with circle B? c) The zorder of the lines. The helper lines are 'over' the segment AB. How do I bring the segment AB to the top? Regards Hannes References: Title: The First Six Books of the Elements of Euclid http://www.gutenberg.org/files/21076/21076h/21076h.htm Annotated. http://farside.ph.utexas.edu/Books/Euclid/Elements.pdf p.8 (bilingual  greek and english, no annotations) https://mathcs.clarku.edu/~djoyce/elements/bookI/bookI.html The proposition: https://mathcs.clarku.edu/~djoyce/elements/bookI/propI1.html 
Administrator

Hi Hannes,
Regarding your questions, follow some indications: Question a) You want to hide an object, so you just send the #hide message to it. https://www.gnu.org/software/drgeo/doc/en/Smalltalksketch.html#indexSmalltalksketch_002cobjectattributes Question b) Use the #altIntersectOf:and: message to construct the second intersection point. https://www.gnu.org/software/drgeo/doc/en/Smalltalksketch.html#indexaltIntersectionOf_003aand_003aonDrGeoCanvas Question c) You can't. Just change the order of construction of your items. Hilaire 
Hello Hilaire
Thank you for answering the questions. This allowed me to come up with an updated script which I post below together with the sketch as a result. A fourth question: how can I control the font size of the names of the points?  c ptA ptB ptC circleA circleB ptD ptE ptG ptH segAB rayAB rayBA lineAB lineAC lineCB  c := DrGeoCanvas new. "Given is a segment AB" ptA := c point: 1@0. ptA name: 'A'. ptB := c point: 1@0. ptB name: 'B'. segAB := c segment: ptA to: ptB. "Use two circles to get point C" circleA := c circleCenter: ptA to: ptB. circleB := c circleCenter: ptB to: ptA. ptC := c intersectionOf: circleB and: circleA. ptC name: 'C'. "The equilateral triangle is given by the points A,B and C. thus construct the segments." c segment: ptA to: ptC. c segment: ptB to: ptC. " get additional points D, E, G and H with hidden helper lines" rayBA := c ray: ptB to: ptA. ptD := c altIntersectionOf: circleA and: rayBA. ptD name: 'D'. rayBA hide. rayAB := c ray: ptA to: ptB. ptE := c altIntersectionOf: circleB and: rayAB. ptE name: 'E'. rayAB hide. lineAC := c line: ptA to: ptC. ptG := c intersectionOf: circleA and: lineAC. ptG name: 'G'. lineAC hide. lineCB := c line: ptB to: ptC. ptH := c intersectionOf: circleB and: lineCB. ptH name: 'H'. lineCB hide. Could you please have a look at the code and comment it. Do you have an idea to make it simpler or more easily readable? Later I suggest that I add the example (together with others) to the documentation chapter 5. https://www.gnu.org/software/drgeo/doc/en/Smalltalksketch.html#Smalltalksketchesbyexample Hannes 
Point F needs to be added as well
"second intersection point of the circles" ptF := c altIntersectionOf: circleB and: circleA. ptF name: 'F'. 
This post was updated on .
https://www.tate.org.uk/art/artworks/turnerlecturediagrameuclidselementsofgeometrybook1propositions1and4d16995
Prepared in connection with his lectures as Professor of Perspective at the Royal Academy, Turner’s diagram of various geometrical figures is based on an illustration in Samuel Cunn’s Euclid’s Elements of Geometry (London 1759, book 1, plate 1, Propositions 1 and 4). The left figure illustrates Proposition 1, ‘Problem: To describe an equilateral triangle upon a given finite right line’, while the right describes Proposition 4: Creative Commons Licence CCBYNCND 3.0 (Unported), Photo © Tate Gallery 
Free forum by Nabble  Edit this page 