# 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=Tales
boundary=circles
theta=!random pi/5,pi/3
a1=!random 0.2,0.8
a2=!random 1,2

points=-1,0.5\
1,0.5\
2*$a1-1,0.5\
$a2*cos($theta)-1,-$a2*sin($theta)+0.5

lines=-1,0.5,1,0.5,2\
-1,0.5,$a2*cos($theta)-1,-$a2*sin($theta)+0.5,2

goal=point,$a1*$a2*cos($theta)-1,-$a1*$a2*sin($theta)+0.5
goal_text=encontrar el punto P de la lnea 2 tal que (1-P)/(1-4)=(1-3)/(1-2)\
(los nmeros 1,2,3,4 designan puntos)
hint=Por el teorema de Tales, es suficiente con construir la lnea paralela \
a 2-4 que pasa por el punto 3.
solution=nop#Buscamos una lnea paralela a la lnea 3, que pase a travs del punto 3.\
line,2,4\
circle,2,3\
circle,3,2\
point,line,3,circle,1\
hide,point,6\
circle,5,2\
point,circle,2,circle,3\
line,3,7#Lnea 4 es paralela a la lnea 3.\
point,line,2,line,4\
hide,circle,1\
hide,circle,2\
hide,circle,3\
hide,point,5\
hide,point,7

