From 2610fa9ebf846492596891ee2430ee572eab00fb Mon Sep 17 00:00:00 2001 From: Volodymyr Patuta Date: Tue, 22 Dec 2020 16:55:56 +0100 Subject: [PATCH] more accurate distance --- window.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/window.c b/window.c index 300ab32..6e014e2 100644 --- a/window.c +++ b/window.c @@ -169,7 +169,7 @@ void draw(void) { // MERCURY memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, (a / 87.97f), 0.0f, 1.0f, 0.0f); // orbit mouvement - translate(nmv, 10.0f, 1.0f, 0.0f); + translate(nmv, 3.9f, 1.0f, 0.0f); scale(nmv, (1/227.0f) * 12.0f, (1/227.0f) * 12.0f, (1/227.0f) * 12.0f); rotate(nmv, (a / 59.0f), 0.0f, 1.0f, 0.0f); // rotation transform_n_raster(_planet[0], nmv, projMat); @@ -177,7 +177,7 @@ void draw(void) { // VENUS memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, (a / 224.7f), 0.0f, 1.0f, 0.0f); // orbit mouvement - translate(nmv, 20.0f, 1.0f, 0.0f); + translate(nmv, 7.9f, 1.0f, 0.0f); scale(nmv, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f); rotate(nmv, (a / 243.75f), 0.1773f, -1.0f, 0.0f); // rotation anti-clockwise transform_n_raster(_planet[1], nmv, projMat); @@ -185,7 +185,7 @@ void draw(void) { // EARTH memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, (a / 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 30.0f, 1.0f, 0.0f); + translate(nmv, 10.0f, 1.0f, 0.0f); scale(nmv, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f); rotate(nmv, a, 0.234f, 1.0f, 0.0f); transform_n_raster(_planet[2], nmv, projMat); @@ -193,15 +193,15 @@ void draw(void) { // MARS memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, (a / 686.98f), 0.0f, 1.0f, 0.0f); - translate(nmv, 50.0f, 1.0f, 0.0f); + translate(nmv, 15.2f, 1.0f, 0.0f); scale(nmv, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f); - rotate(nmv, 1.0416f * a, 0.252f, 1.0f, 0.0f); + rotate(nmv, a / 1.0416f, 0.252f, 1.0f, 0.0f); transform_n_raster(_planet[3], nmv, projMat); // JUPITER memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, a / (12 * 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 70.0f, 1.0f, 0.0f); + translate(nmv, 52.0f, 1.0f, 0.0f); scale(nmv, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f); rotate(nmv, a / 0.416f, 0.031f, 1.0f, 0.0f); transform_n_raster(_planet[4], nmv, projMat); @@ -209,7 +209,7 @@ void draw(void) { // SATURN memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, a / (30 * 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 90.0f, 1.0f, 0.0f); + translate(nmv, 95.4f, 1.0f, 0.0f); scale(nmv, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f); rotate(nmv, a / 0.4583f, 0.267f, 1.0f, 0.0f); transform_n_raster(_planet[5], nmv, projMat); @@ -217,7 +217,7 @@ void draw(void) { // URANUS memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, a / (84 * 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 110.0f, 1.0f, 0.0f); + translate(nmv, 192.0f, 1.0f, 0.0f); scale(nmv, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f); rotate(nmv, a / 0.7083f, 0.978f, 0.0f, 0.0f); transform_n_raster(_planet[6], nmv, projMat); @@ -225,7 +225,7 @@ void draw(void) { // NEPTUNE memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, a / (165 * 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 130.0f, 1.0f, 0.0f); + translate(nmv, 301.0f, 1.0f, 0.0f); scale(nmv, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f); rotate(nmv, a / 0.6f, 0.283f, 1.0f, 0.0f); transform_n_raster(_planet[7], nmv, projMat); @@ -233,7 +233,7 @@ void draw(void) { // PLUTO memcpy(nmv, mvMat, sizeof nmv); /* copie mvMat dans nmv */ rotate(nmv, a / (248 * 365.2425f), 0.0f, 1.0f, 0.0f); - translate(nmv, 150.0f, 1.0f, 0.0f); + translate(nmv, 394.0f, 1.0f, 0.0f); scale(nmv, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f); rotate(nmv, a / 6.4, 0.119f, 1.0f, 0.0f); transform_n_raster(_planet[8], nmv, projMat);