# Definition of an exercise ruler & compass.
# syntax of the file.
# points:  each line defines a point.  x,y
# lines:   each line defines two points on a line.   x1,y1,x2,y2,type
#          type: 1 (segment), 2 (line), 3 (semiline direct), 4 (semiline inverse)
#	   type is facultative, defaulting to 1.
# circles: each line defines a circle. x,y,r,n
#	   where (x,y) is the center, r=radius,
#          n is the number of point for the center (if n>0).
# goal: each line defines an object. First item is the type of the object
# (point,line or circle), the rest are parameters (same as above).
# goal_text: text explaining the goal. (language-dependent)

title=
ins_align=middle
golden1=!instexstatic $$ p_2={\sqrt{5}-1 \over 2}. $$
golden2=!instexstatic $$ p_1=\sqrt{5-\sqrt{5}\over 2} $$
pp=!instexstatic $$ p_1=\sqrt{p_2^2+1} $$


points=0,0\
0,-1

lines=0,0,0,-1,1

goal=line,0,-1,sin(pi*7/5),cos(pi*7/5),1\
line,sin(pi*7/5),cos(pi*7/5),sin(pi*9/5),cos(pi*9/5)\
line,sin(pi*9/5),cos(pi*9/5),sin(pi*11/5),cos(pi*11/5)\
line,sin(pi*11/5),cos(pi*11/5),sin(pi*13/5),cos(pi*13/5)\
line,sin(pi*13/5),cos(pi*13/5),0,-1
goal_text= 1 Ϊ 2 Ϊһ
hint=кܶ. , εı߳Բ뾶
<p><center>$golden2</center> <p>\
. Ϊð뾶֪(1-2ľ), 
ֻ֪Բֱ $m_p<sub>1</sub>. <p>\
Ǳ $pp, <p><center>$golden1</center> <p>\
ɹɶ, Բֱ߿ $m_p<sub>2</sub>, Ȼ $m_p<sub>1</sub>.
solution=circle,1,2\
point,line,1,circle,1\
midper,3,2\
point,line,2,circle,1\
hide,point,4\
middle,5,1#Distance 2-6 equals sqrt(5)/2 (if distance 1-2 = 1).\
circle,6,2\
point,line,2,circle,2#Distance 1-7 equals $$m_p<sub>2</sub> (see Hint).\
hide,point,8#Hence distance 2-7 equals $$m_p<sub>1</sub>.\
circle,2,7\
point,circle,1,circle,3\
segment,2,9\
circle,9,2\
point,circle,1,circle,4\
hide,circle,4\
segment,11,9\
circle,11,9\
point,circle,1,circle,5\
hide,circle,5\
segment,12,11\
segment,10,12\
segment,2,10\
hide,line,2\
hide,point,3\
hide,point,5\
hide,point,6\
hide,circle,2\
hide,point,7\
hide,circle,3\

