# 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=Diameter of a circle
boundary=circles
theta=!random 0,2*pi
r=!random 1.5,3.5

points=$r*cos($theta),$r*sin($theta)
circles=0,0,1,0

goal=point,0,0\
line,0,0,cos($theta),sin($theta),2
goal_text=find the center of circle 1, as well as the diameter through \
point 1
hint=To find the center of a circle, it suffices to find 3 arbitrary points\
on the circle, then construct the mid-perpendiculars of the pairs of the\
points. The center of the circle is the intersection of these\
mid-perpendiculars.\
<p>To find points on the circle, we first add isolated points elsewhere,\
then draw lines through them, which will have intersections with the circle.\
(To put an isolated point, you have only to click on the picture, at a\
place with no existing object.)
solution=random,0.110532450116,0.635183046238\
random,-0.312922914039,-0.460819072751\
line,1,2\
line,2,3\
point,line,1,circle,1\
midper,4,5\
point,line,2,circle,1\
midper,6,7\
point,line,3,line,4\
line,1,8

