Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to see how we can exactly construct the following diagram as simple as possible. It means that the manual calculation should be avoided.

enter image description here

Note that the angle marks attached to angles represent the measure of the angles are exactly equal.

Can you do it with either PSTricks, TikZ, Asymptote, Metapost, etc? I am more interested in compass-straight-edge method that we probably learnt at school.

MWE

The following is my MWE (just to show my effort).

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}[showgrid=false](10,8)
    \pstGeonode[PosAngle=-90](0,0){A}(6,0){B}
    \pstInterCC[RadiusA=\pstDistVal{8},RadiusB=\pstDistVal{7}]{A}{}{B}{}{C}{D}
    \pspolygon(A)(B)(C)
    \pstMarkAngle{A}{C}{B}{}
\end{pspicture}
\end{document}

enter image description here

The remaining is left unknown.

Edit 1:

Thanks for answering. As I have other thing to do right now, I have not checked every single line of each new answer whether or not I understand it. Please be patient and probably I will switch the accepted answer to the best one.

Edit 2:

It will be much easier if you provide us with the code using beamer to show the procedure step by step (one step per slide). What do you think? I think TikZ users have no problem with it as beamer and tikz are tightly coupled.

share|improve this question
1  
The simplest way is to use GeoGebra and then export as tikz code. –  Sigur Nov 4 '13 at 13:58
    
They are similar triangles. So is it allowed to take the ratio of sides or is it still manual? –  percusse Nov 4 '13 at 14:34
    
Why not use GeoGebra? –  Michael Hoppe Nov 4 '13 at 14:37
    
Animation added to my straight-edge and compass answer. –  Loop Space Nov 7 '13 at 21:04
1  
@DonutE.Knot Thanks for the bounty! I didn't know you'd set one (I presume it was you). I've been playing more with straight-edge-and-compass in TikZ, if you're interested: plus.google.com/110765980098077923527/posts/H3ZTwU6Hg7R –  Loop Space Nov 14 '13 at 17:29

13 Answers 13

up vote 28 down vote accepted

Edit: More accurate Arc instead of arc:

enter image description here

Compass-straight-edge (no atan-s) imitated with Asymptote:

// tri.asy :
// To get standalone tri.pdf, run: 
// asy -f pdf tri.asy     

size(200);
import graph;
import fontsize;
defaultpen(fontsize(9pt));

pen linepen=deepblue+1.2bp;
pen xlinepen=red+1.2bp;
pen arcpen=gray+0.4bp;

real a=6, b=7, c=8; real x;

pair B=(0,0);
pair C=(a,0);

guide barc=Arc(C,b,90,120);
guide carc=Arc(B,c,50,70);

pair A=intersectionpoint(carc,barc);

draw(A--B--C--cycle,linepen);

draw(barc,arcpen);
draw(carc,arcpen);

draw(Arc(A,arcpoint(A--B,1),arcpoint(A--C,1)));

pair Cp=(A+b*W);
draw(A--Cp,arcpen);

guide bparc=Arc(Cp,a,50,90);
guide cparc=Arc(A,c,120,160);

pair Bp=intersectionpoint(cparc,bparc);

draw(bparc,arcpen);
draw(cparc,arcpen);

draw(A--Bp--Cp);

pair D=extension(Bp,A,B,C);

draw(Arc(A,arcpoint(A--Bp,1),arcpoint(A--Cp,1)));
draw(Arc(D,arcpoint(D--A,1),arcpoint(D--B,1)));

draw(C--D--A,xlinepen);

label("$A$",A,N);
label("$B$",B,NW);
label("$C$",C,NE);
label("$D$",D,NE);
label("$B^\prime$",Bp,N);
label("$C^\prime$",Cp,NW);

label(string(a),B--C,S);
label(string(b),C--A,W);
label(string(c),A--B,NW);

x=round(arclength(C--D)*1e4)/1e4;
label("$x\approx"+string(x)+"$",C--D,S);

dot(new pair[]{A,B,C,D,Bp,Cp},UnFill);

Edit2:

A more detailed version, now just the two ancient instruments and a sheet of paper.

// tri.asy :
// To get standalone tri.pdf, run: 
// asy -f pdf tri.asy     

size(200);
import graph;
import math;
import fontsize;
defaultpen(fontsize(9pt));

real w=1.2bp;
pen BCpen=red+w;
pen ACpen=deepgreen+w;
pen ABpen=blue+w;
pen ADpen=pink+w;

pen linepen=deepblue+w;

pen xlinepen=orange+w;
pen arcpen=gray+0.4bp;
pen anglepen=black+0.4bp;

real a=6, b=7, c=8; real x;

real r;
pair p,q,t;
guide gp,gq;
pair A,B,C,D,Ap,Bp,Cp;
pair H4,H2,H1;

srand(12345);

// Step 1. Select two arbitrary points A and B on the sheet
A=rotate(unitrand()*60+30)*E;
B=(0,0);

// and connect them with a line AB using straight-edge:
guide AB=A--B;
draw(AB,ABpen);
real ticksize=arclength(AB)/32;

// Step 2. Split the line AB in two by drawing the two arcs from the endpoints
//     and the line throught the two intersections
r=arclength(AB);
gp=Arc(A,r,-60,-40);
gq=Arc(B,r,0,20);
draw(gp,arcpen); draw(gq,arcpen);

p=intersectionpoint(gp,gq);

gp=Arc(A,r,180,220);
gq=Arc(B,r,120,150);
draw(gp,arcpen); draw(gq,arcpen);
q=intersectionpoint(gp,gq);
H4=intersectionpoint(p--q,AB);

draw(arcpoint(H4--p,ticksize)--arcpoint(H4--q,ticksize),arcpen);

//  Step 3. Similarly, split BH4 in two:

r=arclength(B--H4);
gp=Arc(H4,r,-60,-40);
gq=Arc(B,r,0,20);
draw(gp,arcpen); draw(gq,arcpen);

p=intersectionpoint(gp,gq);

gp=Arc(H4,r,180,220);
gq=Arc(B,r,120,150);
draw(gp,arcpen); draw(gq,arcpen);
q=intersectionpoint(gp,gq);
H2=intersectionpoint(p--q,AB);

draw(arcpoint(H2--p,ticksize)--arcpoint(H2--q,ticksize),arcpen);

//  Step 4. Similarly, split BH2 in two:

r=arclength(B--H2);
gp=Arc(H2,r,-60,-40);
gq=Arc(B,r,0,20);
draw(gp,arcpen); draw(gq,arcpen);

p=intersectionpoint(gp,gq);

gp=Arc(H2,r,180,220);
gq=Arc(B,r,120,150);
draw(gp,arcpen); draw(gq,arcpen);
q=intersectionpoint(gp,gq);
H1=intersectionpoint(p--q,AB);

draw(arcpoint(H1--p,ticksize)--arcpoint(H1--q,ticksize),arcpen);

//  At this point we have all measures ready: AB=8, AH1=7, AH2=6

// Step 5. Construct point C

