Learning Code 1

ysfpc:

Last week, I talked to Zach about my desire to learn Processing/P5/OF, and he gave me homework as below:

  1. draw your name using code (not using fonts, just using geometry) 
  2. take a letter of the alphabet (that’s made of straight lines such as H,T,A) draw it as a series of lines.  Can you parameterize any part of the drawing so that you can define the bounding box of the letter (ie, define the x,y,width and height) and it draws to fit the box ? 
  3. use a for loop to make an interesting pattern with geometry.
  4. create a function for the letter you’ve made (above) and use a for loop to draw this letter multiple times with different settings.
  5. use a for loop inside of a for loop to draw a grid- create a composition which animates using variables that change over time.

What I did for 1 and 4 (sort of…):

image

Code History


image

Code History

  • Version 1 on Gist
    Zach’s feedback: can you pass in width and height as well (and draw ys that change in width and height as well as x/y)
  • Version 2 on Gist (see image below): after some trials, I made the width and height of Ys increase by 10px for each line.
image

Reblogged from @ysfpc. Going to attempt these challenges myself. Nice work, Yeseul!

Written on September 22, 2016