<commit_before>#include <stdio.h>
#include <string.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <time.h>

#include "GL/glut.h"   // - An interface and windows management library
#include "visuals.h"   // Header file for our OpenGL functions

myModel md;
static float tx = 0.0;
static float ty = 0.0;
static bool animate = true;
static float red = 1.0;
static float green = 0.0;
static float blue = 0.0;
static bool grow = true;
static float shineSize = 50.0;
static float rotx = 0.0, rotx2 = 0.0,rotx3 = 0.0,rotx4 = 0.0;
static float angle = 0.0,angle2 = 0.0,angle3 = 0.0,angle4 = 0.0;
static float anglex = 0.0, angley = 0.0;


Stars starSystem;
Planets planetSystem;

using namespace std;

void createLightSource(float planetSize, float shineInitSize, Point position, Point colour, Light_t l) {
	glPushMatrix();
	glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		glTranslatef(position.x, position.y, position.z);
		glColor4f(colour.x, colour.y, colour.z, 0.8);
		glutSolidSphere(planetSize, 40, 40);
		if (l == SUN) {
	  		glColor4f(colour.x, colour.y+0.2, colour.z, 0.4);
	  		glutSolidSphere(shineInitSize, 40, 40);

	  		glColor4f(colour.x, colour.y+0.2, colour.z, 0.3);
	  		glutSolidSphere(shineInitSize+2, 40, 40);

			glColor4f(colour.x, colour.y+0.2, colour.z, 0.25);
	  		glutSolidSphere(shineInitSize+4, 40, 40);
		
			glColor4f(colour.x, colour.y+0.2, colour.z, 0.3);
	  		glutSolidSphere(shineInitSize+6, 40, 40);
		} else if (l == STAR) {
			glColor4f(colour.x, colour.y+0.2, colour.z, 0.2);
	  		glutSolidSphere(shineInitSize, 40, 40);
		}
	glDisable(GL_BLEND);
	glPopMatrix();
}

void createStars() {
	srand((unsigned) time(NULL));
	starSystem.colour.x = 1; starSystem.colour.y = 1; starSystem.colour.z = 1;
	for (int i = 0 ; i < STARS ; i++) {
		starSystem.starsgrow[i] = true;
		starSystem.starsSize[i] = rand()%2+0.5;
		starSystem.starsShineSize[i] = starSystem.starsSize[i];
		starSystem.starsPosition[i].x = rand()%800-400;
		starSystem.starsPosition[i].y = rand()%800-400;
		starSystem.starsPosition[i].z = -600;
	}
}

void drawStars() {
	for (int i = 0 ; i < STARS ; i++) {<commit_msg>Stars random positions<commit_after>#include <stdio.h>
#include <string.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <time.h>

#include "GL/glut.h"   // - An interface and windows management library
#include "visuals.h"   // Header file for our OpenGL functions

myModel md;
static float tx = 0.0;
static float ty = 0.0;
static bool animate = true;
static float red = 1.0;
static float green = 0.0;
static float blue = 0.0;
static bool grow = true;
static float shineSize = 50.0;
static float rotx = 0.0, rotx2 = 0.0,rotx3 = 0.0,rotx4 = 0.0;
static float angle = 0.0,angle2 = 0.0,angle3 = 0.0,angle4 = 0.0;
static float anglex = 0.0, angley = 0.0;


Stars starSystem;
Planets planetSystem;

using namespace std;

void createLightSource(float planetSize, float shineInitSize, Point position, Point colour, Light_t l) {
	glPushMatrix();
	glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
		glTranslatef(position.x, position.y, position.z);
		glColor4f(colour.x, colour.y, colour.z, 0.8);
		glutSolidSphere(planetSize, 40, 40);
		if (l == SUN) {
	  		glColor4f(colour.x, colour.y+0.2, colour.z, 0.4);
	  		glutSolidSphere(shineInitSize, 40, 40);

	  		glColor4f(colour.x, colour.y+0.2, colour.z, 0.3);
	  		glutSolidSphere(shineInitSize+2, 40, 40);

			glColor4f(colour.x, colour.y+0.2, colour.z, 0.25);
	  		glutSolidSphere(shineInitSize+4, 40, 40);
		
			glColor4f(colour.x, colour.y+0.2, colour.z, 0.3);
	  		glutSolidSphere(shineInitSize+6, 40, 40);
		} else if (l == STAR) {
			glColor4f(colour.x, colour.y+0.2, colour.z, 0.2);
	  		glutSolidSphere(shineInitSize, 40, 40);
		}
	glDisable(GL_BLEND);
	glPopMatrix();
}

void createStars() {
	srand((unsigned) time(NULL));
	starSystem.colour.x = 1; starSystem.colour.y = 1; starSystem.colour.z = 1;
	for (int i = 0 ; i < STARS ; i++) {
		starSystem.starsgrow[i] = true;
		starSystem.starsSize[i] = rand()%2+0.5;
		starSystem.starsShineSize[i] = starSystem.starsSize[i];
		starSystem.starsPosition[i].x = rand()%800-400;
		starSystem.starsPosition[i].y = rand()%800-400;	/* [-400, 400] */
		starSystem.starsPosition[i].z = rand()%400-800; /* [-800, -400] */
	}
}

void drawStars() {
	for (int i = 0 ; i < STARS ; i++) {
{'fraction_non_alphanumeric': 0.15912208504801098, 'fraction_numerical': 0.057384545038866024, 'mean_word_length': 4.040322580645161, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2706542', 'n_tokens_mistral': 2033, 'n_tokens_neox': 1761, 'n_words': 400}