• University of Leeds, Woodhouse, Leeds, LS2 9JT, UK
  • +44 (0)113 2431751
  • Mon - fri: 7:00am - 6:00pm

The Housing of the Working-Class Act, 1890

Quarry Hill Unhealthy Area, 1900s

Book of Reference

Creative Coding

      void setup() {
        size(1500, 400);
      }
      void draw() {
        background(255);
        // Set up variables for the graph
        int occupied = 93;
        int unoccupied = 7;
        int barWidth = width / 100;
        // Draw the bars
        for (int i = 0; i < occupied; i++) {
          fill(0, 150, 0);
          rect(i * barWidth, height - 50, barWidth, -300);
        }
        for (int i = 0; i < unoccupied; i++) {
          fill(255, 0, 0);
          rect((occupied + i) * barWidth, height - 50, barWidth, -300);
        }
        // Draw the title
        textAlign(CENTER);
        textSize(24);
        fill(0);
        text("Property’s Occupier Status", width / 2, 40);
        // Draw the labels
        textSize(16);
        fill(0);
        text("Occupied", barWidth * (occupied / 2), height - 20);
        text("Unoccupied", barWidth * (occupied + (unoccupied / 2)), height - 20);
      }
      
    



    void setup() {
      size(1000, 400);
    }
    void draw() {
      background(55);
        // Title
      textAlign(CENTER);
      textSize(32);
      text("Gender Wise Occupiers Status", width/2, 50);
        // Labels
      textAlign(LEFT);
      textSize(16);
      text("Occupiers 93", 5, 100);
      text("Male 68", 20, 200);
      text("Female 25", 20, 300);
        // Bars
      fill(255, 0, 0); // Red for Occupier
      rect(100, 70, 93*2, 30);
        fill(0, 0, 255); // Blue for Male
      rect(100, 170, 68*2, 30);
        fill(0, 255, 0); // Green for Female
      rect(100, 270, 25*2, 30);
      
      // Scale
      stroke(0);
      //line(80, 80, 80, 320); // Vertical line
        for (int i = 0; i <= 10; i++) {
        int x = 80 + i*24;
       // line(80, x, 90, x);
        textAlign(RIGHT);
        //text(i*10, 75, x + 5);
      }
    }
    
    



                      void setup() {
                        size(800, 600);
                        background(255);
                        smooth();
                      }
                      void draw() {
                        background(255);
                        fill(0, 200, 0);
                        textSize(30);
                        text("QUARRY HILL UNHEALTHY AREA, 1900s", 50, 50);
                        drawHouses();
                      }
                      void drawHouses() {
                        int houseCount = 10;
                        int startX = 100;
                        int startY = 100;
                        int padding = 20;
                        int houseWidth = 100;
                        int houseHeight = 80;
                          for (int i = 0; i < houseCount; i++) {
                          int xPos = startX + (i % 5) * (houseWidth + padding);
                          int yPos = startY + (i / 5) * (houseHeight + padding);
                          drawHouse(xPos, yPos, houseWidth, houseHeight);
                        }
                      }
                      void drawHouse(int xPos, int yPos, int width, int height) {
                        stroke(0);
                        fill(200, 100, 50);
                        rect(xPos, yPos, width, height);
                        fill(150, 75, 40);
                        rect(xPos + width / 4, yPos + height / 2, width / 2, height / 2);
                        fill(50, 50, 50);
                        rect(xPos + width / 2, yPos + height / 2, width / 8, height / 2);
                        triangle(xPos, yPos, xPos + width / 2, yPos - height / 2, xPos + width, yPos);
                      }
                      
    
    
                     


    
      void setup() {
        size(800, 600); // set the size of the window
      }
      void draw() {
        background(220); // set the background color to light gray
          // display the text
        textSize(32); // set the size of the text
        fill(0); // set the text color to black
        textAlign(CENTER); // center the text horizontally
        text("QUARRY HILL FLATS", width/2, 50); // display the text
          // draw the houses
        for (int i = 0; i < 5; i++) {
          for (int j = 0; j < 4; j++) {
            int x = 100 + i * 140; // calculate x position of each house
            int y = 100 + j * 120; // calculate y position of each house
            drawHouse(x, y); // call drawHouse function to draw each house
          }
        }
      }
      void drawHouse(int x, int y) {
        // draw the house
        fill(244, 164, 96); // set the fill color to tan
        rect(x, y, 80, 60); // draw the main house rectangle
        triangle(x, y, x + 40, y - 40, x + 80, y); // draw the roof
          // draw the door
        fill(50, 25, 0); // set the fill color to dark brown
        rect(x + 25, y + 30, 30, 30); // draw the door rectangle
        fill(255); // set the fill color to white
        ellipse(x + 40, y + 45, 5, 5); // draw a doorknob
          // draw the windows
        fill(135, 206, 250); // set the fill color to light blue
        rect(x + 10, y + 10, 20, 20); // draw the left window
        rect(x + 50, y + 10, 20, 20); // draw the right window
        stroke(0); // set the stroke color to black
        line(x + 20, y + 10, x + 20, y + 30); // draw the left window divider
        line(x + 60, y + 10, x + 60, y + 30); // draw the right window divider
      }
      
    


