public void generatePicture(){		
		int rule = -1;
		for(int i = 0; i < f.length; i++){
			if(f[i])
				rule = i;
		}
		
		StringBuilder initiator = ft[rule].generationStrings[gens-1];
		double bearing = inDegrees;
		int x1 = rXCoord;
		int y1 = rYCoord;
		int x2;
		int y2;
		double segment = relSegLength/100.0;
		double reduce = 1/Math.pow(ft[rule].scalingFactor, gens);
		double length = segment*reduce;
		
		g2d = image.createGraphics();
		g2d.setColor(Color.WHITE);
		g2d.fillRect(0, 0, 500, 500);
		g2d.setColor(Color.BLACK);		
		
		Stack<PersonTurtle> location = new Stack<PersonTurtle>();
		for(int i = 0; i < initiator.length(); i++){
			
			if(initiator.charAt(i) == 'F'){
				//draw a line from (x1,y1) to (x1-segmentLength, y1+segmentLength)
				x2 = x1 + (int) Math.round(person.getHeight()*length*Math.cos(bearing*Math.PI/180));
				y2 = y1 + (int) Math.round(person.getWidth()*length*Math.sin(bearing*Math.PI/180));

				drawPerson(bearing, x1, y1, length);
				
				x1 = x2;
				y1 = y2;
				
			}
			else if(initiator.charAt(i) == 'f'){
				//updates the x and y coordinates
				x1 += (int) Math.round(person.getHeight()*length*Math.cos(bearing*Math.PI/180));
				y1 += (int) Math.round(person.getWidth()*length*Math.sin(bearing*Math.PI/180));
			}
			else if(initiator.charAt(i) == '+'){
				//turns the turtle left theta degrees
				bearing = bearing + ft[rule].theta;
			}
			else if(initiator.charAt(i) == '-'){
				//turns the turtle right theta degrees
				bearing = bearing - ft[rule].theta;
			}
			else if(initiator.charAt(i) == '['){
				//push's the turtle's x and y coordinates into the stack
				location.push(new PersonTurtle(x1, y1, bearing, length));
			}
			else if(initiator.charAt(i) == ']'){
				//pops the turtle's last x and y coordinates from the stack
				PersonTurtle turtle = (PersonTurtle) location.pop();
				x1 = turtle.x;
				y1 = turtle.y;
				bearing = turtle.bearing;
				length = turtle.length;
			}
			
		}
		g2d.dispose();
		repaint();
	}