include("./head.inc"); ?>
if (isset($anz)):
include("dbfuncs.php3");
if ($con = mysql_connect($dbhost,$dbuser,$dbpass)):
$cmd = "select * from MOV where (anzahl=$anz) order by anzahl,rhou";
if ($result = mysql_db_query($dbname,$cmd,$con)):
?>
The comparison is done with every packing in the database of the same number of spheres like your packing.
One such comparison has two lines. The first line shows the
parameters for a packing in the database and the second line shows the values of your packing
and the rho-Interval for which your packing is denser than the one in the above line.
If the intersection of all intervalls in which your packing is denser is nonempty,
it could be that
you have found a denser packing. The only candidate which has not been considered in this
comparison is the sausage. Good luck...
MOVTablehead();
$cnt = mysql_num_rows($result);
$swt = 1;
while ($row = mysql_fetch_array($result)):
$swt = - $swt;
$id = $row["nummer"];
$anzahl= $row["anzahl"];
$M = $row["M"];
$O = $row["O"];
$V = $row["V"];
$type = $row["TYPE"];
$prttype = $row["printtyp"];
$rhou = $row["rhou"];
$rhoo = $row["rhoo"];
if ($swt == -1):
$bg = "bgcolor=#FFFFDD";
else:
$bg = "bgcolor=#DDDDFF";
endif;
if ($rhoo == -1):
$rhoo="inf";
endif;
MOVTableline2($bg,$id,$anzahl,$M,$O,$V,$type,$rhou,$rhoo,$prttype);
#print "V ist $V
\n";
#print "V-cV: " .$V. " - ". $cV. " = ".($V-$cV)."
\n";
#print "O-cO: " .$O. " - ". $cO. " = ".($O-$cO)."
\n";
#print "M-cM: " .$M. " - ". $cM. " = ".($M-$cM)."
\n";
$M = ($M/$anzahl);
$O = ($O/$anzahl);
$V = ($V/$anzahl);
if ($M == $cM) {
if ($O == $cO) {
if ($V >= $cV) {
$crhou=0;
$crhoo=inf;
# print "1.Fall
\n";
} else {
$crhou=0;
$crhoo=0;
# print "2.Fall
\n";
}
} elseif ($O > $cO) {
$crhou=($cV-$V)/($O-$cO);
$crhoo=inf;
# print "3.Fall
\n";
} else {
$crhou=0;
$crhoo=($cV-$V)/($O-$cO);
# print "4.Fall
\n";
}
} elseif ($M > $cM) {
$D=(($O-$cO)/(2*($M-$cM)));
# print "D = $D
\n";
$D=0 - ($D*$D) + ($V-$cV)/($M-$cM);
# print "D2= $D
\n";
if ($D >= 0) {
$crhou=0;
$crhoo=inf;
# print "5.Fall
\n";
} else {
$crhou=-($O-$cO)/(2*($M-$cM))+sqrt(-$D);
$crhoo=inf;
# print "6.Fall
\n";
}
} else {
$D=(($O-$cO)/(2*($M-$cM)));
# print "D = $D
\n";
$D=0 - ($D*$D) + ($V-$cV)/($M-$cM);
# print "D2= $D
\n";
if ($D >= 0) {
$crhou=0;
$crhoo=0;
# print "7.Fall
\n";
} else {
$crhoo=-($O-$cO)/(2*($M-$cM))+sqrt(-$D);
$crhou=0;
# print "8.Fall
\n";
}
}
print "$anz | $cM | $cO | $cV | yours | $crhou | $crhoo |
\n";
endwhile;
?>
else:
print "No result!
\n";
endif;
else:
print " Konnte Datenbank nicht öffnen
\n";
endif;
else:
endif;
?>
Compare-Request
include("../inc/tail.php3"); ?>