void setup() {
                        size(400, 400);
                      }
                      void draw() {
                        background(220, 240, 210);
                          // Draw the house
                        fill(212, 175, 55);
                        stroke(0);
                        rect(150, 200, 100, 100);
                        triangle(150, 200, 200, 150, 250, 200);
                        fill(170, 90, 0);
                        rect(170, 230, 20, 30);
                          // Draw the plus sign
                        stroke(255, 0, 0);
                        strokeWeight(5);
                        line(190, 215, 210, 215);
                        line(200, 205, 200, 225);
                          // Draw the text
                        fill(255, 0, 0);
                        textSize(24);
                        textAlign(CENTER, CENTER);
                        text("QUARRY HILL HOSPITAL 1900s", width/2, 50);
                      }
                      
                      



    
    
      void setup() {
        size(900, 600);
        background(191, 255, 191); // set background color to light green
      }
      void draw() {
        // Draw the factory building
        rectMode(CENTER);
        fill(204, 204, 204); // set fill color to gray
        rect(width/2, height/2, 860, 430); // rectangular building
        // Draw the doors
        fill(128, 64, 0); // set fill color to brown
        int numDoors = 10;
        float doorWidth = 30;
        float doorHeight = 60;
        float doorSpacing = (width - doorWidth*numDoors) / (numDoors + 1); // spacing between doors
        float doorY = height/2 + 150 + doorHeight/2; // y-coordinate of doors
        for (int i = 0; i < numDoors; i++) {
          float doorX = (i+1)*doorSpacing + i*doorWidth + doorWidth/2; // x-coordinate of current door
          rect(doorX, doorY, doorWidth, doorHeight);
        }
        // Draw the windows
        fill(255, 255, 0); // set fill color to yellow
        int numWindows = 20;
        float windowWidth = 20;
        float windowHeight = 30;
        float windowSpacing = (width - windowWidth*numWindows) / (numWindows + 1); // spacing between windows
        float windowY = height/2 - 90 - windowHeight/2; // y-coordinate of windows
        for (int i = 0; i < numWindows; i++) {
          float windowX = (i+1)*windowSpacing + i*windowWidth + windowWidth/2; // x-coordinate of current window
          rect(windowX, windowY, windowWidth, windowHeight);
        }
        // Write the text on the screen
        textAlign(CENTER, CENTER);
        textSize(32);
        fill(0, 155, 0); // set fill color to green
        text("QUARRY HILL FACTORY", width/2, 50);
      }
      
      
    



    
    
      size(600, 400);
    // Set up the background color
    background(150, 200, 255); // light blue
    // Draw the river
    fill(50, 100, 150); // dark blue
    rect(0, height * 0.75, width, height * 0.25); // lower quarter of canvas
    // Draw the house
    fill(100, 75, 50); // brown
    rect(width * 0.25, height * 0.5, width * 0.5, height * 0.25); // center of canvas
    // Draw the roof
    fill(150, 75, 0); // dark orange
    triangle(width * 0.25, height * 0.5, width * 0.75, height * 0.5, width * 0.5, height * 0.25); // top of house
    // Draw the windows
    fill(255); // white
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 5; j++) {
        rect(width * 0.3 + j * 30, height * 0.55 + i * 30, 20, 20); // center of house
      }
    }
    textAlign(CENTER, CENTER);
    fill(0);
    textSize(32);
    text("QUARRY HILL HOUSE", width * 0.5, height * 0.1); // top center of canvas