Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

3D SOLAR SYSTEM

Chapter 4

#include<glut.h>

IMPLEMENTATION

#include<stdlib.h>
#include<stdio.h>

#define SunSize 0.34

#define EarthSize 0.17

#define MoonSize 0.09

GLfloat diffuseMaterial[4] = { 1.0, 1.0, 1.0, 1.0 };


/*

earthDaySpeed = 360 yearSpeed


*/

= 30 month Speed

GLfloat sunDay=0.0;

GLfloat earthDay=0.0;

GLfloat moonDay=0.0;
GLfloat year=0.0;

GLfloat month=0.0;

GLfloat sunDaySpeed=3;

GLfloat earthDaySpeed=10;

//any value

GLfloat moonDaySpeed= 50; //any value


GLfloat yearSpeed= 0.3;

GLfloat monthSpeed= 3.6;


void RenderScene(void)
{

IMPLEMENTATION

glPushMatrix();

// Loading The view of the camera:


// -------------------------------

Dept. of CSE, DR.TTIT,KGF

2015-16

You might also like