Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //External header includes
- #include "pixelColor.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- #define PI 3.141592653589793
- #define EXP 2.718281828
- //The following functions determine the intensity of colours for each pixel
- //based on the value of steps. RED, GREEN and BLUE (RGB) are used to determine
- //the colour for any given pixel in the set.
- //http://localhost:1917/X-0.5705_Y0.562_Z17.bmp
- unsigned char stepsToRed (int steps){
- unsigned char red = '0';
- //red = fmod(rand(),steps);
- red = fmod(PI,steps);
- //red = steps;
- return red;
- }
- unsigned char stepsToBlue (int steps){
- unsigned char blue = 0;
- //blue = pow(rand(),steps);
- blue = pow(EXP,steps);
- //blue = steps; // Snowflakes galaxy
- return blue;
- }
- unsigned char stepsToGreen (int steps){
- unsigned char green = 0;
- //green = rand()*tan(steps)
- green = tan(steps);
- //green = steps;
- return green;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement