#list_of_things=['point','line','segment','circle','function','polygon','cone','ellipse','polynomial']
#toolbar=0 , 1 , 10 , 16 , 6
mathview=0
questiontype=4
math=0
n=$counter
inputs=0
checkfile=exos/checkfile2.proc
wordmax=300
maxobjects=100
charmax=300
showToolBar=true
showMenuBar=false
framePossible=false
width=640
height=480
R=$level
!if $level=0
    R=$counter
!endif

ggb=ggb/grid.ggb
customToolBar=" 34 | 10 | 2 | 0 | 6 | 40 | 41 | 42  "   
list_of_things=[ 'circle' , 'line' ];
circles=1
lines=0
question$n=!record 12 of lang/remarks.$taal
textanswer$n=!record 72 of lang/remarks.$taal
!if $R=1
    keuze=!randitem 0,1,1,1,2,2,2
    appletcommand=$empty
    # prefix my_ maakt dat geogebra2wims.js ze niet ook opstuurt
    # GEOGEBRA: lijn  => name @ slope @ constant                                                                                                          
    # GEOGEBRA: lijn  =>  name @ perp @ x=number
    #appletcommand=!append line document.applets[0].evalCommand("$B = ($x,$y)"); to $appletcommand
    #appletcommand=!append line document.applets[0].evalCommand("$name = vector[My_A,$B]"); to $appletcommand
    #appletcommand=!append line document.applets[0].setVisible('$B' , false ); to $appletcommand
    #appletcommand=!append line document.applets[0].setColor('$name',255,0,0); to $appletcommand
    r=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5
    pm=!randitem +,-
	
    !if $keuze=1
	formula$n=\left| z $pm  $b \right| \, = $r
	x=$[-1*($pm $b)]
	answer$n=$x,0,$r
	ell=ellipse $x,0,$r,$r,green
	texanswer$n=\left[ \begin{array}{l} M($x:0) \\ Radius\,\,=\,\,$r \end{array}
    !else	
	!if $keuze=2
	    !if $b=1
		formula$n=\left| z $pm  i \right| \, = $r
	    !else
		formula$n=\left| z $pm  $b \cdot i \right| \, = $r
	    !endif
	    y=$[-1*($pm $b)]
	    answer$n=0,$y,$r
	    ell=ellipse 0,$y,$r,$r,green
	    texanswer$n=\left[ \begin{array}{l} M(0:$y) \\ Radius\,\,=\,\,$r \end{array}
	!else
	    formula$n=\left| z \right| \, = \, $r
	    answer$n=0,0,$r
	    ell=ellipse 0,0,$r,$r,green
	    texanswer$n=\left[ \begin{array}{l} M(0:0) \\ Radius\,\,=\,\,$r \end{array}
	!endif
    !endif
    !if $showanswer=1
	var1=300,300\
	transparant white\
	xrange -10,10\
	yrange -10,10\
	linewidth 1\
	hline 0,0,blue\
	vline 0,0,blue\
	linewidth 2\
	$ell
	
    !endif
 !exit
!endif

!if $R=2
    appletcommand=$empty
    # prefix my_ maakt dat geogebra2wims.js ze niet ook opstuurt
    # GEOGEBRA: lijn  => name @ slope @ constant                                                                                                          
    # GEOGEBRA: lijn  =>  name @ perp @ x=number
    #appletcommand=!append line document.applets[0].evalCommand("$B = ($x,$y)"); to $appletcommand
    #appletcommand=!append line document.applets[0].evalCommand("$name = vector[My_A,$B]"); to $appletcommand
    #appletcommand=!append line document.applets[0].setVisible('$B' , false ); to $appletcommand
    #appletcommand=!append line document.applets[0].setColor('$name',255,0,0); to $appletcommand
    r=!randitem 1,2,3,4,5
    a=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5
    pm=!randitem +,-
    mp=!randitem +,-
    !if $b=1
	formula$n=\left| z $pm  $a $mp  i \right| \, = $r
    !else
	formula$n=\left| z $pm  $a $mp $b \cdot i \right| \, = $r
    !endif
    x=$[-1*($pm $a)]
    y=$[-1*($mp $b)]
    answer$n=$x,$y,$r
    ell=ellipse $x,$y,$r,$r,green
    texanswer$n=\left[ \begin{array}{l} M($x:$y) \\ Radius\,\,=\,\,$r \end{array}

    !if $showanswer=1
	var1=300,300\
	transparant white\
	xrange -10,10\
	yrange -10,10\
	linewidth 1\
	hline 0,0,blue\
	vline 0,0,blue\
	linewidth 2\
	$ell
	
    !endif
 !exit
!endif

!if $R=3
    keuze=!randitem 0,1
    appletcommand=$empty
    # prefix my_ maakt dat geogebra2wims.js ze niet ook opstuurt
    # GEOGEBRA: lijn  => name @ slope @ constant                                                                                                          
    # GEOGEBRA: lijn  =>  name @ perp @ x=number
    #appletcommand=!append line document.applets[0].evalCommand("$B = ($x,$y)"); to $appletcommand
    #appletcommand=!append line document.applets[0].evalCommand("$name = vector[My_A,$B]"); to $appletcommand
    #appletcommand=!append line document.applets[0].setVisible('$B' , false ); to $appletcommand
    #appletcommand=!append line document.applets[0].setColor('$name',255,0,0); to $appletcommand
    r=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5
    !if $keuze=1
	rr=$[$r^2 - $b^2]
	!if $b=1
	    formula$n=z \cdot \overset{-}z - i \cdot  \overset{-}z + i \cdot z \,\,=\,\,  $rr
	!else
	    formula$n=z \cdot \overset{-}z - i \cdot $b \cdot  \overset{-}z + i \cdot $b \cdot z \,\,=\,\,  $rr
	!endif
	answer$n=0,$b,$r
	ell=ellipse 0,$b,$r,$r,green
	texanswer$n=\left[ \begin{array}{l} M(0:$b) \\ Radius\,\,=\,\,$r \end{array}
    !else
	rr=$[$r^2 - $b^2]
	!if $b=1
	    formula$n=z \cdot \overset{-}z - \overset{-}z - z \,\,=\,\,  $rr
	!else
	    formula$n=z \cdot \overset{-}z - $b \cdot  \overset{-}z - $b \cdot z \,\,=\,\,  $rr
	!endif
	answer$n=$b,0,$r
	ell=ellipse $b,0,$r,$r,green
	texanswer$n=\left[ \begin{array}{l} M($b:0) \\ Radius\,\,=\,\,$r \end{array}    
    !endif
        
    !if $showanswer=1
    var1=300,300\
    transparant white\
    xrange -10,10\
    yrange -10,10\
    linewidth 1\
    hline 0,0,blue\
    vline 0,0,blue\
    linewidth 2\
    $ell
	
    !endif

 !exit
!endif

!if $R>3
    keuze=!randitem 0,1
    appletcommand=$empty
    # prefix my_ maakt dat geogebra2wims.js ze niet ook opstuurt
    # GEOGEBRA: lijn  => name @ slope @ constant                                                                                                          
    # GEOGEBRA: lijn  =>  name @ perp @ x=number
    #appletcommand=!append line document.applets[0].evalCommand("$B = ($x,$y)"); to $appletcommand
    #appletcommand=!append line document.applets[0].evalCommand("$name = vector[My_A,$B]"); to $appletcommand
    #appletcommand=!append line document.applets[0].setVisible('$B' , false ); to $appletcommand
    #appletcommand=!append line document.applets[0].setColor('$name',255,0,0); to $appletcommand
    r=!randitem 1,2,3,4,5
    b=!randitem 1,2,3,4,5
    a=!randitem 1,2,3,4,5
    keuze=0
    !if $keuze=1
	rr=$[$r^2 - $b^2]
	!if $b=1
	    formula$n=z \cdot \overset{-}z - \left( $a + i \right) \cdot  \overset{-}z - \left( $a - i \right) \cdot z + $[$a*$a] \,\,=\,\,  $rr
	!else
	    formula$n=z \cdot \overset{-}z - \left( $a + $b \cdot i \right) \cdot  \overset{-}z - \left( $a - $b \cdot i \right) \cdot z + $[$a*$a] \,\,=\,\,  $rr
	!endif
	answer$n=$a,$b,$r
	ell=ellipse $a,$b,$r,$r,green
	texanswer$n=\left[ \begin{array}{l} M($a:$b) \\ Radius\,\,=\,\,$r \end{array}
    !else
	rr=$[$r^2 - $b^2 - $a^2]
	!if $b=1
	    formula$n=z \cdot \overset{-}z + \left( $a -  i \right) \cdot  \overset{-}z + \left( $a + i \right) \cdot z \,\,=\,\, $rr
	!else
	    formula$n=z \cdot \overset{-}z + \left( $a - $b \cdot i \right) \cdot  \overset{-}z + \left( $a + $b \cdot i \right) \cdot z \,\,=\,\, $rr
	!endif
	answer$n=$[-1*$a],$b,$r
	ell=ellipse $[-1*$a],$b,$r,$r,green
	texanswer$n=\left[ \begin{array}{l} M(-$a:$b) \\ Radius\,\,=\,\,$r \end{array}
    !endif
    !if $showanswer=1
    var1=300,300\
    transparant white\
    xrange -10,10\
    yrange -10,10\
    linewidth 1\
    hline 0,0,blue\
    vline 0,0,blue\
    linewidth 2\
    $ell
	
    !endif

 !exit
!endif

