# 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=ʮ߱

points=0,0\
0,-1

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

goal=line,0,-1,sin(pi*19/17),cos(pi*19/17),1\
line,sin(pi*19/17),cos(pi*19/17),sin(pi*21/17),cos(pi*21/17)\
line,sin(pi*21/17),cos(pi*21/17),sin(pi*23/17),cos(pi*23/17)\
line,sin(pi*23/17),cos(pi*23/17),sin(pi*25/17),cos(pi*25/17)\
line,sin(pi*25/17),cos(pi*25/17),sin(pi*27/17),cos(pi*27/17)\
line,sin(pi*27/17),cos(pi*27/17),sin(pi*29/17),cos(pi*29/17)\
line,sin(pi*29/17),cos(pi*29/17),sin(pi*31/17),cos(pi*31/17)\
line,sin(pi*31/17),cos(pi*31/17),sin(pi*33/17),cos(pi*33/17)\
line,sin(pi*33/17),cos(pi*33/17),sin(pi*35/17),cos(pi*35/17)\
line,sin(pi*35/17),cos(pi*35/17),sin(pi*37/17),cos(pi*37/17)\
line,sin(pi*37/17),cos(pi*37/17),sin(pi*39/17),cos(pi*39/17)\
line,sin(pi*39/17),cos(pi*39/17),sin(pi*41/17),cos(pi*41/17)\
line,sin(pi*41/17),cos(pi*41/17),sin(pi*43/17),cos(pi*43/17)\
line,sin(pi*43/17),cos(pi*43/17),sin(pi*45/17),cos(pi*45/17)\
line,sin(pi*45/17),cos(pi*45/17),sin(pi*47/17),cos(pi*47/17)\
line,sin(pi*47/17),cos(pi*47/17),sin(pi*49/17),cos(pi*49/17)\
line,sin(pi*49/17),cos(pi*49/17),0,-1
goal_text= 1 Ϊ 2 Ϊһʮ߱
hint=˹(1777-1855)19ʱʶԲֱ߿ʮ߱.\
<p>ʱ, ӿ಻ͬľʮ߱. ΪЩڱʾԶ̫,\
ǽһ H. W. Richmond (ѧ־ 26, 1893, pp. 296-297;\
Ҳɲο H. E. Dudeney, ѧ(London 1917), p. 38) Ľⷨ,\
ýⷨ H.-S.-M. Coxeter  "ε(Introduction to Geometry)"Ҳ.\
<p>Եϰҳе""˽ýⷨ.

ݵժ¼. <p><center>\
<img border=1 src=$module_dir/exo/17gon.gif></center>\

solution=nop#This construction of 155 steps, due to H. W. Richmond, can be found in H.-S.-M. Coxeter, Introduction to Geometry, section 2.1.\
circle,1,2\
point,line,1,circle,1\
midper,2,3\
point,line,2,circle,1\
hide,point,3\
hide,point,5#We start by dividing segment 1-4 by 4 (point J in Coxeter).\
middle,1,4\
middle,1,6#Point 7 is J in Coxeter.\
hide,point,4\
hide,point,6\
segment,2,7#Now we divide angle 1-7-2 by 4.\
circle,7,1\
point,line,3,circle,2\
hide,point,8\
circle,1,9\
circle,9,1\
point,circle,3,circle,4\
hide,point,10\
hide,circle,3\
hide,circle,4\
segment,7,11#Line 4 is the bisector of angle 1-7-2. We continue. Zoom to see the detail.\
point,line,4,circle,2\
hide,point,11\
hide,point,12\
circle,1,13\
circle,13,1\
point,circle,5,circle,6\
line,7,15\
point,line,1,line,5#Point 16 is E in Coxeter. We hide the intermediate objects.\
hide,circle,5\
hide,circle,6\
hide,circle,2\
hide,point,9\
hide,point,13\
hide,point,14\
hide,point,15\
hide,line,4#Now the line JF in Coxeter, 45&deg; wrt JE (line 5).\
circle,7,16\
point,line,5,circle,7\
midper,16,17\
point,line,6,circle,7\
circle,16,18\
circle,18,16\
point,circle,8,circle,9\
segment,7,21\
point,line,7,line,1#Point 22 is F in Coxeter. We hide objects no longuer needed.\
hide,circle,9\
hide,circle,8\
hide,point,21\
hide,point,20\
hide,point,19\
hide,point,18\
hide,point,17\
hide,circle,7\
hide,line,6#Next the construction of point K in Coxeter. Zoom to global recommended.\
middle,2,22\
circle,23,2\
point,line,2,circle,10#Point 24 (25 too) is K in Coxeter.\
hide,circle,10\
hide,point,23\
circle,16,25\
point,line,1,circle,11#The points N<sub>3</sub> and N<sub>5</sub> in Coxeter (26,27) are out. It suffices to draw horizontal lines through them.\
circle,27,1\
point,line,1,circle,12\
midper,1,28\
hide,circle,12\
hide,point,28\
circle,26,1\
point,line,1,circle,13\
midper,1,29\
hide,circle,13\
hide,point,29\
point,line,8,circle,1\
point,line,9,circle,1#Points 30,31,32,33 are already vertices of the polygon to construct. We continue to mark the other vertices.\
midper,30,32\
point,line,10,circle,1\
hide,point,35\
circle,30,34\
point,circle,1,circle,14\
hide,circle,14\
circle,36,30\
point,circle,1,circle,15\
hide,circle,15\
circle,2,37\
point,circle,1,circle,16\
hide,circle,16\
circle,38,2\
point,circle,1,circle,17\
hide,circle,17\
circle,31,39\
point,circle,1,circle,18\
hide,circle,18\
circle,33,40\
point,circle,1,circle,19\
hide,circle,19\
circle,41,33\
point,circle,1,circle,20\
hide,circle,20\
circle,42,41\
point,circle,1,circle,21\
hide,circle,21\
circle,43,42\
point,circle,1,circle,22\
hide,circle,22\
circle,44,43\
point,circle,1,circle,23\
hide,circle,23\
circle,45,44\
point,circle,1,circle,24#Here we have all the vertices of this polygon of 17 sides.\
hide,circle,24#Now we draw the sides of the polygon.\
segment,2,37\
segment,37,36\
segment,36,30\
segment,30,34\
segment,34,32\
segment,32,46\
segment,46,45\
segment,45,44\
segment,44,43\
segment,43,42\
segment,42,41\
segment,41,33\
segment,33,40\
segment,40,31\
segment,31,39\
segment,39,38\
segment,38,2#The construction is completed. We continue to hide the intermediate objects.\
hide,line,10\
hide,circle,11\
hide,point,27\
hide,point,26\
hide,point,25\
hide,point,24\
hide,point,22\
hide,point,16\
hide,point,7\
hide,line,9\
hide,line,8\
hide,line,7\
hide,line,5\
hide,line,3\
hide,line,2\
hide,circle,1