r=arclength(A--H1);
gp=Arc(A,r,-65,-55);
r=arclength(A--H2);
gq=Arc(B,r,10,20);
draw(gp,arcpen); draw(gq,arcpen);
C=intersectionpoint(gp,gq);
draw(B--C,BCpen);
draw(A--C,ACpen);
draw(Arc(A,H1,C),arcpen);

// Step 6. Construct a line AA' || BC
r=arclength(A--C);
gp=Arc(B,r,110,130);
r=arclength(B--C);
gq=Arc(A,r,180,200);
draw(gp,arcpen); draw(gq,arcpen);
Ap=intersectionpoint(gp,gq);
draw(B--Ap,arcpen);
drawline(A,Ap,arcpen);

// Step 7. Consrtuct point C' on AB'
r=arclength(A--C);
gp=Arc(A,r,180,240);
Cp=intersectionpoint(A--(2Ap-A),gp);

// Step 8. Consrtuct point B'

r=arclength(A--B);
gp=Arc(A,r,140,160);
r=arclength(B--C);
gq=Arc(Cp,r,70,100);
draw(gp,arcpen); draw(gq,arcpen);
Bp=intersectionpoint(gp,gq);
draw(A--Bp,ABpen);
draw(A--Cp,ACpen);
draw(Bp--Cp,BCpen);

// Step 9. Finally, construct point D

D=extension(Bp,A,B,C);
draw(C--D,xlinepen); 
draw(A--D,ADpen); 

// ==========================

// mark angles    
draw(arc(A,arcpoint(AB,arclength(B--H1)),C),anglepen);
draw(arc(A,arcpoint(A--Bp,arclength(B--H1)),Cp),anglepen);
draw(arc(D,arcpoint(D--A,arclength(B--H1)),C),anglepen);

label("$A$",A,N);
label("$B$",B,NW);
label("$C$",C,SE);
label("$D$",D,E);
label("$H_4$",H4,NW);
label("$H_2$",H2,NW);
label("$H_1$",H1,NW);
label("$A^\prime$",Ap,N);
label("$B^\prime$",Bp,N);
label("$C^\prime$",Cp,SW+S);
dot(new pair[]{A,B,C,D,H4,H2,H1,Ap,Bp,Cp},UnFill);

enter image description here

Edit-3

Great thanks to @Andrew Stacey for pointing out in a comment that it is not allowed to transfer lengths from one place to another. This update fixes this by constructing additional points.

// compass.asy :
// To get standalone compass.pdf, run: 
// asy -f pdf compass.asy     

import math;
import graph;

struct construct{
  pair[] loc;
  string[] name;
  pair[] namePos;
  guide[] straight;
  pen[] straightPen;
  guide[] circ;
  pen[] circPen;

  pen thinpen;

  bool pqr(pair p, pair q, pair r){
    return (p.x*(q.y-r.y)+(r.y-p.y)*q.x+r.x*(p.y-q.y))>0;
  };

  pair lastpoint(){
    assert(loc.length>0); 
    return loc[loc.length-1]; 
  }

  pair prevpoint(){
    assert(loc.length>1); 
    return loc[loc.length-2]; 
  }

  pair newpoint(pair ploc, string pname="", pair npos=(0,0)){
    loc.push(ploc);
    name.push(pname);
    namePos.push(npos);
    return loc[loc.length-1];
  }

  guide newstraight(pair A, pair B, pen p=nullpen){
    straight.push(A--B);
    straightPen.push(p);    
    return straight[straight.length-1];
  }

  guide newcirc(pair A,pair B, pen p=nullpen){
    circ.push(Circle(A,arclength(A--B)));
    circPen.push(p);
    return circ[circ.length-1];
  }

  pair halve(pair A, pair B, string pname="", pair npos=(0,0)){
    guide p,q; 
    pair[] xpt;
    p=newcirc(A,B,thinpen);
    q=newcirc(B,A,thinpen);
    xpt=intersectionpoints(p,q);
    newpoint(xpt[0]);
    newpoint(xpt[1]);
    newstraight(lastpoint(),prevpoint(),thinpen);
    newpoint(extension(A,B,xpt[0],xpt[1]),pname,npos);
    return lastpoint();
  }

  pair leftPoint(pair A1, pair B1, pair A2, pair B2, string pname="", pair npos=(0,0)){
    guide p,q;
    pair[] xpts;
    p=newcirc(A1,B1,thinpen);
    q=newcirc(A2,B2,thinpen);
    xpts=intersectionpoints(p,q);
    newpoint((pqr(A1,A2,xpts[0]))?xpts[0]:xpts[1],pname,npos);
    return lastpoint();
  }

  pair rightPoint(pair A1, pair B1, pair A2, pair B2, string pname="", pair npos=(0,0)){
    guide p,q;
    pair[] xpts;
    p=newcirc(A1,B1,thinpen);
    q=newcirc(A2,B2,thinpen);
    xpts=intersectionpoints(p,q);
    newpoint((pqr(A1,A2,xpts[0]))?xpts[1]:xpts[0],pname,npos);
    return lastpoint();
  }

  pair at_dist(pair A, pair B, pair C, string pname="", pair npos=(0,0)){
    newcirc(A,C,thinpen);
    newpoint(A+dir(B-A)*arclength(A--C),pname,npos);
    return lastpoint();
  }

  void showStraights(){
    for(int i=0;i<straight.length;++i){
      draw(straight[i],straightPen[i]);
    }  
  }

  void showCircs(){
    for(int i=0;i<circ.length;++i){
      draw(circ[i],circPen[i]);
    }
  }

  void showDots(){
    for(int i=0;i<loc.length;++i){
      dot(loc[i],UnFill);
    }
  }

  void showLabels(){
    for(int i=0;i<loc.length;++i){
      label("$"+name[i]+"$",loc[i],namePos[i]);
    }
  }

  void operator init(pen thinpen=gray+0.3bp){
    this.loc=new pair[];
    this.name=new string[];
    this.namePos=new pair[];
    this.thinpen=thinpen;
  }
}
//=================================

size(250);
import graph;
import math;
import fontsize;
defaultpen(fontsize(9pt));

real w=1.2bp;
pen ABpen=blue+w;
pen BCpen=red+w;
pen ACpen=deepgreen+w;
pen ADpen=gray(0.4)+w;
pen CDpen=orange+w;
pen thinpen=gray+0.4bp;
pen arcpen=black+w;

construct ABCD=construct();

// Construct two arbitrary points A and B
pair A=ABCD.newpoint((1,5),"A",NE);
pair B=ABCD.newpoint((0,0),"B",S);

// Construct measuring marks on AB, assuming |AB|=8 
pair H4=ABCD.halve(A, B,"_4",SE);
pair H2=ABCD.halve(B,H4,"_2",SE);
pair H1=ABCD.halve(B,H2,"_1",SE);
pair H6=ABCD.halve(A,H4,"_6",SE);
pair H7=ABCD.halve(H6,A,"_7",SE);

// Construct point C: |AH1|=7, |BH6|=6
pair C=ABCD.leftPoint(A,H1,B,H6,"C",SE);

// Construct A' as a point of untersection of Circle(B,|BH7|) and Circle(A,|AH2|)   
pair Ap=ABCD.leftPoint(B,H7,A,H2,"A^\prime",N);

