version 1.59, 2011/04/04 21:06:46
|
version 1.60, 2011/04/04 21:27:30
|
Line 380 sub answer_spline_script {
|
Line 380 sub answer_spline_script {
|
if ($order<2) { $order=2; } |
if ($order<2) { $order=2; } |
if ($order>8) { $order=8; } |
if ($order>8) { $order=8; } |
$Apache::functionplotresponse::counter++; |
$Apache::functionplotresponse::counter++; |
my $label='C'.$Apache::functionplotresponse::counter; |
my $label='CSpline'.$Apache::functionplotresponse::counter; |
my $output='document.ggbApplet_'.$id.'.evalCommand("'.$label.'=Spline'.$order.'['; |
my $output='document.ggbApplet_'.$id.'.evalCommand("'.$label.'=Spline'.$order.'['; |
for (my $i=0;$i<=$#points;$i+=4) { |
for (my $i=0;$i<=$#points;$i+=4) { |
$output.="($points[$i],$points[$i+1]),($points[$i+2],$points[$i+3]),"; |
$output.="($points[$i],$points[$i+1]),($points[$i+2],$points[$i+3]),"; |
Line 390 sub answer_spline_script {
|
Line 390 sub answer_spline_script {
|
for (my $i=2; $i<2*$order; $i+=2) { |
for (my $i=2; $i<2*$order; $i+=2) { |
$output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.$i.'",0,170,0);'."\n"; |
$output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.$i.'",0,170,0);'."\n"; |
} |
} |
|
for (my $i=1; $i<2*$order; $i+=2) { |
|
$output.='document.ggbApplet_'.$id.'.setVisible("'.$label.'_'.$i.'",false);'."\n"; |
|
} |
|
|
return $output; |
return $output; |
} |
} |
|
|