I'm not sure how you fellows are missing what I'm saying, as the effect I mentioned above have the results. I echo out $maxFrames and several variables for a 8/15 grid and it is always 8 no matter the length I associate to it, and echoing $frame is always 1-8. I am not changing them, I have never changed them. If you notice I supposed about it, but thought it would be a bad idea which was confirmed by kurt.
If you look about 10 lines above where you pasted you will see where I believe what I'm running into is coming from. This is f_user_defined.php which is refrenced from user_defined.php in a require_once. This is not my code.
$maxFrame=$maxPixel;
//$maxTrees=6; // how many tree to draw at one time
$seq_number=0;
$window_array = getWindowArray($minStrand,$maxStrand,$window_degrees);
$include_file = $path . "/$effect_name.inc";
write_user_functon($php_program,$include_file);
ob_start();
echo "include $include_file
\n";
require_once $include_file;
ob_get_clean();
for($frame=1;$frame<=$maxFrame;$frame++)
{
if($frame>5000) exit ("Too many frames in sequence");
$x_dat = $base . "_d_". $frame . ".dat"; // for spirals we will use a dat filename starting "S_" and the tree model
$dat_file[$frame] = $path . "/" . $x_dat;
$dat_file_array[]=$dat_file[$frame];
$fh_dat [$frame]= fopen($dat_file[$frame], 'w') or die("can't open file");
fwrite($fh_dat[$frame],"# " . $dat_file[$frame] . "\n");
for($s=1;$s<=$maxStrand;$s++)
for($p=1;$p<=$maxPixel;$p++)
{
// if(in_array($s,$window_array)) // Is this strand in our window?,
{
$i = array_search($s,$window_array)+1;
srand();
$rgb_val=user_functon($frame,$i,$p,$maxFrame,$maxStrand,$maxPixel,$param1,$param2,$start_color,$end_color);
//echo "user_functon($i,$p,$maxStrand,$maxPixel,$frame,$param1)
\n";
// user_functon(\$frame,\$s,\$p,\$maxFrame,\$maxStrand,\$maxPixel,\$param1,\$param2,$\$start_color,\$end_color)\n\n"));
$string=$user_pixel=0;
$xyz=$tree_xyz[$s][$p];
$seq_number++;
if($rgb_val <> 0)
fwrite($fh_dat[$frame],sprintf ("t1 %4d %4d %9.3f %9.3f %9.3f %d %d %d %d %d\n",$s,$p,$xyz[0],$xyz[1],$xyz[2],$rgb_val,$string, $user_pixel,$strand_pixel[$s][$p][0],$strand_pixel[$s][$p][1],$frame,$seq_number));
}
}
fclose($fh_dat[$frame]);