// Construct C' as a point of untersection of the line through AA' and a Circle(A,|AC|)   
pair Cp=ABCD.at_dist(A,Ap,C,"C^\prime",S);

// Construct Q6 as a point of untersection of the line through AC' and a Circle(A,|AH7|)   
pair Q6=ABCD.at_dist(A,Cp,H7,"_6",NW);

// Construct B' as a point of untersection of Circle(C',|C'Q6|) and Circle(A,|AB|)   
pair Bp=ABCD.leftPoint(Cp,Q6,A,B,"B^\prime",NE);

// Construct D as a point of untersection of the line through B',A and the line through B,C
pair D=ABCD.newpoint(extension(Bp,A,B,C),"D",S);

ABCD.showStraights();
ABCD.showCircs();

// draw helper lines
draw(Ap--B,thinpen);
drawline(A,Ap,thinpen);
drawline(B,C,thinpen);

// mark angles    
draw(arc(A,arcpoint(A--B,arclength(B--H1)),C),arcpen);
draw(arc(A,arcpoint(A--Bp,arclength(B--H1)),Cp),arcpen);
draw(arc(D,arcpoint(D--A,arclength(B--H1)),C),arcpen);

// draw sides
draw(A--B,ABpen);
draw(A--Bp,ABpen);
draw(A--C,ACpen);
draw(A--Cp,ACpen);
draw(B--C,BCpen);
draw(Bp--Cp,BCpen);
draw(A--D,ADpen);
draw(C--D,CDpen);

ABCD.showDots();
ABCD.showLabels();

enter image description here

share|improve this answer
    
@Marienplatz: It depends on how to define an efficient algorithm. The last updated code starts from the two arbitrary points A and B and uses strictly two operations: draw a straight line, set the radius as a distance between two already constructed points and draw an arc with it, find a point of intersection, see comments in the code for details. –  g.kov Nov 4 '13 at 21:22
    
@Marienplatz: The line real a=6, b=7, c=8; real x; was left from the previous version "reserved for future use", it can be harmlessly removed (or used to add the sizes). –  g.kov Nov 5 '13 at 1:21
    
