top of page
Search

Haiku Generator Sketch

  • Writer: Kimberly Agosto
    Kimberly Agosto
  • Dec 7, 2018
  • 1 min read

For this sketch I didn't exactly follow the rules of a haiku however I did make it a poem (of some sort) and added interactivity. I decided to create a button, which I had to do using the p5 DOM library, and in this button you would enter your name.


If nothing was put in the field, and the user pressed the button, then this screen would pop up:


But if you put in a name correctly, the name would be shown in the poem in the appropriate spot. For example:


I also used multiple arrays (three) for the three lines of the "poem". I made separate arrays so that the same string would not be chosen twice. A problem I had on this sketch was my inability to add a slider that allowed my sketch's background to change colors. It kept on interfering with the button functionality and I couldn't figure it out.

code: https://editor.p5js.org/kimagosto/sketches/rk06dwj0Q

 
 
 

Recent Posts

See All
My game!

Link to my game: https://editor.p5js.org/kimagosto/sketches/f2JnXUJU8 In my game I created a spaceship that has to avoid the incoming...

 
 
 
Creating Data Summary Tables

January 27, 2019 Data summary tables are a good idea because they concisely present data in an aesthetic manner that is easy to read....

 
 
 

Comments


bottom of page