diff --git a/BFAS.cpp b/BFAS.cpp
index 915f629..fb4074a 100644
--- a/BFAS.cpp
+++ b/BFAS.cpp
@@ -144,7 +144,94 @@ void paint() {
 	}
 }
 
+std::vector<point*> badapple_white_points;
+std::vector<point*> badapple_color_points;
+bool badapple_set_up = false;
 void detect_shapes() {
+	if(!badapple_set_up) {
+		badapple_set_up = true;
+
+		point* pa = point_RS.get(); pa->x = 0;    pa->y = 0;    pa->use_count = 0;
+		point* pb = point_RS.get(); pb->x = cmax; pb->y = 0;    pb->use_count = 0;
+		point* pc = point_RS.get(); pc->x = cmax; pc->y = cmax; pc->use_count = 0;
+		point* pd = point_RS.get(); pd->x = 0;    pd->y = cmax; pd->use_count = 0;
+		point_QT.insert(pa); point_QT.insert(pb); point_QT.insert(pc); point_QT.insert(pd);
+
+		bezier* ba = bezier_RS.get();
+		ba->a1 = pa; ba->h1 = pa; pa->add_to(ba); pa->add_to(ba);
+		ba->a2 = pb; ba->h2 = pb; pb->add_to(ba); pb->add_to(ba);
+		bezier_QT.insert(ba);
+
+		bezier* bb = bezier_RS.get();
+		bb->a1 = pb; bb->h1 = pb; pb->add_to(bb); pb->add_to(bb);
+		bb->a2 = pc; bb->h2 = pc; pc->add_to(bb); pc->add_to(bb);
+		bezier_QT.insert(bb);
+
+		bezier* bc = bezier_RS.get();
+		bc->a1 = pc; bc->h1 = pc; pc->add_to(bc); pc->add_to(bc);
+		bc->a2 = pd; bc->h2 = pd; pd->add_to(bc); pd->add_to(bc);
+		bezier_QT.insert(bc);
+
+		bezier* bd = bezier_RS.get();
+		bd->a1 = pd; bd->h1 = pd; pd->add_to(bd); pd->add_to(bd);
+		bd->a2 = pa; bd->h2 = pa; pa->add_to(bd); pa->add_to(bd);
+		bezier_QT.insert(bd);
+
+		detect_shapes();
+		Shape::apply_adds();
+
+		Shape* shape = (*shapes.begin()).second;
+		for(int i = 0; i < 4; i++) {
+			point* p = point_RS.get();
+			p->x = (i == 0 || i == 3) ? 0 : cmax;
+			p->y = (i == 0 || i == 1) ? 0 : cmax;
+			shape->color_coords.push_front(p);
+			shape->colors.push_front(1);
+			shape->colors.push_front(1);
+			shape->colors.push_front(1);
+			shape->colors.push_front(1);
+			shape->color_count++;
+		}
+		int n = 20;
+		for(int i = 0; i < 2*n; i++) {
+			bool white = i < n;
+			if(white) continue;
+			point* p = point_RS.get();
+			shape->color_coords.push_front(p);
+			if(white) badapple_white_points.push_back(p);
+			else      badapple_color_points.push_back(p);
+			float h = (white) ? 1 : std::fmod((i-n)*((std::sqrt(5)-1)/2), 1);
+			float s = (white) ? 1 : 1.00;
+			float l = (white) ? 1 : 0.70;
+			float c = (1-std::abs(2*l-1))*s;
+			float m = l-c/2;
+			float x = c*(1-std::abs(std::fmod(h*6, 2)-1));
+			float r = \
+				(h*360 <  60) ? c+m :
+				(h*360 < 120) ? x+m :
+				(h*360 < 240) ?   m :
+				(h*360 < 300) ? x+m :
+				(h*360 < 360) ? c+m : m;
+			float g = \
+				(h*360 <  60) ? x+m :
+				(h*360 < 180) ? c+m :
+				(h*360 < 240) ? x+m : m;
+			float b = \
+				(h*360 < 120) ?   m :
+				(h*360 < 180) ? x+m :
+				(h*360 < 300) ? c+m :
+				(h*360 < 360) ? x+m : m;
+			shape->colors.push_front(1);
+			shape->colors.push_front(b);
+			shape->colors.push_front(g);
+			shape->colors.push_front(r);
+			shape->color_count++;
+		}
+		shape->color_update = true;
+
+		return;
+	}
+	else if(shapes.begin() != shapes.end()) (*shapes.begin()).second->color_update = true;
 	// TODO: not sure if this should be the whole canvas or just the screen for shape detection or not - make it a setting?
 	// TODO: (in regards to lots of graphics objects being created and destroyed while zooming)
 	QuadTree<bezier>::Region region = bezier_QT.region(state.tl, state.br);
diff --git a/UI/main.cpp b/UI/main.cpp
index c3deed0..65d6311 100644
--- a/UI/main.cpp
+++ b/UI/main.cpp
@@ -3,7 +3,9 @@
 #include <QOpenGLFunctions>
 #include <QOpenGLShaderProgram>
 #include <cstring>
+#include <sstream>
 #include <stdlib.h>
+#include <unistd.h>
 #include "color_picker.h"
 #include "main.h"
 #include "settings.h"
@@ -51,15 +53,17 @@ void render(const char* const path) {
 	canvas->update();
 }
 
+extern std::vector<point*> badapple_white_points;
+extern std::vector<point*> badapple_color_points;
 void Canvas::paintGL() {
 	QOpenGLFunctions* f = context()->functions();
 	GLint old_fbo;
 	QOpenGLFramebufferObject* fbo = NULL;
 	if(render_path != NULL) {
 		context()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, &old_fbo);
-		fbo = new QOpenGLFramebufferObject(8*settings.ratio_width, 8*settings.ratio_height);
+		fbo = new QOpenGLFramebufferObject(4*settings.ratio_width, 4*settings.ratio_height);
 		fbo->bind();
-		f->glViewport(0, 0, 8*settings.ratio_width, 8*settings.ratio_height);
+		f->glViewport(0, 0, 4*settings.ratio_width, 4*settings.ratio_height);
 	}
 	program->bind();
 	f->glClear(GL_COLOR_BUFFER_BIT);
@@ -102,6 +106,33 @@ void Canvas::paintGL() {
 	if(repaint_later) {
 		repaint_later = false;
 		repaint();
+		return;
+	}
+	if(render_path == NULL) {
+		std::cout << "DONE" << std::endl;
+		std::string line;
+		int white_i = 0;
+		int color_i = 0;
+		while(std::getline(std::cin, line)) {
+			if(line.rfind("Point", 0) == 0) {
+				bool white = line.find("white") != std::string::npos;
+				if(white) continue;
+				std::stringstream numbers{line.substr(line.find_last_not_of("0123456789. ")+2)};
+				float x, y;
+				numbers >> x; numbers >> y;
+				point coords = point((int)round((x*3/4+0.125)*cmax), (int)round((y*3/4+0.125)*cmax));
+				if(white) *badapple_white_points[white_i++] = coords;
+				else      *badapple_color_points[color_i++] = coords;
+			}
+			if(line == "FRAME") {
+				::render("/dev/shm/BFAS-out.png");
+				break;
+			}
+			if(line == "END") std::exit(0);
+		}
+	}
+	else {
+		repaint();
 	}
 }
 
diff --git a/UI/main.h b/UI/main.h
index bb24f58..562f9fb 100644
--- a/UI/main.h
+++ b/UI/main.h
@@ -21,8 +21,8 @@ class Canvas : public QOpenGLWidget {
 	Q_OBJECT
 public:
 	Canvas(QWidget* parent = NULL) : QOpenGLWidget(parent) {
-		w = width();
-		h = height();
+		w = (4*1444)/3;
+		h = (4*1080)/3;
 		painter = new QPainter();
 		pixels = new QImage(w, h, QImage::Format_ARGB32);
 		setMouseTracking(true);
diff --git a/settings.h b/settings.h
index b8cd73d..88ed971 100644
--- a/settings.h
+++ b/settings.h
@@ -7,8 +7,8 @@ struct Settings {
 	bool enable_voronoi = false;
 	bool enable_influenced = false;
 	bool enable_fireworks = false;
-	unsigned int ratio_width = 1;
-	unsigned int ratio_height = 1;
+	unsigned int ratio_width = (4*1444)/3;
+	unsigned int ratio_height = (4*1080)/3;
 };
 extern Settings settings;
 #endif
