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 the line between two given points
    A=!randitem A,B,C,D,E
    B=!randitem K,L,M,N
    pm=!randitem +,-
    p=!randitem 1,2,3,4
    letter1=!item $p of g,t,t,x
    letter2=!item $p of u,s,h,y
    letter3=!randitem f,g,h,k,m
    !if $R=1
        m=!randitem 1,2,3,-3,-2,-1
        q=!randitem 1,2,3,4
        X1=!randitem -4,-3,-2,-1
        X2=!randitem 1,2,3,4,5
        Y1=$[$m*$X1 $pm $q]
        Y2=$[$m*$X2 $pm $q]
    !endif
    !if $R=2
        m=!randitem 1,2,3,-3,-2,-1
        q=!randitem 1,2,3,4
        X1=!randitem -6,-5,-4,-3,-2,-1
        X2=!randitem 1,2,3,4,5,6
        Y1=$[$m*$X1 $pm $q]
        Y2=$[$m*$X2 $pm $q]
    !endif
    !if $R>2
        m=!randitem 1,0.5,0.25,0.1,1.5,2,-1,-0.5,-0.25,-0.1,-1.5,-2
        q=!randitem 1,2,3,4,5,6,7
        X1=!randitem -6,-5,-4,-3,-2,-1
        X2=!randitem 1,2,3,4,5,6
        Y1=$[$m*$X1 $pm $q]
        Y2=$[$m*$X2 $pm $q]
    !endif
    somtekst$n=Give the <em>exact</em> formula of the line <em>$letter3</em><br>\
    in a <em>$letter1,$letter2-plane</em> through the next points: <br>\
    <ul><li>Point $A  with <em>$letter1,$letter2</em>-co&ouml;rdinates ($X1:$Y1)</li>\
    <li>Point $B  with <em>$letter1,$letter2</em>-co&ouml;rdinates ($X2:$Y2)</li></ul>
    
    lijn=$m*x $pm $q    
    GOED$n= $letter2=$m*$letter1 $pm $q
    ggg=!htmlmath $(GOED$n)
    antwoord$n=$(somtekst$n)<p>The line through $A ($X1:$Y1) and $B ($X2:$Y2) is:<br><center>$ggg 
    
    !if $PLAATJE=1
	y11=$[abs($Y1)]
	y22=$[abs($Y2)]	
	!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\
	points green,$X1,$Y1,$X2,$Y2\
	text black,$X1,$Y1,huge,point $A\
	text black,$X2,$Y2,huge,point $B\
	text black,8,-0.3,huge,$letter1 -axis\
	textup black,-0.8,$YAS,huge,$letter2 -axis\
	text black,0.2,-0.2,normal,O	
    !endif
