!set n=$counter
xsize=320
ysize=320
questiontype=0
mathview=0
# generieke applet
helptext=$empty
image=0
applet=1
cols=8
rows=0
draw=0
plot=0
math=0
inputs=4
checkfile=exos/checkfile12.proc
!if $level=0
    R=$n
!else
    R=$level
!endif 
XSIZE=1000
########## MAAK NIEUWE LIJNEN MET !filewrite ###############
hoek1=!randint 50,85
hoek2=!randint 5,40
q=!randint -10,-2
r=!randint 2,10
m1=$[tan(($hoek1)*pi/180)]
m2=$[tan(($hoek2)*pi/180)]
L1=$m1*x
L2=$m1*x+$q
L3=$m2*x
L4=$m2*x+$r

x1=0
y1=0

x2=$[$q/(($m2)-($m1))]
y2=$[$m2*($x2)]

x3=$[($r-($q))/($m1 - ($m2))]
y3=$[$m1*($x3)+($q)]

x4=$[$r/(($m1)-($m2))]
y4=$[$m1*($x4)]

h1=$[$hoek1-$hoek2] 
h2=$[180-$h1]
H=$[360-$h1]
answer$n=$h1,$h2
max=0
min=0
!for p=1 to 4
    !if $(y$p) >$max
	max=$(y$p)
    !endif
    !if $(y$p) <$min
	min=$(y$p)
    !endif
    !if $(x$p) >$max
	max=$(x$p)
    !endif
    !if $(x$p) <$min
	min=$(x$p)
    !endif
!next p
min=$[abs($min)]
bereik=$[4+(max($min,$max))]
data=<?xml version="1.0" encoding="utf-8"?><CaR>\
<Construction>\
<Window x="0.0" y="0.0" w="$bereik"/>\
<Objects>\
<Point name="A" n="1" fixed="true"  showname="true" large="true" x="$x1" y="$y1" shape="circle">A </Point>\
<Point name="B" n="2" fixed="true"  showname="true" large="true" x="$x2" y="$y2" shape="circle">B </Point>\
<Point name="C" n="3" fixed="true"  showname="true" large="true" x="$x3" y="$y3" shape="circle">C </Point>\
<Point name="D" n="4" fixed="true"  showname="true" large="true" x="$x4" y="$y4" shape="circle">D </Point>\
<Line name="L1" n="5" fixed="true" type="thin" color="2" from="A" to="B">Line through A and B</Line>\
<Line name="L2" n="6" fixed="true" type="thin" color="5" from="B" to="C">Line through B and C</Line>\
<Line name="L3" n="7" fixed="true" type="thin" color="2" from="C" to="D">Line through C and D</Line>\
<Line name="L4" n="8" fixed="true" type="thin" color="5" from="D" to="A">Line through A and D</Line>\
<Angle name="a1" color="1" n="9" showname="false" showvalue="false" unit="°" large="true" first="D" root="A" second="B" acute="false">Angle B - C - D</Angle>\
<Text name="Text1" n="10" x="$[$x1-$r]" y="$y1+$r">\
$$$$ %a1% ^{o} $$</Text>\
<Polygon name="P1" n="11" color="3"  showname="false" background="true" large="true" point1="A" point2="B" point3="C" point4="D">Polygon A, B, C, D</Polygon>\
</Objects></Construction></CaR>

myname=$wims_nowseconds.zir
!filewrite getfile/$myname $data
myfile=$wims_ref_name?session=$session&cmd=getfile&special_parm=$myname
object$n=<applet codebase="$appletdir" archive="zirkel.jar" code="rene.zirkel.ZirkelApplet.class" WIDTH="$xsize" HEIGHT="$ysize" ALIGN="CENTER"><param name="file" value="$myfile"><param name="color" value="255,255,255"><param name="display4igits" value="2"><param name="angledigits" value="2"><param name="style" value="breaks">$nojava</applet>

answer$n=$h1,$h2,$h1,$h2
!if $R>0
    ss=!record 100 of lang/remarks.$taal
    #@Gegeven zijn de twee parallele blauwe lijnen <font color=blue><em>lijn 1</em> en <em>lijn 2</font></em><br>Ze worden gesneden door twee parallele bruinrode lijnen <font color=darkred><em>lijn 3 en lijn4 </em></font>.<br> De vier lijnen vormen het parallelogram ABCD<br>De buitenhoek in <b>A</b> is $[360-$h1] <sup>o</sup><a onmouseover="return escape('we bedoelen dus de vier <b>binnenhoeken</b> van de parallelogram')";><br>Bereken de <font color=blue><u>hoeken</u></font> van de Parallelogram en vul de tabel in.</a>
    question$n=$ss
    rr=!record 101 of lang/remarks.$taal
    #@<ul><li>De buitenhoek in A is $H<sup>o</sup> en dus de binnenhoek in A is 360<sup>o</sup>-$H<sup>o</sup>=$h1<sup>o</sup> <li>de hoek in B is 180<sup>o</sup>-$h1<sup>o</sup> = $h2<sup>o</sup><li>De hoek in C is gelijk aan de hoek in A en dus $h1<sup>o</sup><li> de hoek in D is gelijk aan B en dus $h2<sup>o</sup></ul><br><a onmouseover="return escape('<img src=$module_dir/gifs/19/1.jpg alt=geen_plaatje>');"><font color=blue>zie plaatje<font></a>
    textanswer$n=$rr
    intext=!record 102 of lang/remarks.$taal
    #@De hoek in A <em>in graden</em>,De hoek in B <em>in graden</em>,De hoek in C <em>in graden</em>,De hoek in D <em>in graden</em> 
    !for p=1 to 4
	inputtext$p=!item $p of $intext	    
    !next p
!endif


#<param name="file" value="Inkreis.zir">
#<param name="style" value="breaks">
#<param name="tools" value="line ray segment circle circle3 fixedcircle parallel plumb move"><param name="options" value="back delete undo showname macro qchoice indicate draw rename">
#
#<param name="movefixname" value="true">
#<param name="font" value="">
#<param name="editdigits" value="7">
#<param name="displaydigits" value="5">
#<param name="angledigits" value="0">
