version 1.58, 2011/04/04 15:44:37
|
version 1.59, 2011/04/04 21:06:46
|
Line 381 sub answer_spline_script {
|
Line 381 sub answer_spline_script {
|
if ($order>8) { $order=8; } |
if ($order>8) { $order=8; } |
$Apache::functionplotresponse::counter++; |
$Apache::functionplotresponse::counter++; |
my $label='C'.$Apache::functionplotresponse::counter; |
my $label='C'.$Apache::functionplotresponse::counter; |
|
my $output='document.ggbApplet_'.$id.'.evalCommand("'.$label.'=Spline'.$order.'['; |
|
for (my $i=0;$i<=$#points;$i+=4) { |
|
$output.="($points[$i],$points[$i+1]),($points[$i+2],$points[$i+3]),"; |
|
} |
|
$output=~s/\,$//; |
|
$output.=']");'."\n"; |
|
for (my $i=2; $i<2*$order; $i+=2) { |
|
$output.='document.ggbApplet_'.$id.'.setColor("'.$label.'_'.$i.'",0,170,0);'."\n"; |
|
} |
|
return $output; |
} |
} |
|
|
# |
# |
Line 1246 sub end_functionplotelements {
|
Line 1256 sub end_functionplotelements {
|
$result.=&plot_script($internalid,$func,1,'','00aa00',$xl,$xh,6); |
$result.=&plot_script($internalid,$func,1,'','00aa00',$xl,$xh,6); |
} else { |
} else { |
# This is a spline |
# This is a spline |
$result.=&answer_spline_script(@components); |
$result.=&answer_spline_script($internalid,@components); |
} |
} |
} |
} |
} |
} |