rotation angles
This commit is contained in:
parent
0d8b70f77f
commit
1197e69fa4
16
window.c
16
window.c
@ -179,7 +179,7 @@ void draw(void) {
|
|||||||
rotate(nmv, (a / 224.7f), 0.0f, 1.0f, 0.0f); // orbit mouvement
|
rotate(nmv, (a / 224.7f), 0.0f, 1.0f, 0.0f); // orbit mouvement
|
||||||
translate(nmv, 20.0f, 1.0f, 0.0f);
|
translate(nmv, 20.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f);
|
scale(nmv, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f, (1/113.0f) * 12.0f);
|
||||||
rotate(nmv, (a / 243.75f), 0.0f, -1.0f, 0.0f); // rotation anti-clockwise
|
rotate(nmv, (a / 243.75f), 0.1773f, -1.0f, 0.0f); // rotation anti-clockwise
|
||||||
transform_n_raster(_planet[1], nmv, projMat);
|
transform_n_raster(_planet[1], nmv, projMat);
|
||||||
|
|
||||||
// EARTH
|
// EARTH
|
||||||
@ -187,7 +187,7 @@ void draw(void) {
|
|||||||
rotate(nmv, (a / 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, (a / 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 30.0f, 1.0f, 0.0f);
|
translate(nmv, 30.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f);
|
scale(nmv, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f, (1/108.0f) * 12.0f);
|
||||||
rotate(nmv, a, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a, 0.234f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[2], nmv, projMat);
|
transform_n_raster(_planet[2], nmv, projMat);
|
||||||
|
|
||||||
// MARS
|
// MARS
|
||||||
@ -195,7 +195,7 @@ void draw(void) {
|
|||||||
rotate(nmv, (a / 686.98f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, (a / 686.98f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 50.0f, 1.0f, 0.0f);
|
translate(nmv, 50.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f);
|
scale(nmv, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f, (1/208.0f) * 12.0f);
|
||||||
rotate(nmv, 1.0416f * a, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, 1.0416f * a, 0.252f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[3], nmv, projMat);
|
transform_n_raster(_planet[3], nmv, projMat);
|
||||||
|
|
||||||
// JUPITER
|
// JUPITER
|
||||||
@ -203,7 +203,7 @@ void draw(void) {
|
|||||||
rotate(nmv, a / (12 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / (12 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 70.0f, 1.0f, 0.0f);
|
translate(nmv, 70.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f);
|
scale(nmv, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f, (1/9.7f) * 12.0f);
|
||||||
rotate(nmv, a / 0.416f, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / 0.416f, 0.031f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[4], nmv, projMat);
|
transform_n_raster(_planet[4], nmv, projMat);
|
||||||
|
|
||||||
// SATURN
|
// SATURN
|
||||||
@ -211,7 +211,7 @@ void draw(void) {
|
|||||||
rotate(nmv, a / (30 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / (30 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 90.0f, 1.0f, 0.0f);
|
translate(nmv, 90.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f);
|
scale(nmv, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f, (1/11.4f) * 12.0f);
|
||||||
rotate(nmv, a / 0.4583f, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / 0.4583f, 0.267f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[5], nmv, projMat);
|
transform_n_raster(_planet[5], nmv, projMat);
|
||||||
|
|
||||||
// URANUS
|
// URANUS
|
||||||
@ -219,7 +219,7 @@ void draw(void) {
|
|||||||
rotate(nmv, a / (84 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / (84 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 110.0f, 1.0f, 0.0f);
|
translate(nmv, 110.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f);
|
scale(nmv, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f, (1/26.8f) * 12.0f);
|
||||||
rotate(nmv, a / 0.7083f, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / 0.7083f, 0.978f, 0.0f, 0.0f);
|
||||||
transform_n_raster(_planet[6], nmv, projMat);
|
transform_n_raster(_planet[6], nmv, projMat);
|
||||||
|
|
||||||
// NEPTUNE
|
// NEPTUNE
|
||||||
@ -227,7 +227,7 @@ void draw(void) {
|
|||||||
rotate(nmv, a / (165 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / (165 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 130.0f, 1.0f, 0.0f);
|
translate(nmv, 130.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f);
|
scale(nmv, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f, (1/27.7f) * 12.0f);
|
||||||
rotate(nmv, a / 0.6f, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / 0.6f, 0.283f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[7], nmv, projMat);
|
transform_n_raster(_planet[7], nmv, projMat);
|
||||||
|
|
||||||
// PLUTO
|
// PLUTO
|
||||||
@ -235,7 +235,7 @@ void draw(void) {
|
|||||||
rotate(nmv, a / (248 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / (248 * 365.2425f), 0.0f, 1.0f, 0.0f);
|
||||||
translate(nmv, 150.0f, 1.0f, 0.0f);
|
translate(nmv, 150.0f, 1.0f, 0.0f);
|
||||||
scale(nmv, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f);
|
scale(nmv, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f, (1/500.0f) * 12.0f);
|
||||||
rotate(nmv, a / 6.4, 0.0f, 1.0f, 0.0f);
|
rotate(nmv, a / 6.4, 0.119f, 1.0f, 0.0f);
|
||||||
transform_n_raster(_planet[8], nmv, projMat);
|
transform_n_raster(_planet[8], nmv, projMat);
|
||||||
|
|
||||||
/* déclarer qu'on a changé (en bas niveau) des pixels du screen */
|
/* déclarer qu'on a changé (en bas niveau) des pixels du screen */
|
||||||
|
Loading…
Reference in New Issue
Block a user