n=$teller
bewerking=bewerking4.proc
!if $graad=0
    R=$teller
!else
    R=$graad
!endif 
!if $printbaar=0
    white=white
!else
    white=magenta
!endif 
###
    nivo_title=Determine the formula of a straight line by slope and point
    A=!randitem A,B,C,D,E,F,G,S,W
    B=!randitem H,K,L,M,N,P,R,T,V
    pm=!randitem +,-
    letter1=x
    letter2=y
    letter3=!randitem f,g,h,k,p,t
    !if $R=1 or $R=2
        m=!randitem 1,2,3,-3,-2,-1
        q=!randitem 1,2,3,4
        X1=!randitem -6,-5,-4,-3,-2,-1,1,2,3,4,5,6
        Y1=$[$m*$X1 $pm $q]
    !endif
    !if $R=3 or $R=4
        m=!randitem 2,1,1/2,1/4,1/8,1/10,3/2,2,-1,-1/2,-1/4,-1/8,-1/10,-3/2,-2
        q=!randitem 1,2,3,4,5,6,7
        X1=!randitem -6,-5,-4,-3,-2,-1,1,2,3,4,5,6
        Y1=$[$m*$X1 $pm $q]
    !endif
    !if $R>4
        T=!randint 1,100
        N=!randint 2,100
        mp=!randitem -1,1
        N=$[$mp*$N]
        m=$T/$N
        q=!randitem 1,2,3,4,5,6,7
        X1=!randitem -6,-5,-4,-3,-2,-1,1,2,3,4,5,6
        Y1=$[$m*$X1 $pm $q]	
    !endif    
    
    y1=!exec pari printtex($m*$X1 $pm $q)
    rc=!exec pari printtex($m)
    somtekst$n=Determine the formula of the line <em>$letter3</em> with <em>slope</em>=$m<br>\
    and through point <em>$A</em> with <em>x,y</em>-co&ouml;rdinates ($X1:$Y1) 
    
    opgave$n=$letter3 :\rightarrow \left\{ \begin{array}{c}$A \left($X1 : $y1\right)\\\\rc = $rc \end{array}\right.
    lijn=!exec pari $m*$letter1 $pm $q
    GOED$n= $letter2=$lijn
    ggg=!htmlmath $(GOED$n)
    
    antwoord$n=$(somtekst$n)<p>The line through point $A and slope=$m ,has the formula:<br><center> $ggg 
    
    !if $PLAATJE=1
	y11=$[abs(-8*$m)]
	y22=$[abs(8*$m)]
	
	!if $y11 > $y22
	    YRANGE=$[-1*$y11 - 4],$[$y11 + 4]
	    YAS=$y11
	!else
	    YRANGE=$[-1*$y22 - 4],$[$y22 + 4]
	    YAS=$y22
	!endif         
	XSIZE=400
	YSIZE=400
	knipperen=1
	aantal_beeldjes=2
	plaatje$n=$XSIZE,$YSIZE\
	transparent $white\
	xrange -10,10\
	yrange $YRANGE\
	linewidth 1\
	vline 0,0,blue\
	hline 0,0,blue\
	linewidth 3\
	curve red,$lijn\
	linewidth s*20\
	point  $X1,$Y1,green\
	text black,$X1,$Y1,huge,point $A\
	text black,8,-0.3,huge,x-axis\
	textup black,-0.8,$YAS,huge,y-axis\
	text black,0.2,-0.2,normal,O
    !endif
