112
edits
Changes
TriForce
,→Assignment 1: Julia Set
|-
|
/** * Julia.cpp * Vincent Terpstra * Feb 18 / 2019 * Functions to display a Mandlebrot set */
#include <iostream> #include <math.h> #include "Bitmap.h"
#define MAXCYCLES 1000 #define ITER 1 #define PI 3.14159
void calcJulia(int* array, int width, int height, float jR, float jI); void createBMP(int* array, int width, int height);
int main(int size, const char ** args) { int height = (size > 1) ? atoi(args[1]) : 1000; int width = height / 2 * 3;
float delta = 2 / (float)height;
float x, y = -1;
y += delta;
}
}
struct Pix {
float val;
int r, g, b;
Pix(float val, int r, int g, int b) :
val(val), r(r), g(g), b(b) {}
};
bool lerp(float clr, Pix& first, Pix& second, Bitmap & map);
/** * createBMP * maps the values in the array to a .bmp file * linear interpolates between color values */ void createBMP(int * array, int width, int height){
static int idx = 0;
char name[] = "julia000.bmp";
lerp(clr, clr2, clr3, map);
}
}
/** * Function to linearly interpolate color values and draw to the Bitmap */ bool lerp(float clr, Pix& first, Pix& second, Bitmap & map){
if(clr <= second.val){
float diff = (clr - first.val) / (second.val - first.val);
}
return false;
}
|}
To view the full c++ code [https://github.com/vincent-terpstra/julia-sets github link]