Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence

Programming
Results will update as you type.
  • Tiling and Repetition
    • Arrays and lists for visual grids
    • Exercises
    • Modifying distribution along width and height
    • Modifying rotation by distribution
    • Modifying scale with distribution
  • Reactors
  • Programming Basics: Parametric and Generative Graphic Design 2016
  • Archive
  • High Scores
  • Artificial Neural Network
  • Alternatives to the Processing IDE
  • p5.js Programming
  • Programming in Processing (java)

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Modifying scale with distribution
    Updated Nov 07, 2017

      Modifying scale with distribution

      Nov 07, 2017

         

        int gridW = 12; int gridH = 12; int border = 60; int stepX = 60; int stepY = 60; float sizeModifier = 1.05; int graphicSize = 30; void setup() { size(800, 800); noStroke(); fill(0); background(255); rectMode(CENTER); float graphicSizeScaled = graphicSize; translate(border, border); for (int i=0; i < gridH; i++) { for (int j = 0; j < gridW; j++) { rect(j * stepX, i * stepY, graphicSizeScaled, graphicSizeScaled); } graphicSizeScaled *= sizeModifier; } }
          {"serverDuration": 35, "requestCorrelationId": "25bbf179ae384d1393e7cabc7ae1a878"}