9)){
$fix=3;
}
$sonne=max(2, 0.00465*$halb);
# Parameter:
#$dur0=1;
#$halb=10;
$name[0]="Sonne";
$dur[0]=0;
$exz[0]=0;
$aha[0]=0;
$rp[0]=0;
$name[1]="Merkur";
$dur[1]=0.241*$dur0;
$exz[1]=0.206;
$aha[1]=0.387*$halb;
$rp[1]=1;
$name[2]="Venus";
$dur[2]=0.615*$dur0;
$exz[2]=0.007;
$aha[2]=0.723*$halb;
$rp[2]=1;
$name[3]="Erde";
$dur[3]=$dur0;
$exz[3]=0.017;
$aha[3]=$halb;
$rp[3]=1;
$name[4]="Mars";
$dur[4]=1.881*$dur0;
$exz[4]=0.093;
$aha[4]=1.524*$halb;
$rp[4]=1;
$name[5]="Jupiter";
$dur[5]=11.862*$dur0;
$exz[5]=0.048;
$aha[5]=5.203*$halb;
$rp[5]=14;
$name[6]="Saturn";
$dur[6]=29.458*$dur0;
$exz[6]=0.056;
$aha[6]=9.539*$halb;
$rp[6]=12;
$name[7]="Uranus";
$dur[7]=84.015*$dur0;
$exz[7]=0.047;
$aha[7]=19.182*$halb;
$rp[7]=5;
$name[8]="Neptun";
$dur[8]=164.788*$dur0;
$exz[8]=0.009;
$aha[8]=30.057*$halb;
$rp[8]=5;
$name[9]="Pluto";
$dur[9]=247.7*$dur0;
$exz[9]=0.25;
$aha[9]=39.75*$halb;
$rp[9]=1;
# Anzahl der Animationsstuecke
$anz=35;
# Drehrichtung bzw die Richtung, aus der man guckt
$vorweg_sonne=2*mt_rand(0,1)-1;
# einmalige Drehung fuer alle
$alphaalle=mt_rand(0,359);
for ($i = 1; $i <= 9; $i++) {
# Richtung des Zentrumnaechsten Punktes
if ($i !=$fix){
$alpha[$i]=mt_rand(0,359);
} else {
$alpha[$i]=0;
}
# kleine Hauptachse
$bha[$i]=$aha[$i]*sqrt(1-$exz[$i]*$exz[$i]);
# valuestring
$keyTimes[$i]="";
$values [$i]="";
$einzelpunkte[$i]="";
$invalue="";
if ($fix==0)
{
$values[0]="0 0";
$keyTimes[0]="0;1";
$invalue="0 0";
}
# values berechnen
for ($j = 0; $j <= $anz; $j++) {
$xi=2*M_PI*$j/$anz;
$keyt=min(1,round(($xi - $exz[$i]*sin($xi))/(2*M_PI),5));
$x=round($aha[$i]*(cos($xi) - $exz[$i]),2);
$y=round($vorweg_sonne*$bha[$i]*sin($xi),2);
$weg="$x, $y";
if ($j == $anz) {
$values [$i].="$weg";
$keyTimes[$i] .="$keyt";
} else {
$values[$i] .="$weg; \n";
$keyTimes[$i] .="$keyt; \n";
}
if ($i ==$fix){
$ix=-$x;
$iy=-$y;
$iweg="$ix, $iy";
if ($j == $anz) {
$invalues .="$iweg";
} else {
$invalues .="$iweg; \n";
}
}
$einzelpunkte[$i] .="\n";
}
}
# svg-header senden:
$content="Content-type: image/svg+xml";
header($content);
# xml-Zeile ausgeben
echo "";
# und jetzt das Dokument
?>