checkfile=exos/checkfile1.proc
mathviewpanel=$module_title :x=:y=:and:or:sqrt()
n=$counter
math=0
plot=1
draw=0
questiontype=0
#@ Bepaal <b>alle</b> asymptoten van de onderstaande functie
ex1=!record 3 of lang/remarks.$taal
#@ Zie </a> voor de schrijfwijze de help pagina's
ex2=!record 23 of lang/remarks.$taal
helptext=<a onmouseover="this.T_WIDTH='100';this.T_HEIGHT='100';this.T_BORDERCOLOR='gold';this.T_BORDERWIDTH='1'; return escape('$ex2')">$ex1

vertikaal=!record 4 of lang/remarks.$taal
#@ De vertikale asymptoot is: de lijn
vertikalen=!record 5 of lang/remarks.$taal
#@ De vertikale asymptoten zijn de lijnen
question$n=!record 18 of lang/remarks.$taal
!if $teaching=1 and $image=0
    #@ Bepaal in $m_RR <b>alle</b> asymptoten van de onderstaande periodieke functie<br>geef je antwoord op in een generieke vorm. 
    exotext=!record 6 of lang/remarks.$taal
    #@ Hier</a> staat een klein grafiekje van de functie
    #exotext=<a href="javascript:showimage();">$exotext
    exotext=<a onmouseover="return escape('<img src=$wims_ref_name?&session=$session&module=$module&cmd=getins&special_parm=insert-1.gif>')"><font color=blue>$exotext</font>
!else
    exotext=$empty
!endif

prefix=size 0.6,0.6;grid ; xlabel "<x-axis>";ylabel"<y-axis>" ;border
!if $level=0
    R=$counter
!else
    R=$level
!endif        
!if $R>0
    wims_rawmath_variables=k,x,pi
    b=!randitem 1,2,3,4,5,6
    c=!randitem 1/2,1,2,3
    d=!randitem 2,3,4
    ymin=$[-1*$d]
    ymax=$d
    plotfunction=$b/($d*sin($c*x))
    formula$n=f(x)\,\,=\,\,\frac{$b}{$d\cdot \sin($c\cdot x)}
    answer$n=k*pi/($c)@special
    !if c=1/2
	texanswer$n=2\cdot k\cdot pi
    !else
	texanswer$n=\frac{k\cdot pi}{$c}
    !endif
    xmin=-6
    xmax=6
    !for p=$xmin to $xmax
	as=$[$p*pi/($c)]
	asline=!append line arrow $p from $as,$ymin to $as1,$ymax nohead lt 4 ; to $asline 
    !next p
    !if $image=1
	xrange=$xmin:$xmax
	yrange=$[4*$ymin]:$[4*$ymax]
	image_settings$n=$prefix ; $asline
    	image$n=[$xrange] [$yrange] $plotfunction notitle lt 1     
    !else
	!if $teaching=1
	    insplot_set=$prefix ; $asline
    	    textanswer$n=$vertikalen <br>x=k*pi/$c
	    xrange=$xmin:$xmax
	    yrange=$[4*$ymin]:$[4*$ymax]
    	    !insplot [$xrange] [$yrange] $plotfunction notitle lt 1     
	!endif
    !endif
    !exit
!endif
