n=$teller
bewerking=bewerking5.proc
nivo_title=Bekijk de formule<br>En klik op het goede plaatje
#soort2 is vwo
a=!randitem 1,2,3,4
rc=!shuffle 1/2,2/3,1/3,3/4,3/5,4/5,5/3,2/3,3/4,3/2,2,7/4,5/4

!if $soort=2
    U=Y,EINDWAARDE,EINDWAARDE,UITWAARDE,UIT,UITKOMST,UITVOER,RESULTAAT,OUTPUT,YWAARDE
    G=X,STARTWAARDE,BEGINWAARDE,INWAARDE,IN,BEGINWAARDE,INVOER,INPUT,INPUT,XWAARDE
    getal=!randitem 1,2,3,4,5,6,7,8,9
!else
    U=Kosten,Afstand,Hoogte,h,Hoogte,uitkomst
    G=Tijd,Tijd,t,t,tijd,getal
    getal=!randitem 1,2,3,4,5,6
!endif
!if $negatief=1
    XRANGE=-10:10
    YRANGE=-10:10
    !for p=1 to 4
	pm=!randitem +,-
	mp=!randitem -,
	m=!item $p of $rc
	ff=!nospace $mp $m*x $pm $a 
    	functies=!append item $ff to $functies
    !next p
    tics=xtics -10,1,10;ytics -10,1,10
!else
    !for p=1 to 4
	pm=!randitem +,-
	m=!item $p of $rc
    	functies=!append item $m*x $pm $a to $functies
    !next p
    XRANGE=-1:10
    YRANGE=-1:10
    tics=xtics 0,1,10;ytics 0,1,10
!endif
argument=!item $getal of $U
varlist=!item $getal of $G
functies=!shuffle $functies
ins_attr=ismap
!for p=1 to 4
    functie$p=!item $p of $functies
    insplot_set=border ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid ; xlabel "$varlist" ; ylabel "$argument" ; $tics
    plaatje$p=[$XRANGE] [$YRANGE] $(functie$p) notitle
!next p

plotsettings$n=$insplot_set
w=!randint 1,4
GOED$n=$w
F=!exec pari printtex($(functie$w))
#F=!replace internal * by \cdot in $(functie$w)
#F=!replace internal + by \\+\\ in $F
#F=!replace internal - by \\-\\ in $F
F=!replace internal x by \\$varlist in $F
opgave$n=$argument\\=\\$F
goede_plaatje$n=$(plaatje$w)

!if $HINT=1
    hint=bereken een gemakkelijk punt op de lijn,<br>\
    bijvoorbeeld kun je vaak heel snel de $argument berekenen als je $varlist=0 stelt...
!endif

