n=$teller
bewerking=bewerking3.proc
a=!randitem 1,2,3,4,5,6
b=!randitem 0.5,1,1.5,2,2.5,3
b1=$[$b+1]
b2=$[$b+2]
b3=$[$b+3]
a1=$[$a+1]
a2=$[$a+2]
a3=$[$a+3]
pm=!randitem +,-
mp=!randitem +,-

!if $soort=2
    U=y,y,y,y,eindwaarde,eindwaarde,uit,uit,uitkomst,uitvoer,resultaat,output
    G=x,x,x,x,startwaarde,beginwaarde,in,in,beginwaarde,invoer,input,input
    getal=!randitem 1,2,3,4,5,6,7,8,9,10,11
    argument=!item $getal of $U
    varlist=!item $getal of $G
    functies=$b*x $pm $a,$b1*x $pm $a1,$b2*x $mp $a2,$b3*x $mp $a3
!else
    U=k,afstand,kosten,afstand,hoogte,h,hoogte,uitkomst
    G=t,tijd,tijd,uren,minuten,seconden,tijd,getal
    #geen "t" doen... geeft problemen.
    getal=!randitem 1,2,3,4,5,6,7,8
    argument=!item $getal of $U
    varlist=!item $getal of $G
    functies=$b*x $pm $a,$b1*x $pm $a1,$b2*x $mp $a2,$b3*x $mp $a3
!endif

XRANGE=-1:10
YRANGE=-1:20
tics=xtics 0,1,10;ytics 0,2,20
ins_attr=ismap
functie$n=!randitem $functies
insplot_set=border ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid ; xlabel "$varlist" ; ylabel "$argument" ; $tics
plotsettings$n=$insplot_set
plaatje$n=[$XRANGE] [$YRANGE] $(functie$n) notitle

!if $negatief=1  
    !for p=-10 to 10 step 4
        F=!replace internal x by $p in $(functie$n)
        table_body$n=!append line <th>$p</th><th>$[$F]</th><tr> to $(table_body$n)
    !next p
!else
    !for p=0 to 10 step 2
        F=!replace internal x by $p in $(functie$n)
        table_body$n=!append line <th>$p</th><th>$[$F]</th><tr> to $(table_body$n)
    !next p
!endif
!for p=-10 to 10 step 2 
    !increase r
    X$r=$p
    Y$r=!evalsubst x=$p in $(functie$n)
!next
#!if $wims_user=supervisor
TUSSEN=!replace internal x by $varlist in $(functie$n)
GOED$n= $argument=$TUSSEN
#!else
#    GOED$n= $argument=$(functie$n)
#!endif
F=!exec pari printtex($(functie$n))
F=!replace internal x by \cdot\\$varlist in $F
opgave$n=$argument\\=\\$F

somtekst$n=<table border="1" width="100%" cellpadding="5">\
<th><font size="+1"><tt>$varlist</tt></font><br><small><em>(de horizontale as)</em></small></th>\
<th><font size="+1"><tt>$argument</tt></font><br><small><em>(de vertikale as)</em></small></th><tr>$(table_body$n)</table>

!if $HINT=1
    hint=Neem de algemene vergelijking<br><font color=$fontcolor3> $argument=richtingsco&euml;fficient*$varlist + constante</font><br>\
    Kies voor $varlist=0  -->  $argument=constante <br>Je weet dus nu de waarde voor de constante<br>\
    Vul nu nu een gemakkelijk getal uit de tabel in...<br>\
    Daaruit volgt dan : richtingsco&euml;fficient=($argument - constante)/$varlist <br>\
    Je weet dus nu het functie voorschrift<br>\
    <small>het plaatje heb je dus niet nodig</small>
!endif    
        
nivo_title=Bepaal de relatie tussen <font size=+1>$argument en $varlist</font>

