Commit a85459c4 authored by Bate's avatar Bate

Test galaxy

parent 2462a83a
......@@ -369,8 +369,8 @@ class galaxy
list( $center_x, $center_y, $sum_tense ) = $req->get_row();
new requete($this->dbrw,"UPDATE galaxy_star a,
(SELECT a.id_star AS id_a, b.id_star AS id_b,
SUM(b.sum_tense_star * (a.x_star - b.x_star)/(POW(a.x_star - b.x_star,2) + POW(a.y_star - b.y_star, 2))) AS ax,
SUM(b.sum_tense_star * (a.y_star - b.y_star)/(POW(a.x_star - b.x_star,2) + POW(a.y_star - b.y_star, 2))) AS ay
SUM(b.sum_tense_star * (a.x_star - b.x_star)/POW((POW(a.x_star - b.x_star,2) + POW(a.y_star - b.y_star, 2)),2)) AS ax,
SUM(b.sum_tense_star * (a.y_star - b.y_star)/POW((POW(a.x_star - b.x_star,2) + POW(a.y_star - b.y_star, 2)),2)) AS ay
FROM galaxy_star AS a, galaxy_star AS b
WHERE b.x_star < a.x_star + 1 AND b.x_star > a.x_star - 1
AND b.y_star < a.y_star + 1 AND b.y_star > a.y_star - 1
......
......@@ -24,7 +24,7 @@ $galaxy = new galaxy($site->db,$site->dbrw);
$galaxy->update();
for($i=0;$i<45;$i++) // Environs 1100 cycles/jours
for($i=0;$i<5;$i++) // Environs 1100 cycles/jours
$galaxy->cycle();
$galaxy->mini_render($topdir."data/img/mini_galaxy.png");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment