14 if (count($a) != 3) die (
"Wrong number of elements in array a");
15 if (count(
$x) != 2) die (
"Wrong number of elements in array x");
21 $sdx = $s * (
$x[0] - $ox);
22 $sdy = $s * (
$x[1] - $oy);
24 return ($sdx * $sdx) + ($sdy * $sdy);
45 if (count($a) != 3) die (
"Wrong number of elements in array a");
46 if (count(
$x) != 2) die (
"Wrong number of elements in array x");
47 if ($a_k < 3) die (
"a_k=".$a_k);
61 return 2.*$s*($dx*$dx + $dy*$dy);
89 for ($r = -2; $r <= 2; ++$r) {
90 for ($c = -2; $c <= 2; ++$c) {
93 $y[$i] = $this->
val(
$x[$i], $a);
94 print(
"Quad ".$c.
",".$r.
" -> ".
$y[$i].
"<br />");
101 $qx =
new Matrix(
$x);
105 $qy =
new Matrix(
$y, $npts);