!set n=$teller
bewerking=bewerking3.proc
bereik=$[$teller*36]
A=!randint 1,$bereik
MAX_GRADEN=$[$bereik*15]
graden=$[$A*15]
MAX_SIN=$[pi*$bereik*15/180]
GOED$n=$graden,$[sin(pi*$graden/180)]
radialen=$[pi*$graden/180]

!if $teller isin 1,3,5
    !if $taal=nl
	weg=afgelegde weg in graden
	somtekst$n=Gegeven de (eenheids) cirkel.<br>\
	Een punt P loopt vanaf het startpunt, tegen de wijzers van de klok in, over de rand van de eenheidscirkel.<br>\
	Rechts is het verloop van de hoogte-positie van dit punt uitgezet tegen de afgelegde hoek.<br>\
	Na $graden <sup>o</sup> stop ons punt P.<br>\
	Klik op het punt van de <em>sinus-vormige</em> grafiek dat overeenkomt met stop-positie van punt P op de cirkel.<br>
	nivo_title=De eenheidscirkel & de sinuso&iuml;de,<br>klik op het goede punt.
	antwoord$n=Het goede antwoord is dus:\
	<ul><li>de x-waarde is $graden<sup>o</sup></li>\
	<li>de y-waarde is <em>sin</em>($graden<sup>o</sup>) = $[sin(pi*$graden/180)]</li></ul>
	!if $HINT=1
	    hint=Algemene Hint:<br>\
	    Een cirkel is 360<sup>o</sup><br>\
	    Zoals je kunt tellen is de schaalverdeling om de 15<sup>o</sup> aangebracht.
	!endif
    !else
	weg=degree axis
	nivo_title=The Unit circle & Degrees.<br>Click on the correct angle.
	somtekst$n=Give the (unit) circle<br>\
	A point P moves counter-clockwise, over the edge of the unic circle.<br>\
	The graph shows the relation of the height position and the degrees of our moving point P<br>\
	Our point stops after $graden<sup>o</sup>.\
	Click on the corresponding point of the graph.<br>
	antwoord$n=The correct answer is:\
	<ul><li>the x-value is $graden <sup>o</sup></li>\
	<li>the y-value is <em>sin</em>($graden<sup>o</sup>) = $[sin(pi*$graden/180)]</li></ul>
	!if $HINT=1
	    hint=hint:<br>\
	    A full circle is 360<sup>o</sup><br>\
	    As you can see there is a scale-division of 15<sup>o</sup>.<br>\
	    Just divide the angle by 15 , count and click
	!endif    
    !endif
!endif
!if $teller isin 2,4,6,7,8
    rad=!exec pari $graden/180
    rad=$rad $m_pi 
    !if $taal=nl
	weg=afgelegde weg in graden
	somtekst$n=Gegeven de (eenheids) cirkel<br>\
	Een punt P loopt vanaf het startpunt, tegen de wijzers van de klok in, over de rand van de eenheidscirkel.<br>\
	Rechts is het verloop van de hoogte-positie van dit punt uitgezet tegen de afgelegde hoek.<br>\
	Na $rad radialen stop ons punt P.<br>\
	Klik op het punt van de <em>sinus-vormige</em> grafiek dat overeenkomt met stop-positie van punt P op de cirkel.<br>
	nivo_title=De eenheidscirkel & de sinuso&iuml;de,<br>klik op het goede punt.
	antwoord$n=Het goede antwoord is dus:\
	<ul><li>de x-waarde is $graden<sup>o</sup></li>\
	<li>de y-waarde is <em>sin</em>($graden<sup>o</sup>) = $[sin(pi*$graden/180)]</li></ul>
	!if $HINT=1
	    hint=Algemene Hint:<br>\
	    Een cirkel is 360<sup>o</sup><br>\
	    Zoals je kunt tellen is de schaalverdeling om de 15<sup>o</sup> aangebracht
	!endif
    !else
	weg=degree axis
	nivo_title=The Unit circle & Degrees.<br>Click on the correct angle.
	somtekst$n=Give the (unit) circle<br>\
	A point P moves counter-clockwise, over the edge of the unic circle.<br>\
	The graph shows the relation of the height position and the degrees of our moving point P<br>\
	Our point stops after $rad radians.\
	Click on the corresponding point of the graph.<br>
	antwoord$n=The correct answer is:\
	<ul><li>the x-value is $graden<sup>o</sup></li>\
	<li>the y-value is <em>sin</em>($graden<sup>o</sup>) = $[sin(pi*$graden/180)]</li></ul>
	!if $HINT=1
	    hint=hint:<br>\
	    A full circle is 360<sup>o</sup><br>\
	    As you can see there is a scale-division of 15<sup>o</sup>.<br>\
	    Just divide the angle by 15 , count and click
	!endif    
    !endif
!endif


SCALE=$empty
!for q=0 to 360 step 15
    x=$[cos($q*pi/180)]
    y=$[sin($q*pi/180)]
    SCALE=!append line segment $x,$y,$[0.9*$x],$[0.9*$y],blue to $SCALE
!next q
!for q=0 to 360 step 45
    x=$[cos($q*pi/180)]
    y=$[sin($q*pi/180)]
    SCALE=!append line segment $x,$y,$[0.7*$x],$[0.7*$y],red to $SCALE
!next q

plaatje_a=300,300\
xrange -1,1\
yrange -1,1\
transparent white\
linewidth 1\
fellipse 0,0,1,1,white\
linewidth 3\
$SCALE \
linewidth 10\
point cos($radialen),sin($radialen),red\
text black,0.8*cos($radialen),0.8*sin($radialen),huge,P\
linewidth 3\
arrow 0,0,1,0,15,black\
text black,0.7,0,normal,Start\
text black,-0.05,-0.03,normal,O\
arrow 0,0,cos($radialen),sin($radialen),15,green




plaatje_b=600,300\
xrange 0,$MAX_SIN\
yrange -1,1\
transparent white\
linewidth 2\
vline 0,0,black\
hline 0,0,black\
curve red,sin(x)\
linewidth 1\
dhline 0,1,red\
dhline 0,-1,red\
dhline 0,0.707,red\
dhline 0,-0.707,red\
dhline 0,0.5,blue\
dhline 0,-0.5,blue\
dhline 0,0.259,blue\
dhline 0,-0.259,blue\
dhline 0,0.866,blue\
dhline 0,-0.866,blue\
dhline 0,0.966,blue\
dhline 0,-0.966,blue\
text black,$[0.4*$MAX_SIN],0,huge,$weg\
arrow $[0.4*$MAX_SIN],-0.1,$[0.8*$MAX_SIN],-0.1,15,black


!exit