private void render(Graphics g) {

		OpSolution sol = solution;
		g.setColor(Color.black);
		g.fillRect(0, 0, width, height);

		// render the ideal solution
		int y = 0;
		g.setColor(Color.cyan);
		for (Double c : sol.ideal) {
			int x = (int) (c * width);
			g.drawLine(x, y, x, y + 8);
		}
		y+=9;
		
		// render the target samples (normal and flipped)
		for (int i : sol.rankedOrder) {
			if (sol.isTarget[i]) {
				g.setColor(sol.isFlipped[i] ? Color.yellow : Color.green);
				y += 2;
				OpSample s = sol.set.get(i);
				s.flip(sol.isFlipped[i]);
				for (Double c : s) {
					int x = (int) (c * width);
					g.drawLine(x, y, x, y + 1);
				}
			}
		}

		// render noise
		for (int i : sol.rankedOrder) {
			if (!sol.isTarget[i]) {

				g.setColor(Color.red);
				// figure out how to mark flipped
				y += 2;
				for (Double c : sol.set.get(i)) {
					int x = (int) (c * width);
					g.drawLine(x, y, x, y + 1);
				}
			}
		}

		// Draw a white flip line down the middle
		g.setColor(Color.white);
		int x = (int) (0.5 * width);
		g.drawLine(x, 0, x, height);
	}