If we're going to be really strict then your second operation should be "set the radius as a distance between two already constructed points and draw a circle about one of those two points". I counted at least three occasions where you didn't do that. (If you're going to allow derived operations then the question is as to how far you're allowed to go.) –  Loop Space Nov 5 '13 at 8:24
1  
(I should add that I know I'm being extremely pedantic about this!) –  Loop Space Nov 5 '13 at 9:14
1  
@percusse Huh?! There are several ways to read this question: "What's the simplest way to draw this accurately?", "What's the simplest way without manual calculation?", and "How do I construct this using straight-edge-and-compass?". This answer assumes the last of these. Under that assumption I'm merely pointing out that it doesn't use the primary operations. I'm not saying that this is the best way overall of drawing this diagram. –  Loop Space Nov 5 '13 at 9:41

In my answer, I've placed most emphasis on the initial specification (emphasis mine):

I want to see how we can exactly construct the following diagram as simple as possible. It means that the manual calculation should be avoided.

So although I've based my answer on straight-edge-and-compass ideas, I've used a few shortcuts to make it simpler. For example, when drawing a circle with straight-edge-and-compass then you set the radius to the distance between two existing points. That's actually a non-trivial step in TikZ since normally one just extracts the x and y coordinates of a point and so requiring one to compute the distance between two points ends up with more complicated code than need be. Another situation where this occurs is in drawing parallel lines. It is easy to construct parallel lines using straight-edge-and-compass, but it takes several steps to do so and TikZ can do it without them using the shift key.

\documentclass{article}
%\url{http://tex.stackexchange.com/q/142210/86}
\usepackage{tikz}
\usetikzlibrary{intersections,calc}

\begin{document}
\begin{tikzpicture}
% Start with our initial points on the base at a distance 6 apart.
\coordinate (a) at (0,0);
\coordinate (b) at (6,0);
% "draw" two circles: radius 8 at a and 7 at b
\path[overlay,name path=a] (a) circle[radius=8];
\path[overlay,name path=b] (b) circle[radius=7];
% Find the intersection point(s) of those two circles, label one c
\path [name intersections={of=a and b}] (intersection-1) coordinate (c);
% This gives us the left-hand triangle
\draw (a) -- (c) -- (b);
% Now we're going to construct another triangle with the correct angle in its
% lower right-hand corner.  If we could be bothered to do a small computation
% then this would give us the outer triangle.  However, the specification was
% "do not compute" so we simply construct some triangle with the correct angle.
% To make life easier for ourselves later, we make it big.
\begin{scope}[overlay]
\coordinate (a) at (0,0);
\coordinate (b) at (14,0);
\path[name path=a] (a) circle[radius=12];
\path[name path=b] (b) circle[radius=16];
\path [name intersections={of=a and b}] (intersection-1) coordinate (d);
% The line (b) -- (d) is parallel to the right-hand edge of the desired outer
% triangle, but is in the wrong place.  So we need to translate it so that it
% intersects the apex of our existing triangle.
\path[name path=c] (b) -- (d);
% To find the distance to translate, we compute the intersection between (b) -- (d)
% and a horizontal line through the apex (which is point (c)).
\path[name path=d] (c) -- ++(10,0);
\path [name intersections={of=c and d}] (intersection-1) coordinate (e);
\end{scope}
% So (e) is where the line (b) -- (d) goes through and we want it to go through (c)
% so we simply shift (b) back by the relative separation of (e) and (c).
% We also draw the base at this point.    
\draw let \p1=(c) in let \p2=(e) in (a) -- ([shift={(\x1-\x2,0)}]b) -- (c);
\end{tikzpicture}
\end{document}

ruler-compass construction of triangle

share|improve this answer
    
Andrew: Is the syntax let <assignment1> in let <assignment2> in equivalent to the one in the manual: let <assignment1>, <assignment2> in? –  Sebastian Nov 8 '13 at 10:38
1  
@Sebastian Yes. I don't use let very much so I'm not aware of all the variants and didn't look it up (since it worked first time). –  Loop Space Nov 8 '13 at 10:46

Here is the rusty high-school and unnecessarily tedious thingy; (high-school or ancient does not imply the person is stupid; arctangent is the written version of copying the angle but yeah rigour police lurks in the dark...) I think I only skipped drawing a parallel line(to BD) from A to the right.

\documentclass[tikz]{standalone}
\usetikzlibrary{intersections,positioning,calc}
\begin{document}
\begin{tikzpicture}
\def\AB{8cm}
\def\AD{7cm}
\def\BD{6cm}
\draw[red,thin] (0,0)coordinate[label={[black]180:B}] (B) ++(-20:\BD) arc (-20:20:\BD);
\draw[red,thin,name path=arcA] (0,0) ++(50:\AB) arc (50:80:\AB);
\draw[red,thin,name path=arcD] (B) --++(0:\BD) coordinate[label=270:D] (D) ++(130:\AD) arc (130:90:\AD);
\draw[name intersections={of=arcA and arcD},thick] (B) -- (D)--(intersection-1) coordinate[label=90:A] (A) -- cycle;
\path[name path=lineAD] (A) -- (D);
\path[name path=lineAB] (A) -- (B);
\draw[name path=circleA,red,thin] (A) ++(-140:3cm) arc (-140:-70:3cm);
\draw[name intersections={of=lineAD and circleA,name=d},
     name intersections={of=lineAB and circleA,name=b},
     name path=arcAC,red,thin]
     (A) ++(10:3cm) arc (10:-60:3cm);
\draw[name path=arccopy,red,thin] (A) --+(5cm,0) ++(3cm,0) let \p1=($(b-1)-(d-1)$),\n1={veclen(\x1,\y1)} in ++(-140:\n1) arc (-140:-90:\n1);
\draw[name intersections={of=arccopy and arcAC,name=c},name path=lineAC,red,thin] (A) -- ($(A)!3.5!(c-2)$);
\draw[name path=lineBD,red,thin] (D) --++(5cm,0);
\draw[name intersections={of=lineAC and lineBD},yellow,thick] (D) --(intersection-1) coordinate[label={[black]45:C}] (C) -- (A) -- cycle;    
\end{tikzpicture}
\end{document}

enter image description here

And, if you call the top right unlabeled point E, BAD = EAC= ACD angles.

share|improve this answer
    
I "hate" atan2 and atan. –  stalking is prohibited Nov 4 '13 at 14:51
    
@Marienplatz BDA and CAB are similar triangles. You can do atan-free things such as Law of Sines etc. too which says x=14/3 but why bother if you have atan2 (not atan!) ? –  percusse Nov 4 '13 at 14:53
    
@percusse Even without any trigonometry: by similarity we see immediately (x + 6)/8 = 8/6 . –  Michael Hoppe Nov 4 '13 at 15:35
    
@percusse Yes, the one and only 14/3. –  Michael Hoppe Nov 4 '13 at 15:39

Metapost version (with no explicit trig):

prologues := 3;
pair A, B, C, D;
u=5mm;
a := 7; b := 8; c := 6;
B := (0,0); A := (-c,0);
tmp := (a*a + c*c - b*b)/(2c); % law of cosines
C := ( -tmp, sqrt(a*a - tmp*tmp) );
D := (b*b/c - c,0); % similar triangles

C := C*u; A := A*u; D := D*u;

path ST, BT;
ST := B--C--A--cycle;
BT := A--D--C--cycle;

beginfig(1)
  u := 5mm;
  draw fullcircle scaled 2u shifted C;
    clip currentpicture to ST;
  draw fullcircle scaled 2u shifted D;
    clip currentpicture to BT;
  draw BT;
  draw B--C;
  label.ulft ("8" infont "cmr12", .5[A,C]);
  label.bot  ("6" infont "cmr12", .5[A,B]);
  label.llft ("7" infont "cmr12", .5[B,C]);
  label.bot  ("x" infont "cmmi12", .5[B,D]);
endfig
end

triangles

share|improve this answer
    
Thank you but it disobeyed the constraints. :-) –  stalking is prohibited Nov 4 '13 at 22:49
    
@Marienplatz If you mean that it is not ruler/compass, I read the question to say that this was preferred ("I am more interested in...") but not required. –  Dan Nov 6 '13 at 19:14
    
Oh I see. Sometimes I becomes inconsistent, but only sometimes. –  stalking is prohibited Nov 6 '13 at 19:17

Here is a metapost implementation without any explicit calculations. This is really following the construction using a ruler and a compass (except that I took a shortcut to draw parallel lines).

 \starttext
\startMPpage[offset=2mm]
  u := 1cm;

  a := 6u; b := 7u; c := 8u;

  drawoptions(withpen pencircle scaled 1bp);

  % Step 1: Draw the triagle z[0]--z[1]--z[2] with the required lengths.
  z[0] = origin;
  z[1] = (a,0);

  path p[];

  p[0] := fullcircle scaled (2*c) shifted z[0];
  p[1] := fullcircle scaled (2*b) shifted z[1];

  z[2] = p[1] intersectionpoint p[0];

  draw z[0] -- z[1] withcolor red;
  draw z[1] -- z[2] withcolor green;
  draw z[2] -- z[0] withcolor blue;

  % Step 2: Draw triangle z[2]--z[3]--z[4] congruent to the first triangle.
  z[3] = z[2] - (b, 0);

  draw z[2] -- z[3] withcolor green;

  p[3] := fullcircle scaled (2*a) shifted z[3];
  p[4] := fullcircle scaled (2*c) shifted z[2];

  z[4] = p[3] intersectionpoint p[4];

  draw z[3] -- z[4] withcolor red;
  draw z[4] -- z[2] withcolor blue;

  % Step 3: Find point of intersection of z[4]--z[2] and z[0]--z[1]
  z[5] = whatever[z[4], z[2]] ;
  z[5] = whatever[z[0], z[1]] ;

  draw z[1] -- z[5] -- z[2] withcolor 0.4[green,red];

  % Show the length
  w := length(z[5] - z[1])/u;
  draw textext.bot(decimal w)  shifted 0.4[z[1], z[5]];

  % Draw labels
  for i = 0 upto 5 :
    draw fullcircle scaled 3bp shifted z[i];
    draw textext.llft("\framed[background=color, backgroundcolor=white, frame=off]{$z_{" 
                       & decimal i & "}$}") shifted (z[i] - (2pt,2pt));
  endfor

\stopMPpage

\stoptext

which gives enter image description here

share|improve this answer

As Simple As Possible (ASAP)

I don’t know if this counts, but after so many answers with so many approaches here is a hopefully “as simple as possible”-ly approach.

Though, the files

which provide reflection transformations are needed. The library qrr.trans has originally been developed for this answer. Though, the same code can also be found at my answer to Can we mirror a part in tikz?

enter image description here

I reflect C and B at the angle bisector through point A of the triangle.

The angle bisector however is not found geometrically as seen in the animation in the linked Wikipedia article but instead the centroid is used, the the barycentric coordinate system of TikZ is very helpful here.

Then, the intersection of the line through A and B and the line through C parallel to the line through C' and B' is found (shifting of C with the vector C'B' (calc)) and is the coordinate we were looking for.

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{calc,through,qrr.trans}
\begin{document}
\begin{tikzpicture}[thick,line cap=round,line join=round,declare function={a=7;b=8;c=6;}]
\draw (0,0) coordinate (A) node [overlay, circle through=++(right:b)] (AC) {}
  -- ++ (right:c) coordinate (B) node [overlay, circle through=++(right:a)] (BC) {}
  -- (intersection cs: first node=AC, second node=BC, solution=2) coordinate (C) -- cycle;
\coordinate (M) at (barycentric cs:A=a,B=b,C=c) [m/.style={mirror=(M)}]
  coordinate (B') at ([m] B) coordinate (C') at ([m] C);
\draw (C) -- (intersection of C--[shift={($(C')-(B')$)}]C and A--B) coordinate (C'') -- (B);
\end{tikzpicture}
\end{document}

Output

enter image description here

Ruler and Compass

Nearly an only-ruler-and-compass solution follows.

Nearly because

  • we use fixed distances (6, 7 and 8) for construction of the start triangle and because
  • I used an (intersection of …) coordinate in the very last step which technically calculates the intersection of the lines (even when there not drawn/constructed there where they intersect). We’d need another named path and another name intersections path for this in TikZ otherwise. With the ruler-and-compass rule active, we’d just find the intersection by extending the lines far enough, anyway.

The circle through key from the through library is perfect for this because it actually mimics a compass application (of course, TikZ calculates the distance between that point and the coordinate on the path (or what ever is given as an at) and sets up the minimum size value for the shape accordingly).

A ruler should allows us to extend a line through two points past another point. For this, the scale around keys are used: Instead of calc’s notation ($(A)!<factor>!(B)$) we use ([scale around=<factor>:(A)] b) (origin). (We could have used shorten > and shorten < with a negative distance to shorten the line directly but this neither updates the bounding box (not so important) nor does it works with the intersections library.)

It should be noted that the intersection between the circles is found via the calc-powered intersection cs. Its accuracy is in some cases notable smaller than that of the intersections library.

Code

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{intersections,through}
\makeatletter
\tikzset{% the coordinate ([scale around=f:(a)] b) is the same as ($(a)!f!(b)$)
  xscale around/.code=%
    \tikz@addtransform{\def\tikz@aroundaction{\pgftransformxscale}\tikz@doaround{#1}},
  yscale around/.code=%
    \tikz@addtransform{\def\tikz@aroundaction{\pgftransformyscale}\tikz@doaround{#1}},
  scale/.style={xscale={#1}, yscale={#1}}}
\makeatother
\begin{document}
\begin{tikzpicture}[ni/.style={name intersections={#1}}, intersection/name=i,
  thick, line cap=round, line join=round, declare function={a=7;b=8;c=6;}, 
  circle through/.append style={overlay, help lines, draw}, label position=below,
  nl/.style={shape=coordinate, name={#1}, label={$#1$}}]
\def\helppath{\draw[overlay, help lines]}
\path node[nl=A] {}          node [circle through=++(right:b), name path=cAC] {}
  ++ (right:c) node[nl=B] {} node [circle through=++(right:a), name path=cBC] {}
                         (A) node [circle through=(B), name path=cAB] {};
\draw[ni={of={cAC and cBC}, by=C}]
  (A) -- (B) -- (C) node[above] {$C$} -- cycle;
\helppath (A) -- ([scale around=2:(A)] B) [name path=lAB];
\helppath (A) -- ([scale around=2:(A)] C) [name path=lAC];
\path[label position=above left][ni={of=lAC and cAB, by={[nl=B']}}] (i-1) coordinate (B')
     [label position=below]     [ni={of=lAB and cAC, by={[nl=C']}}] (i-1) coordinate (C');
\helppath ([scale around=2:(B')] C') -- ([scale around=2:(C')] B') [name path=lC'B'];
\helppath (C) node [circle through={([scale around=2:(C)] B')}, name path=cC] {};
\helppath[ni={of=cC and lC'B', name=CB'}]
  (CB'-1) node[circle through=(C), name path=cCB'-1] {}
  (CB'-2) node[circle through=(C), name path=cCB'-2] {};
\helppath[ni={of={cCB'-1 and cCB'-2}}] [name path=lOrthoC]
     ([scale around=3:(i-2)] i-1) -- ([scale around=2:(i-1)] i-2);
\helppath[ni={of=cC and lOrthoC}] (i-1) node[circle through=(i-2), name path=cC'-1] {}
                                  (i-2) node[circle through=(i-1), name path=cC'-2] {};
\draw[ni={of=cC'-1 and cC'-2}] % it's happening!
  (C) -- (intersection of A--B and i-1--i-2) coordinate (C'') -- (B);
\end{tikzpicture}
\end{document}

Output

enter image description here enter image description here

share|improve this answer
    
For the TeX files of the animations, see 142210.tex and 142210_cr.tex (cr stands for compass and ruler). The first one uses the angles library from TikZ’s CVS version for the angle notations (the \pics which can safely be removed). The files for the qrr.trans library are already linked in the question. –  Qrrbrbirlbel Nov 8 '13 at 2:50

(I think this is sufficiently distinct to my other answer to warrant a separate answer.)

Here's a full straight-edge-and-compass construction using TikZ. The basic operations of straight-edge-and-compass are:

  1. Draw a line through two points (this is an "infinite" line, so extends beyond the points in question).
  2. Draw a circle centred at one point that passes through another point.
  3. Make new points out of intersections between lines and circles.

Note that (2) does not allow us to measure the distance between two points and then construct a circle centred at some other point. It is always a circle through some point.

TikZ has a couple of libraries that help us do these - at least, the CVS version does. In particular, the intersections library for computing intersections and the through library for drawing circles through points.

I used the calc library to draw the extensions of lines between points. I had issues with the name path global key in an earlier version which was fixed by updating PGF to the latest CVS (thanks to Qrrbrbirlbel for help in tracking that down). An earlier version did not actually construct the correct angle (thanks to g.kov for pointing that out) as the second triangle was not rotated correctly. This version is also slightly more efficient in that it constructs fewer points than the original one.

\documentclass[
  %handout % use this to see the final construction
]{beamer}
%\url{http://tex.stackexchange.com/q/142210/86}
\usepackage{tikz}
\usetikzlibrary{through,intersections,calc}

\tikzset{
  onslide/.code args={<#1>#2}{%
    \only<#1>{\pgfkeysalso{#2}}%
  },
  alt/.code args={<#1>#2#3}{%
    \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}%
  },
  compass/.style 2 args={
    draw=gray,
    node contents={},
    circle through={(#1.center)},
    at={(#2.center)},
    append after command={
        node[aux point={#1}]
        node[aux point={#2}]
    }
  },
  ruler/.style={
    overlay,
    draw=gray
  },
  aux point/.style={
    circle,
    minimum width=4mm,
    onslide=<.|handout:0>{draw=red},
    node contents={},
    at={(#1.center)}
  },
  point/.style={
    fill=#1,
    minimum width=2mm,
    inner sep=0mm,
    circle,
    node contents={},
  },
  point/.default=black
}

\makeatletter

\newcounter{jumping}
\resetcounteronoverlays{jumping}

\def\jump@setbb#1#2#3{%
  \@ifundefined{jump@#1@maxbb}{%
    \expandafter\gdef\csname jump@#1@maxbb\endcsname{#3}%
  }{%
    \csname jump@#1@maxbb\endcsname
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    #3
    \pgfmathsetlength\pgf@x{max(\pgf@x,\pgf@xa)}%
    \pgfmathsetlength\pgf@y{max(\pgf@y,\pgf@ya)}%
    \expandafter\xdef\csname jump@#1@maxbb\endcsname{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
  }
  \@ifundefined{jump@#1@minbb}{%
    \expandafter\gdef\csname jump@#1@minbb\endcsname{#2}%
  }{%
    \csname jump@#1@minbb\endcsname
    \pgf@xa=\pgf@x
    \pgf@ya=\pgf@y
    #2
    \pgfmathsetlength\pgf@x{min(\pgf@x,\pgf@xa)}%
    \pgfmathsetlength\pgf@y{min(\pgf@y,\pgf@ya)}%
    \expandafter\xdef\csname jump@#1@minbb\endcsname{\noexpand\pgfpoint{\the\pgf@x}{\the\pgf@y}}%
  }
}

\tikzset{
  stop jumping/.style={
    execute at end picture={%
      \stepcounter{jumping}%
      \immediate\write\pgfutil@auxout{%
        \noexpand\jump@setbb{\the\value{jumping}}{\noexpand\pgfpoint{\the\pgf@picminx}{\the\pgf@picminy}}{\noexpand\pgfpoint{\the\pgf@picmaxx}{\the\pgf@picmaxy}}
      },
      \csname jump@\the\value{jumping}@maxbb\endcsname
      \path (\the\pgf@x,\the\pgf@y);
      \csname jump@\the\value{jumping}@minbb\endcsname
      \path (\the\pgf@x,\the\pgf@y);
    },
  }
}


\setbeamertemplate{navigation symbols}{}

\pgfmathsetmacro\ptr{1}%{.5 + .25*rand}
\pgfmathsetmacro\pta{30}%180*rand}

\begin{document}
\begin{frame}[plain]
\hfill%
\resizebox{!}{\textheight}{%
\begin{tikzpicture}[
    stop jumping,
  ]
% Mark two points: one at the centre of the page and one a random offset.  These define our unit of length for constructions
\path (0,0) node[point=red,label={0},name=a-b-0];
\path (a-b-0) ++(\pta:\ptr) node[point=red,label={1},name=a-b-1];
% Draw the line between them
\pause
\draw<+->[ruler,name path=a-b] ($(a-b-0)!-20!(a-b-1)$) -- ($(a-b-0)!20!(a-b-1)$) node[aux point=a-b-0] node[aux point=a-b-1];
% Now, we create points at -1,0,6,7,8,9 by constructing appropriate circles and intersecting with the line a-b.  We need one intermediate point at 3.
\foreach \ctr/\rad/\ints/\lbl in {
  0/1/2/-1,
  1/-1/1/3,
  3/0/1/6,
  3/-1/1/7,
  7/6/1/8,
  8/7/1/9%
}
{
  \node<+->[compass={a-b-\rad}{a-b-\ctr},name path=a-b-\lbl];
  \path<.-> [name intersections={of=a-b and a-b-\lbl}] (intersection-\ints) node[point,name=a-b-\lbl,label={\lbl}];
}
% Using the marked points, draw a circle of radius 8 centred at the 0 mark
\node<+->[compass={a-b-8}{a-b-0},name path=rad-8];
% Using the marked points, draw a circle of radius 7 centred at the 6 mark
\node<+->[compass={a-b--1}{a-b-6},name path=rad-7];
% Label the centres of these circles
\path<+-> (a-b-0) node[point,name=A,label={[red]below:A}];
\path<.-> (a-b-6) node[point,label={[red]below:B},name=B];
% One of the intersections of these circles completes one of the desired triangles
\path<.-> [name intersections={of=rad-8 and rad-7}] (intersection-1) node[point,name=C,label={[red]left:C}];
% Draw that triangle
\draw<.->[ultra thick] (A.center) -- (B.center) -- (C.center) -- cycle node[aux point=A] node[aux point=B] node[aux point=C];
% To get the other line, we draw a line parallel to a-b through C and construct the same triangle as before but with the new line as the base.
% To draw the parallel line, we repeat the construction of the point C but shift up one unit along a-b.
\node<+->[compass={a-b-9}{a-b-1},name path=s-rad-8];
\node<+->[compass={a-b-0}{a-b-7},name path=s-rad-7];
\path<.-> [name intersections={of=s-rad-8 and s-rad-7}] (intersection-1) node[point,name=C-1];
% Now construct the line through C and C-1, calling it p-a-b (the p- prefix is for ``parallel'')
\draw<+->[ruler,name path=p-a-b] ($(C)!-20!(C-1)$) --  ($(C)!20!(C-1)$) node[aux point=C] node[aux point=C-1];
\path<.-> (C) node[point,label={0},name=p-a-b-0];
\path<.-> (C-1) node[point,label={1},name=p-a-b-1];
\node<+->[compass={a-b--1}{a-b-7},name path=s7-rad-8];
\path<.-> [name intersections={of=s7-rad-8 and p-a-b}] (intersection-1) node[point,name=p-a-b-7,label={7}];
\node<+->[compass={a-b-0}{a-b-8},name path=s8-rad-8];
\path<.-> [name intersections={of=s8-rad-8 and p-a-b}] (intersection-1) node[point,name=p-a-b-8,label={8}];
% We construct the same circles on p-a-b as we did on a-b
\node<+->[compass={p-a-b-8}{p-a-b-0},name path=p-rad-8];
\node<+->[compass={p-a-b-1}{p-a-b-7},name path=p-rad-6];
% Label their centres
\path<+-> (p-a-b-0) node[point,label={[red]right:pC},name=pC];
\path<.-> (p-a-b-7) node[point,label={[red]right:pB},name=pB];
% The main difference is that we want the intersection on the opposite side of the line p-a-b
\path<.-> [name intersections={of=p-rad-8 and p-rad-6}] (intersection-2) node[point,name=pA,label={[red]right:pA}];
% The apex of the new triangle is the end of the missing side of the outer triangle
\draw<+->[ruler,name path=p-a-c] ($(pA)!-1.2!(pC)$) -- ($(pA)!2.1!(pC)$) node[aux point=pA] node[aux point=pC];
\path<+-> [name intersections={of=p-a-c and a-b}] (intersection-1) node[point,name=D,label={[red]right:D}];
\draw<+->[ultra thick] (pC.center) -- (D.center) -- (B.center) node[aux point=pC] node[aux point=D] node[aux point=B];
\end{tikzpicture}}%
\hspace*{\fill}%
\end{frame}
\end{document}

Static construction

Animated construction

share|improve this answer
    
Hmm, I'm confused. Your construction looks nice, but it does not answer the question. The angle A pC C should be constructed to be the same as A C B, instead the side C pC in this example is constructed of the same size as AC=8. Also, the correct x size should be 4+2/3 units, not less than 3 units. Was this really your intent? –  g.kov Nov 7 '13 at 22:39
    
@g.kov "Was this really your intent?"! Is that a polite way of saying "You got it wrong."?! I'll take a look later, but I expect you're right: the triangle p-A etc is meant to put the correct angle at pA, so I need to permute the side lengths, that's all. Thanks for checking! –  Loop Space Nov 8 '13 at 6:04
    
@g.kov Updated now. I think that's correct. –  Loop Space Nov 8 '13 at 10:00

As jubobs mentioned in the comments with tkz-euclide it's easy. The longest part below is the labeling of the points and lines...

enter image description here

\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}

\begin{tikzpicture}
  \def\a{7}\def\b{8}\def\c{6}
  \tkzInit[xmin=-1,xmax=12,ymin=-1,ymax=8]
  % \tkzGrid
  \tkzClip
  % the base triangle
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(\c,0){B}
  \tkzInterCC[R](A,\b cm)(B,\a cm) \tkzGetPoints{C}{C'}
  \tkzDrawPolygon(A,B,C)
  % find (D) through construction of a similar triangle A'B'C and intersecting
  % of the lines (AB) and (B'C):
  \tkzDefPointBy[reflection=over A--C](B)\tkzGetPoint{B''}
  \tkzFindAngle(B,A,C)\tkzGetAngle{bac}
  \tkzDefPointBy[rotation=center C angle -\bac](A)\tkzGetPoint{A'}
  \tkzDefPointBy[rotation=center C angle -\bac](B'')\tkzGetPoint{B'}
  \tkzInterLL(A,B)(B',C)\tkzGetPoint{D}
  % draw the second triangle:
  \tkzDrawPolygon(C,B,D)
  % label the whole thing:
  \tkzLabelSegment[below](A,B){$\c$}
  \tkzLabelSegment[left](A,C){$\b$}
  \tkzLabelSegment[right](B,C){$\a$}
  \tkzLabelPoint[left](A){$A$}
  \tkzLabelPoint[below](B){$B$}
  \tkzLabelPoint[above](C){$C$}
  \tkzLabelPoint[right](D){$D$}
  \tkzMarkAngle(A,C,B)
  \tkzMarkAngle(C,D,B)
  \tkzCalcLength[cm](B,D)\tkzGetLength{x}\FPround\x\x{2}
  \tkzLabelSegment[below](B,D){$x=\x$}
\end{tikzpicture}

\end{document}
share|improve this answer

math update 1 : this triangle with sides 6, 7, 8 has an exceptional property. In the figure below the intersection of lines AC and A'C' is also at distance 6 from B. Let a=BC, b=AC, c=AB be the sides of a triangle. Then the phenomenon happens if and only if b^2 c = (c-a)(c+a)^2. We have here a=6, c=8 and b=7 . . .

math update 2 : I have not done an exhaustive search, but an infinite series of triangles with integer sides having this property is obtained with a=n(n^2-1), b=2n^2-1, c=n^3. The 6-7-8 triangle is with n=2. The next one with n=3 has sides of lengths 24-17-27. I have added a picture.

math update 3 : one can prove that all non-zero rational solutions of the homogeneous equation b^2 c = (c-a)(c+a)^2, apart from those proportional to 1:0:1, 1:0:-1, and 0:1:0 are parametrized by a=\lambda t(t^2-1), b=\lambda (2t^2-1), c=\lambda t^3 where t = (a+c)/b and \lambda=c/t^3 are rational. Furthermore when a, b, c are integers, necessarily \lambda is an integer too. The above solutions are with \lambda=1, and for c to be integer it is necessary that t=n is integer. Taking t=3/2 and \lambda=8 one obtains a solution 15:28:27 not of the type in alinea 2. It is possible to go further but I will leave matters standing here else mathoverflow will become interested and our tranquility here will cease.

math update 4 : mathoverflow is already jealous of our expertise, so let me add the final conclusion, all primitive (i.e. with no common factor), positive, integer solutions are obtained uniquely as a=p(p^2-q^2), b=q(2p^2-q^2), c=p^3 with p>q>0 and (p,q) co-prime. 6:7:8 is the simplest exceptional triangle, it has p=2, q=1. All such triangles with integer side lengths thus have BA=c=p^3 which is a perfect cube. The next simplest solutions are 15:28:27 and 24:17:27, then 60:31:64 and 28:69:64.


I apologize for not making a picture, but the other answers amply demonstrated various techniques; I just wanted to point out that once the point A is constructed at given distances (8 and 7) from B and C, one can get to D in the following way:

Let C' the point on BA at distance BC=6 from B, and let A' be the point on BC at distance BA=8 from B. The seeked line AD is the parallel to C'A' going through A.

One way to see this is to argue that the reverse similitude with center at B which sends C to A must send A to D; this is seen from the (reverse) similarity of the triangles DBA and ABC mentioned in comments, from looking at the angles. This similitude is the composite of the orthogonal symetry in the bisector line at B which exchanges the two lines BC and BA and a homothety of ratio BA/BC=8/6.

We thus find that the point D is at distance 8/6 times 8 from B, hence 64/6=32/3 and x=32/3-6=14/3 as already explained in comments. And the line AD is parallel to the line C'A'.

\documentclass[pstricks,border=6pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}(-1,-1)(12,8)
    \pstGeonode [PosAngle={-90}](0,0){B}
    \pstGeonode [PosAngle={-90}](6,0){C}
    \pstInterCC[RadiusA=\pstDistVal{8},RadiusB=\pstDistVal{7},PosAngle={90},PointNameA=A,PointSymbolA=default]{B}{}{C}{}{A}{A-}
    \pstHomO[HomCoef=1.3333,PosAngle={-90}]{B}{C}[A']
    \pstHomO[HomCoef=.75,PosAngle={180}]{B}{A}[C']
    \pstHomO[HomCoef=1.3333,PosAngle={-90}]{B}{A'}[D]
    \pspolygon(A)(B)(C)
    \pstLineAB {D}{B}
    \pstMarkAngle{B}{A}{C}{}
    \pstMarkAngle{A}{D}{C}{}
    \psset{linecolor=red, nodesep=-1}
    \pstLineAB{A}{D}\pstLineAB{C'}{A'}
    \pstArcOAB[linecolor=blue]{B}{C}{C'}
    \pstArcOAB[linecolor=blue]{B}{A'}{A}
\end{pspicture}
\end{document}

similar triangles

\documentclass[pstricks,border=6pt]{standalone}
\usepackage{pst-eucl}
\usepackage{xintfrac}
\begin{document}
\psset{unit=.75cm}
\fontsize{20}{30}
\begin{pspicture}(-1,-1)(32,18)
    \psset{PointNameSep=1.5em}
    \pstGeonode [PosAngle={-90,-10}](0,0){B}
    \pstGeonode [PosAngle={-90}](24,0){C}
    \pstInterCC[RadiusA=\pstDistVal{27},RadiusB=\pstDistVal{17},PosAngle={90},PointNameA=A,PointSymbolA=default]{B}{}{C}{}{A}{A-}
    \pstHomO[HomCoef=1.125,PosAngle={-90}]{B}{C}[A']
    \pstHomO[HomCoef=0.88889,PosAngle={180}]{B}{A}[C']
    \pstHomO[HomCoef=1.125,PosAngle={-90}]{B}{A'}[D]
    \pspolygon(A)(B)(C)
    \pstLineAB {D}{B}
    \pstMarkAngle{B}{A}{C}{}
    \pstMarkAngle{A}{D}{C}{}
    \psset{linecolor=red, nodesep=-1}
    \pstLineAB{A}{D}\pstLineAB{C'}{A'}
    \pstArcOAB[linecolor=blue]{B}{C}{C'}
    \pstArcOAB[linecolor=blue]{B}{A'}{A}
    \rput {0}(12,-.5){\textbf{24}}
    \rput {0}(9.5,8.4){\textbf{27}}
    \rput {0}(21.7,7.9){\textbf{17}}
\end{pspicture}
\end{document}

similar 2

share|improve this answer
    
the fact that the intersection of AC and A'C' is also at distance 6 from B is an amazing numerical coincidence which happens if and only if the length of AC is 7 (once BC=6 and BA=8). –  jfbu Nov 5 '13 at 18:22

diagram

EDIT: I didn't understand the question correctly, so here's the correct answer

Here's an implementation in tkz-euclide. In order to draw the diagram, you need to come up with a nominal value for x.

\documentclass{minimal}
\usepackage{tikz,tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
    \newcommand* \x {5}

    \tkzDefPoints{0/0/A,6/0/B}
    \tkzDefShiftPoint[B](\x, 0){D}
    \tkzInterCC[R](A,8cm)(B,7cm) \tkzGetPoints{C}{C'}

    \tkzLabelPoints[below](A,B,D)
    \tkzLabelPoints[above](C)

    \tkzDrawSegments(A,D C,A C,B C,D)
    \tkzLabelSegment[left](C,A){8}
    \tkzLabelSegment[right](C,B){7}
    \tkzLabelSegment[below](A,B){6}
    \tkzLabelSegment[below](B,D){$\leftarrow x \rightarrow$}

    \tkzMarkAngle(C,D,B)
    \tkzMarkAngle(A,C,B)
\end{tikzpicture}
\end{document}
share|improve this answer
3  
I don't think this is correct: The angle BDC should be the same as ACB, but in your answer that's only approximately true. By eyeballing and then hardcoding the value for x, you're sidestepping the main point of the question, which is to construct the triangle so that the two angles are the same, not just draw a triangle that roughly looks like the one in the quesiton. –  Jake Nov 4 '13 at 16:47
    
I get your point, but the question wasn't clear about making the two angles equal. Having a bit of hard-coding dramatically reduces the complexity of the steps. If this were a homework question, you would have first solved the problem on paper, then plugin the value of x when you typeset. As it turns out, 5 is pretty close to the correct value of x (4.667). –  Zoff Dino Nov 4 '13 at 16:56
1  
In the comments, the OP clarified the need for the two angles to be equal. And one of the explicit requirements in the question was that "manual calculation should be avoided". As it stands, this answer is neither here nor there: Some things are constructed, others are eyeballed. If one assumes that manual calculations are permitted beforehand, all coordinates could be calculated, and only the final result would need to be drawn, which would take all of four lines of code. –  Jake Nov 4 '13 at 17:10
    
Ahhh... TL; DR. If something is important, edit it into the body don't leave it in the comments. I basically had 30 mins to burn, saw the question, look at the image and typeset it. –  Zoff Dino Nov 4 '13 at 18:11

Here is a Tikz version with no trig.

\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-euclide}

\usetikzlibrary{intersections}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}[scale=0.5]
\coordinate (A) at (0,0);
\coordinate (B) at (6,0);
\draw (A) -- node[midway,below]{6} (B);
\draw[name path=arcAC,color=red] (A)+(0,8) arc(90:30:8cm);
\draw[name path=arcBC,color=green] (B)+(0,7) arc(90:120:7cm);
\path[name intersections={of=arcAC and arcBC}];
\coordinate (C) at (intersection-1);
\tkzMarkAngle[size=.8cm](A,C,B)
\draw (A) -- node[midway,above left]{8} (C);
\draw (C) -- node[midway,below left]{7} (B);
\path (C)+(-7,0) coordinate(D);
\draw (C) -- node[midway,below]{7} (D);
\draw[name path=arcCE,color=red] (C)+(0,8) arc(90:150:8cm);
\draw[name path=arcDE,color=green] (D)+(0,6) arc(90:60:7cm);
\path[name intersections={of=arcCE and arcDE}];
\coordinate (E) at (intersection-1);
\tkzMarkAngle[size=.8cm](E,C,D)
\draw (D) -- node[midway,above left]{6} (E);
\draw (C) -- node[midway,below left]{8} (E);
\draw[name path=extendEC] (C) -- ($2.5*(C)-1.5*(E)$);
\draw[name path=extendAB] (B) -- ($2*(B)$);
\path[name intersections={of=extendEC and extendAB}];
\coordinate (F) at (intersection-1);
\tkzMarkAngle[size=.8cm](C,F,B)
\end{tikzpicture}
\end{document}

construction

share|improve this answer

By using @g.kov's algorithm but removing the auxiliary lines, arcs, points, etc. It contains only 738 characters.

\documentclass[pstricks,border=20pt]{standalone}
\usepackage{pst-eucl}
\begin{document}
\begin{pspicture}(-1,-1)(12,8)
    \pstGeonode[PosAngle={180,-90}]{A}(6,0){B}
    \psset{PointName=,PointSymbol=none}
    \pstInterCC[RadiusA=\pstDistVal{8},RadiusB=\pstDistVal{7},PosAngle=90,PointNameA=C,PointSymbolA=default]{A}{}{B}{}{C}{C-}
    \pstInterCC[RadiusA=\pstDistAB{A}{B},RadiusB=\pstDistAB{B}{C}]{C}{}{A}{}{D-}{D}
    \pstInterLC[Radius=\pstDistAB{A}{C}]{C}{D}{C}{}{A'-}{A'}
    \pstInterCC[RadiusA=\pstDistAB{A}{B},RadiusB=\pstDistAB{B}{C}]{A'}{}{C}{}{B'}{B'-}
    \pstInterLL[PointName=default,PointSymbol=default]{B'}{C}{A}{B}{E}
    \pspolygon(A)(B)(C)
    \pspolygon(C)(E)(B)
    \pstMarkAngle{A}{C}{B}{}
    \pstMarkAngle{C}{E}{B}{}
\end{pspicture}
\end{document}

enter image description here

share|improve this answer

Late to the party I know, but here is a shortish version in Metapost using the solve macro and a transform to draw the second similar triangle.

beginfig(1);

  vardef mark(expr p,q,r) =
     .5 right rotated angle (p-q) shifted q {up rotated angle(p-q)} ..
     .5 right rotated angle (r-q) shifted q {up rotated angle(r-q)}
     enddef;

  vardef f(expr h) = save a,b;
     a+b=6;
     a = sqrt(64-h*h);
     b*b+h*h<49 enddef;

  h = solve f(0,7);
  a = sqrt(64-h*h);

  z0 = origin; z1 = (a,h); z2 = (6,0); z3 = (64/6,0);

  transform t;
  z0 transformed t = z0;
  z2 transformed t = z1;
  z1 transformed t = z3;

  path p; p := z0 -- z1 -- z2;  
  draw p scaled 1cm; 
  draw p transformed t scaled 1cm;

  draw mark(z0,z1,z2) scaled 1cm;
  draw mark(z1,z3,z0) scaled 1cm;

  dotlabel.lft(btex $A$ etex, z0);
  dotlabel.top(btex $B$ etex, z1 scaled 1cm);
  dotlabel.bot(btex $C$ etex, z2 scaled 1cm);
  dotlabel.rt (btex $D$ etex, z3 scaled 1cm);

endfig;

Nested triangle construction

The general technique for solving non-linear equations in Meta(font|post) is in Appendix D, section 3 of the METAFONT book.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.