n=$teller
bewerking=bewerking7.proc
!if $graad=0
    R=$teller
!else
    R=$graad
!endif

!if $taal=nl
    extra=<br><small><em>en wat is handiger: tellen of vermenigvuldigen ?</em></small>
!else
    extra=<br><small><em>and what is easier counting or multiplying?</em></small>
!endif

!if $R=1 or $R=3
    totaal=!recordcnt nivo/tetraeders
    welke=!randint 1,$totaal
    object$n=!record $welke of nivo/tetraeders
    objecten=tetra&euml;ders
    formule=!replace internal .t.obj by $empty in $(object$n)
!endif
!if $R=2 or $R=4
    totaal=!recordcnt nivo/pyramides
    welke=!randint 1,$totaal
    object$n=!record $welke of nivo/pyramides
    objecten=pyramides
    formule=!replace internal .p.obj by $empty in $(object$n)
!endif
!if $R>4
    keuze=!randitem 1,2
    !if $keuze=1
	totaal=!recordcnt nivo/kubussen
	welke=!randint 1,$totaal
	object$n=!record $welke of nivo/kubussen
	!if $taal=nl
	    objecten=kubussen
	!else
	    objecten=cubes
	!endif
	formule=!replace internal .k.obj by $empty in $(object$n)
    !else
	totaal=!recordcnt nivo/klonters
	welke=!randint 1,$totaal
	object$n=!record $welke of nivo/klonters
	!if $taal=nl
	    objecten=kubussen in de "ruimteklont"
	!else
	    objecten=cubes in the lumb
	!endif
	formule=!replace internal .kk.obj by $empty in $(object$n)
	extra=$empty
    !endif
!endif
formule=!replace internal . by * in $formule
formule=!nospace $formule
FORMULE=!replace internal * by &nbsp;&times;&nbsp; in $formule
#object$n=1.1.6.4.obj
GOED$n=$[1*$formule]
!if NaN isin $(GOED$n)
    OPMERKING=$error
    !exit
!endif
!if $taal=nl
    somtekst$n=<b>Kun je het aantal $objecten tellen in deze applet?</b>$extra
    !if $HINT=1
	hint=je kunt met je muis de $objecten laten draaien in de "ruimte"<br>\
	zo kun je ze vaak wat gemakkelijker tellen<br>\
	bijvoorbeeld: stel we tellen 8 $objecten "horizontaal" en 4 knikkers "vertikaal"<br>\
	dan zitten er in dat "vlak" dus 8&times;5 = 32 $objecten<br>\
	Stel we draaien dat vlak een beetje, zodat we "langszij" kunnen kijken en we tellen 5 $objecten "diep"<br>\
	Dan zijn er dus 5 "plakken" van 32 $objecten<br>\
	en dat zin dus in't totaal 5 &times; 32 = 160 $objecten<br>\
	Zijn wij even blij dat we kunnen vermenigvuldigen ;)
    !endif

    nivo_title=Wat is handiger <b>optellen</b> of <b>vermenigvuldigen</b> ???<br>\
    tel en bereken het aantal $objecten
!else
    somtekst$n=<b>Can you find out how many  $objecten there are in this applet ?</b>
    !if $HINT=1
	hint=With you mouse, you can make the $objecten spin in "space"<br>\
	You can turn them around; in a way that you are able to count them easier<br>\
	Ok , let's take an ecample:<br>\
	suppose we count 8 $objecten "horizontal" and 4 $objecten "vertical"<br>\
	in that "plane" we have 8&times;5 = 32 $objecten<br>\
	Ok, let's turn the object in "spece"<br>\
	Let's say we see that the onject is 5 $objecten "deep"<br>\
	So there must be 5 "slices" of 32 $objecten each<br>\
	and that makes a total of 5 &times; 32 = 160 $objecten<br>\
	Are we glad we know how to multiply ;? 
    !endif

    nivo_title=What is easier <b>counting</b> or <b>multiplying</b> ???<br>\
    count and calculate the $objecten

!endif

!if $taal=nl
    applet$n=<applet codebase="$appletdir" archive="ThreeD.jar"  code="ThreeD.class" width="600" height="400">\
    <param name=model value=$module_dir/obj/$(object$n)>$geenjava</applet>

    antwoord$n=In't totaal waren er dus:  $FORMULE =  $(GOED$n) $objecten .<center>\
    <applet codebase="$appletdir" archive="ThreeD.jar"  code="ThreeD.class" width="300" height="300">\
    <param name=model value=$module_dir/obj/$(object$n)>$geenjava</applet>
!else
    applet$n=<applet codebase="$appletdir" archive="ThreeD.jar"  code="ThreeD.class" width="600" height="400">\
    <param name=model value=$module_dir/obj/$(object$n)>$geenjava</applet>

    antwoord$n=In total there were $FORMULE =  $(GOED$n) $objecten .<center>\
    <applet codebase="$appletdir" archive="ThreeD.jar"  code="ThreeD.class" width="300" height="300">\
    <param name=model value=$module_dir/obj/$(object$n)>$geenjava</applet>
!endif

# the copyright of this ThreeD.class & XYZApp.class : Sun microsystems
# I don't distribute it with this module 
# It's included in the java distribution
# you can use my copy thru http://84.83.123.204/applets/ThreeD.jar (a jar with all classes)
# source: http://84.83.123.204/applets/ThreeD.tar.gz 
# or directly from sun
# or http://javaboutique.internet.com/ThreeD/
# or http://javaboutique.internet.com/XYZApp/

# the wavefront-like objectfiles must be on the same server as the applet !!!
# place the applet in a suitable dir, exported as appletdir (see var.init) 

