WEEK: 6
Active: February 14th - February 20th
Work Due: February 21st @ 9:00AM

HW 6
Algorithmic Sketch

Algorithmic art is that which creates itself through algorithms dictating the process and details of an emergent work. These works will leverage mathematical functions, randomness, logic, and in recent years complex machine-learning & decision making.

TODO: Read the “algorithmic art” article on wikipedia.

Specification

Unlike your previous p5 homework projects, where you explicitly coded each shape, you are to create an algorithmic sketch this week. This algorithmic sketch should leverage the draw {} function to create an evolving, algorithmic sketch.

This sketch should;

  • Use ‘global’ variables (variables declared outside of setup{} and draw{}) which, are re-assigned every iteration of the draw loop.

    • The global variables can change in relationship to themselves,
    • or to other variables.
    • at least one of these variables, should be an object. (var myObj = {})
  • Devise algorithms with math operators and functions to dictate these evolving relationships (i.e. you should write an algorithm that creates an artwork over time).

    • You might consider using any of the math functions listed under the “math” section on the p5 reference page. You are expected to use at least two of the following functions.

      • abs()
      • ceil()
      • ceil()
      • constrain()
      • floor()
      • pow()
      • round()
      • sq()
      • sqrt()
    • This is in addition to the standard math operators. You are expected to use each of the following at least once.

      • Addition/Subtraction (+, -)
      • Multiplication (*)
      • Division (/) (remember to avoid divide by 0 errors)
      • Modulo (%)
  • Use at least one random number generator (random()).
  • Use at the map function at least once (map()).

Suggestions

You will likely want to avoid calling the background() function in the draw{} loop, as this will overwrite your evolving work. Instead, set it in setup().

Submission

These will be submited, along with a markdown readme describing your week and work as links to the HW 6 Submission Forum.

Example

As an example, here is an algorithmic sketch I created, sticking to the same spec as above.

The goal of this sketch is to create a slowly evolving sketch, that is reminiscent of smoke wafting.

[ Code Download ] [ View on GitHub ] [ Live Example ]

Previous section:
Next section: