-
Notifications
You must be signed in to change notification settings - Fork 17
Homework Shiffman Wednesday 1
A big part of learning at ITP is learning from each other. So share your work and in exchange you'll get to see everyone else's!
- Do the assignment.
- Contribute a question.
- Post documentation in the form of a blog post. Ideally something visual, some written thoughts, and code. If you are struggling with your sketch and can't get things to work, you should feel free to put your energy into writing about what didn't work (and vent any frustrations!).
- Final project presentations are Wednesday, December 6th. In class presentations will be approximately 7 minutes each, I will be strict about the time.
- Please post your final project documentation to a web page (blog post is fine) and link next to your name below. This is due Friday, December 15.
- It's up to you to figure out how to best document your project, here are some loose guidelines if you aren't sure what to include.
- Title
- Brief written description
- Visual Documentation: sketch running online, images, video, etc.
- References: links to related projects, code samples, etc.
- Source code (please cite your sources in the code comments)
- This is the arbitrary randomized order, please shuffle your names as you wish.
- If you are presenting outside of room 15, please indicate below.
- Ella & Ivy - blog post
- Gabriel -blog post
- Ayal - blog post
- Anita - blog post, sketch
- Kellee - site
- Ellen - blog post
- Kai Present at the lounge. Blog
- Ilana - blog post
- BREAK
- Chelsea-- blog
- MH-- blog 'n' videos
- Keerthana - blog post
- Elizabeth - blog post with video, online game, and code on github
- Roland - blog post, github-repo, video-walkthrough
- Chengtao - blog post
- Yang - Blog Posts
The testing will follow a speed "round robin" format. The class will be divided into two groups and we'll do two rounds. For each round half the students will set up on a laptop in the class room and the other half will "view" or "interact with" or "listen to" your project for ~5-7 minutes. We'll rotate so that all "testers" will try each project and provide feedback.
It's up to you to design your "user testing". It can mean something different for each project. For a game, it's pretty obvious what to do. For a physical installation or performance or sound piece, this will be more difficult. The "rule" that we will try to adhere to is no explaining of the project until after the user has viewed/interacted.
If you are not sure how to design your testing, e-mail me or come and see me and we'll discuss.
MH, Ilana, Anita, Gabriel, Chengtao, Ayal, Keerthana, Elizabeth
Roland, Kellee, Ella & Chelsea,Ivy, Yang, Ellen, Kai
- Course evaluations
Final projects are a creative idea inspired by the concepts in this class. There is no requirement to use a particular aspect of programming. The idea and your enjoyment and interest in the idea is what counts. Some things to remember.
- Keeping things simple and small in scope is a plus. If your project idea is a big one, consider documenting the larger idea but implementing just a small piece of it.
- Also think about making a final project for a small audience, even one single person like a family member or friend. . . or yourself. This can be a good way to focus your idea and design process. "Generalizing" the idea can come later (or maybe not at all.)
- Final projects can be collaborations with anyone in any class.
- Final projects can be one part of a larger project integrated with Physical Computing or another class.
- Final Project Proposals: a few minutes of slides, sketches...something to ILLUSTRATE what's in your head.
- Collect inspirations: How did you become interested in this idea? quotes, photographs, products, projects, people, music, political events, social ills.
- Collect source material: drawings, images, videos, sounds, text
- Collect code: your own sketches and/or other people's sketches.
- Collect ideas for title
- Collect ideas for 1-sentence description?
- Context? Who's it for? How will people experience it? Is it interactive? Is it practical? Is it for fun? Is it emotional? Is it to provoke something?
-
Collect questions for your classmates.
- What are you unsure of? Conceptually and technically.
- Plan to present your idea in ~2-3 minutes leaving about 5 minutes for discussion. You can present your idea however you like visually, but make sure you also document your thoughts in a blog post linked below.
- Keerthana - Blog Post
- Gabriel
- Ivy -blog post
- Ella - blog post
- Elizabeth - blog post
- Ayal - Błog , sketch
- Ellen - blog post
- Kai - BLOG
- Roland - project outline
- MH - mood board
- Kellee - Blog
- Chengtao - My project
- Ilana -
- Anita -my post
- Chelsea - my post
- Yang - My Concept - Small Sketch
Here's another mini trial run for a final project. Just like last week, all students should complete the assignment but only 1/2 will present in class.
- Create a sketch that uses external media (sound or video). Some ideas are:
- Make something responsive to microphone input.
- Create a "photobooth" with augmented snapshots from a camera.
- Create a "painting" system that colors pixels according to camera input or a video.
- Create a blog post documenting your work. Also include links to other projects that serve as references, inspiration, or deal with similar ideas as your piece.
- Resources
- Chapter 7 in Getting Started with p5.js.
- p5.js sound tutorials
- p5.js video and pixels tutorials
- p5.sound reference
- Video/capture: p5.MediaElement reference
- Computer Vision Tutorials in Processing squint and it's the same as p5.js.
- kinectron instructions
- Video
- Sound
- getUserMedia does not work on iOS 11 Safari: asks for camera access, then displays black screen / using latest p5 Version 0.5.16 (Roland)
All students should complete the assignments for this week only ~ half of you will present. Names in bold are assigned presenters, but anyone is welcome to show also. This is informal!
- Gabriel -sketch03,sketch button
- Kellee - sketch
- Ilana - code, sketch
- Chengtao - sketch1, sketch2
- Yang - Codes - Sketch;
- MH - data+three.js
- Ella -Fullscreen, Sketch, Blog
- Keerthana - sketch
- Chelsea - sketch, blog
- Ayal - Skêtch, Blœg
- Elizabeth - video, post
- Ivy -
- Roland - sketch fullscreen, sketch, blog
- Anita -
- Kai-Che -
- Ellen - video, post, sketch
Start thinking about and doing some mini trial runs for a final project. They can be small sketches that form a tiny component of a larger idea. All students should complete the assignments for this week and next but only 1/2 will present each week.
-
Create a sketch that uses an external data source. Plan to present in class using the classroom computer or your own laptop if you prefer. Here are some ideas:
- Track personal data over the course of a few days (exercise, sleep, computer use, eating, etc.). Enter the data manually into a JSON file and visualize the results.
- Count word frequencies in two different text sources (i.e. two different authors, two different newspapers, two different political speeches) and visualize the results.
- Use weather data to affect elements in a sketch.
- Gather data from a google spreadsheet and use in a sketch.
- Here's a list of other data sources you might investigate and try.
- If you are interested in maps, check out ITP 2nd year Cris's Mappa p5.js library.
-
Create a blog post documenting your work and process. Include links to other projects that serve as references and inspiration for your work.
-
READ AND WATCH (whatever is helpful to you):
- Videos about Data and APIs
- Videos about word counting and text analysis - videos are from the A to Z class and include some materials out of scope of our class.
- Getting Started with p5.js - chapter 12
- Tutorial about data 1
- Tutorial about data 2 - these notes are from the A to Z class and include some materials out of scope of our class.
- Art and the API, Jer Thorp
- The Anxieties of Big Data, Kate Crawford
- JSON Basics
- JSON from Corpora
- Weather Data
- Giphy API
- Wordnik API
- NYTimes
- ITP Project Finder API
- Wikipedia API
- More Data Examples from A2Z
Questions (example questions)
- Need API-inspiration? Check the public-APIs Git (Roland)
- In my code I'm still a little unclear on how the term data defined in the function gotData(). It looks like it's not defined anywhere on its own. Is it part of p5.js or the JSON function? -Elizabeth
- How to load only one field from the data file (pre-load is taking too long) ? - Ayal
- How to make the map stay at fixed point rather than moving and how to crop out and use only a certain region? Anita
- How to use the new mapbox? The image either load too long ? (Ella)
- My button is not working at all😭😭😭, I wish people can search meteor by the mass..Maybe I did something wrong made it not working at all..(Ivy)
- How can I get rid of the cross-origin error when copying it from local server to web-editor / remote server?(Roland)
- In my project, I need to reload a table every minute. My problem is, if I try to access it before the reloading is done, an error will occur. Is there any way I can know when the reloading is done?(Yang)
- Having hard time dealing with the order of images and texts generated from api, because text always loading faster than image. Need a good method or mindset solve these kind of problem.
All students should complete the assignments for this week and next but only 1/2 will present each week. Names in bold are assigned presenters, but anyone is welcome to show also. This is informal and you can switch too!
- Elizabeth - Sketch, Blog
- Gabriel -
- Ivy -sketch,blog
- Roland -sketch, blog
- Anita -sketch, blog
- Kai-Che -sketch
- Ellen - Sketch, Fullscreen, Fullscreen2, Post
- Kellee -
- Ilana -
- Chengtao -
- Yang -
- MH -
- Ella -
- Keerthana -
- Chelsea -
- Ayal - The Sketch, Blog
- Tutorial: Intro to HTML and CSS
- Tutorial: Beyond the Canvas in P5
- p5.js DOM library videos
- Chapter 13 in Getting Started with P5.js
- p5.js dom reference
- CSS reference
- Also, here is the page about serial.
- Create a sketch with one or more of the following. Feel free to add DOM elements to a previous sketch.
- Pre-defined HTML Elements
- Pre-defined CSS Styles
- HTML Elements generated by your p5 sketch
- Some kind of mouse interaction with an HTML Element using a callback function you write.
- If you are feeling ambitious, try replacing a DOM element with a "physical sensor!"
- Questions you might ask yourself while working on the above.
- When does it make sense define HTML elements in
index.html
? - When does it make sense to "generate" HTML elements with code in p5?
- When does it make sense to apply styles in code with the
style()
function vs. predefined styles instyle.css
?
- When does it make sense define HTML elements in
- Next week we will look at working with data and APIs in class. If you feel so inclined you can take a look at some of the video tutorials in advance. Please add a link to a data set or "API" that interests you. You don't have to know anything about how to use it, but having a list of examples we can examine in class next week will add to the discussion. You can also contribute to this wiki list of data sources.
- EXAMPLE CODE
- DOM library videos accompanying code
- GSWP5 Chapter 13
- Optional quiz to test your knowledge
- editor examples
- in-class code
Questions (example questions)
- I would like to identify a user with a unique ID, store this on a server, then communicate an action via serial to a physical output assigned to that ID. How can I get this user ID in p5? (Roland)
- Is there a good way to organize files and sketches when we are implementing serial communications to p5? (Chengtao)
- webcams.travel & sunrise sunset times (Ellen)
- Interested in museum APIs [Elizabeth]
- NYC Public Toilet Database or just generally NYC Open Databases (MH)
- Film festivals submissions aka Desperate film students data
- NASA Earth Polychromatic Imaging Camera(Roland)
- Ellen - My Sketch, Blog Post
- Elizabeth - My Sketch - I worked on serial, will be using DOM this coming week! Blog Post
- Kellee - My Sketch -> still needs work, Blog Post
- Ayal - Sketch of Mine, Blog Possstt
- Ivy - My Sketch,blog post
- Chengtao - My Sketch, Failed Sketch, Blog Post
- MH -
- Keerthana -
- Chelsea - my sketch
- Kai-Che - my sketch
- Gabriel - my sketch,Blog
- Yang - Sketch About DOM ,and Another project combining Pcomp and ICM;
- Anita -Sketch, still working on it, blog
- Roland - very simple DADA sketch, PComp-ICM project using serial, blog-post
- Ella - Sketch,Blog Post
- Ilana - My Sketch - I worked on serial, will be using DOM this coming week! [Blog Post]
- Object Video tutorials:
- Intro to ES6 OOP
- Writing a Class
- Constructor Arguments
- More videos about objects coming soon. . .
- Array Video tutorials:
- What is an array?
- Arrays and loops
- Arrays of objects
- More videos about arrays coming soon. . .
- Learning Processing Chapter 8 on Objects translated to p5
- Next week we'll be covering the p5.js DOM library. If you want to get a head start take a look at
- Videos 7.1-7.16
- p5.dom section of Chapter 13 in Getting Started with P5.js
- Tutorial: Beyond the Canvas in P5
- Design a sketch in an object-oriented fashion. Follow these steps and see how far you get (even just doing the first couple steps is ok!)
- Write a class with a constructor function and generate one single object.
- Put one or more functions in the class function and call them on the object.
- Try making two objects without an array. Can you make them different?
- Duplicate the object using an array and make as many as you like!
In the end the goal is to have code in draw()
that only makes calls to objects. Something like:
function draw() {
background(0);
// A single object
apple.chop();
// Another object
orange.peel();
// Calling a function on all of the objects in an array
for (var i = 0; i < grapes.length; i++) {
grapes[i].pluck();
}
}
- Code from videos
- examples (in editor)
- Optional quiz to test your knowledge
Questions (example questions)
- Is it possible to create sub-classes in classes or re-use elements from one class in multiple various global classes? (Roland)
- Ellen - My Sketch, Blog Post
- Ivy - My Sketch
- Chengtao - My Sketch, Blog Post
- MH - Ver 3, ver 4, ver 5
- Keerthana -
- Chelsea - my sketch full screen my sketch code blog post
- Kai-Che my sketch
- Ayal - Sketch of mine
- Gabriel -
- Kellee -
- Elizabeth - needs work
- Yang - Space Dodge Refined using Class
- Anita -my sketch, blog post
- Roland - single object, multiple objects, blog post
- Ella - my sketch, blog post
- Ilana - my sketch, blog post
-
The idea this week is to explore re-organizing your code. It is 100% legitimate to turn in a version of a previous assignment where nothing changes for the end user, but the code has been restructured. You may, however, choose to try a new experiment from scratch. Aim to keep
setup()
anddraw()
as clean as possible, and do everything (all calculations, drawing, etc.) in functions that you create yourself. Possibilities (choose one or more):- Break code out of
setup()
anddraw()
into functions. - Use a function to draw a complex design (like this) multiple times with different arguments.
- Write a function to that returns the result of a mathematical operation that you need to do several times in your code.
- Break code out of
-
An optional quiz to test your knowledge if you like.
-
READ / WATCH (Nothing required, read or watch what you find most helpful)
-
Videos 5.1-5.4 cover functions. If you want to get started on what we'll discuss next week, you can't just yet! There are a 6.x series of videos about objects, but I'm making new tutorials this Friday with something called
classes
. Last year, I emphasized "JavaScript object literals" and the "JavaScript Constructor function" for making objects, but this is no longer the current way to do object-oriented programming in JS. I'll discuss more about this in class.
-
Videos 5.1-5.4 cover functions. If you want to get started on what we'll discuss next week, you can't just yet! There are a 6.x series of videos about objects, but I'm making new tutorials this Friday with something called
-
Examples
- p5.js editor
Questions (example questions)
- Can I do a function within a function? Oh really? How?, Ayal
- I found creating my own function simplify everything, except when drawing a line many times over within a face. Any advice on drawing a line? Also, is there a way to change the size of something by percentage or ratio? Or does resizing multiple instances of something get easier with objects? - Elizabeth
- How to draw recursion of triangle? I tried couple times but no luck:( there's no settled point of a triangle. --Ivy
- Chengtao - Blog Post,Reorganized, My Sketch2
- MH - My Sketch, Blog Post
- Ellen - My Sketch, Blog Post
- Keerthana
- Chelsea - (http://alpha.editor.p5js.org/Chelsea-chenchen/sketches/B1kCM__oZ)
- Kai-Che
- Ayal - My Sketch, Blog Post
- Gabriel - My Sketch, Blog Post
- Kellee - My Sketch, Blog Post
- Elizabeth - My Sketch, Blog Post
- Yang - Dodge Game ADVANCE!!!!!!!, Play in Full Screen;
- Anita sketch, my blog
- Roland sketch simple, original sketch, blog-post;
- Ella - My Sketch, Blog Post;
- Ilana
- Ivy -[My Sketch] (http://alpha.editor.p5js.org/xmhany/sketches/ryQT4g13Z); Blog Post;
- In general this week, you should work with rule-based animation, motion, and interaction. You can use the ideas below or invent your own assignment. Start by working in pairs as specified below. Can you divide an idea into two parts and combine those parts? Can you swap sketches and riff of of your partner's work? You can post together or break off and complete the assignment individually.
- Try making a rollover, button, or slider from scratch. Compare your code to the examples below. Later we'll look at how this compare to interface elements we'll get for free from the browser.
- Create an algorithmic design with simple parameters. (One example is 10PRINT, see: 10PRINT example.
- Tie the above two together and have an interface element control the visual design or behavior of other elements in your sketch.
- Try this quiz if you want to test your knowledge.
- Videos 3.1-4.2 cover conditionals and loops.
- For a preview of next week 5.1-5.4 cover functions.
- Getting Started with p5.js chapters 9-10
- from class:
- Motion
- GUI
- Examples for Videos
- Getting Started with p5 Examples Chapters 9-10
- Learning Processing examples ported to p5.js Chapters 7-8
Questions (example questions)
- question, name (if you don't mind!)
- Can I give rectangles a name and control them like a independent element, not by parameter and declaration of variable? (or should I just writee in the HTML doc?) - Kai
- What's the tips to plan a organized and clean code?(knowing how many variables or what kind functions I need before I start to write?) - Kai
- How do you confine a behavior to a certain space on the canvas? I'd like to do that twice in my code, especially so that Kellee and I can put her circle de#to the picture frame of my living room. - Elizabeth
- (Solved)Hi this is Yang, in our code, line 22-23 & line 38-39, I met some troubles. The thing is, I defined a class which is a slider, and at line 22 & 23 I created two new instances("sliderJ" & "sliderD") of this slider, to control two different variables("jitter" & "distance"), then I give those variables their own value of slider. However, "jitter" always get the value of "sliderD" which I didn't give it! This doesn't make sense. But I think it would cost too much time debugging on class, maybe I can seek your help after class.
- (Solved)Hi, it's Yang and Yang again. In the 10PRINT, how come the bricks are drawn one by one? I didn't see codes like "frameRate % something". What causes the delay?
- Is it possible to update the background at two different speeds / frequencies? (Roland)
- Chengtao, MH -- our sketch
- Ellen, Keerthana -- our sketch, Ellen blog post
- Chelsea, Kai-Che, (and Yang Yang) --our sketch, Chelsea's blog post
- Ayal, Gabriel Ayal's original, Ayal's remix Gabriel, Ayal's post. Gabriel's original
- Kellee, Elizabeth -- sketch, You can see our progress in this separate sketch, Elizabeth blog post, Kellee's blog post
- Yang, Anita our sketch,our sketch2
- Roland, Ella linear sketch, 80s version, Roland's blog post
- Ilana, Ivy --our sketch,[Ivy's blog post]--(https://wp.nyu.edu/ivycookiemonster/2017/09/27/205/)
- REVIEW - If you haven't already...
- Variables videos 2.1-2.3 and 1st half of Chapter 4 of Getting Started with p5 (up to Example 4-5).
-
map()
andrandom()
videos 2.4 - 2.5
- DO:
- Create a sketch that includes (all of these):
- One element controlled by the mouse.
- One element that changes over time, independently of the mouse.
- One element that is different every time you run the sketch.
- (You can choose to build off of your week 1 design, but I might suggest starting over and working with one or two simple shapes in order to emphasize practicing with variables. See if you can eliminate all (or as much as you can) hard-coded numbers from the sketch.)
- If you are struggling for an idea, take a look at this clock assignment from Golan Levin's CMU course as well as this video tutorial on making a clock in p5.
- Here is an optional "take-home" quiz to test your knowledge.
- Create a sketch that includes (all of these):
- READ AND WATCH:
- EXAMPLE CODE:
- random painting
- mouse controlled painting
- moving circle
- arc example
- background fade
- accompanying video code
- Learning Processing Examples: chp03-06
- Getting Started with p5 Examples: 04, 05, 06, 08.
- Animation examples from ICM 2015
Questions | Examples
- At the end of Video 3.4 on boolean variables you talk about changing the state of a program (example: on = !on). If there's time, can we clarify what is happening in the video example, please? (Ellen)
- How to do a random function that can output only a few options?(Ayal)
- In my sketch, I used the map() function for the change of day and night. But how to make the stars only appear at night and then faded at the daytime while I move the mouse?(Ivy)
- How can I make the running text background run smoothly and without any space between each letter? Why some texts cover on the top of others now? I typed (copied+pasted) all those texts line by line, is there any easier way to finish that work? Why the speed of my flowing text background became super slow after I click my mouse? How to make the fuzzy purple thing on P5.JS? (Chelsea)
- Is it possible to group several objects and move it while I drag my mouse? (Ella)
- How can I make a group of lines move together? (Anita)
- Daniel Shiffman -- [blog post](url to blog), zoog -- any other comments
- Chengtao -- blog post, my sketch1, my sketch2
- Ellen -- blog post, my sketch
- Chelsea --my sketch, Blog Post
- Ayal --my sketch, Blog Post
- Kellee -- blog posts, sketch one, sketch two
- Yang -- my sketch, Blog Post
- Roland -- my sketch, blog post
- Ilana -- my sketch
- Ivy -- My Sketch, blog post
- Ella --blog post,My Sketch
- Anita -- ICM week 2, flashing lights-press me
- Elizabeth --my blog post, my sketch
- Gabriel --
- Kai-Che -- my sketch,[my blog]not yet done :P
- Keerthana -- my blog, MySketch
- MH --
-
SET UP:
- # for a p5.js web editor account
- # for the ITP ICM Google Group
- # for our ICM Section's Announcement List
- # for a Github Account. You need it to edit this wiki page.
-
DO:
- Here is an optional "take-home" quiz to test your knowledge. We'll be releasing one of these each week for self-study. We'll discuss answers next week in class.
- Create your own screen drawing: self-portrait, alien, monster, etc. Use 2D primitive shapes –
arc()
,curve()
,ellipse()
,line()
,point()
,quad()
,rect()
,triangle()
– and basic color functions –background()
,colorMode()
,fill()
,noFill()
,noStroke()
,stroke()
. Remember to usecreateCanvas()
to specify the dimensions of your window and wrap all of your code inside asetup()
function. Here's a sample example: Zoog - Write a blog post about how computation applies to your interests. This could be a subject you've studied, a job you've worked, a personal hobby, or a cause you care about. What projects do you imagine making this term? What projects do you love? (Review and contribute to the ICM Inspiration Wiki page. In the same post (or a new one), document the process of creating your sketches. What pitfalls did you run into? What could you not figure out how to do? How was the experience of using the web editor? Did you post any issues to github?
-
READ AND WATCH:
- Videos 1.1 - 1.3 -- note these were recorded last year and reference the desktop editor which we are no longer using this semester.
- After you do your homework, watch 2.1 - 2.3 to preview next week's discussion.
- If the YouTube ads / format bother you, please contact daniel.shiffman@nyu.edu for a link to a shared google drive folder.
- If you prefer books, I suggest Chapters 1-3 of Getting Started with p5.js. If you are logged into the NYU network you can read it for free.
-
ASK QUESTIONS: Contribute at least 1 question below.
Questions | Examples
- Perhaps an easy one: I had trouble with colorMode() and instead used color(). - Elizabeth
- Is there an easy way to make a nice pattern like this one? -- Chelsea
- Daniel Shiffman -- [blog post](url to blog), zoog -- any other comments
- NAME -- my blog, my sketch
- YANG YANG -- my blog, my sketch
- Chelsea Chen Chen -- my blog, my sketch
- Roland Arnoldt -- my blog, my sketch
- Ilana Bonder -- my blog, my sketch
- Chengtao Yi -- my blog, my sketch
- Danxiaomeng Huang -- my blog, my sketch
- Ella Chung -- my blog, my sketch
- Anita Mbabazi-- my blog, my sketch
- Ayal Rosenberg-- my blog, my sketch
- Ellen Nickles-- my blog, my sketch1, my sketch2
- Elizabeth Ferguson-- my blog posts, my sketch
- Kellee Massey-- my blog posts, my sketch
- Gabriel Brasil-- my blog posts, my sketch
- Kai-Che Hung-- my blog posts,my sketch
- Keerthana Pareddy-- my blog, my sketch
- MH. Rahmani-- my blog, my sketch