Homework Dave 02 - ITPNYU/ICM-2024-Code GitHub Wiki
ICM Code 2024 Homework and Class Review - David Stein
Week 8 - 15
Visit ICM-2024-Media Homework Wiki
Week 7 - Oct 17
RESOURCES FROM CLASS
TEST YOURSELF
ASK
- Post at least 1 question here. Need help on asking a question?
- Luna Chen - can we use the same thing we learned before this class into html? like class/object/arreys/function, can they be also called the same way in html?
example questions)
Questions (READ / WATCH
- Videos: Images/Video 11.1-11.8 - Focus on videos 11.1 and 11.3
- Chapter 7 in Getting Started with P5.js through Ex 7-9 | Code
- p5VideoKit for Video Mixing Effects
- Full Resources
Week 6
-
RESOURCES FROM CLASS
-
TEST YOURSELF
-
DO: EXPLAIN 1 THING.
- Prepare a 5-minute technical presentation of one of your sketches.
- NEW: In class I mentioned you should use both objects and arrays in your sketch. On second thought, it is OK to just do one of these (use objects or use arrays)
- MOST IMPORTANT: Please only use code techniques that we have covered in class. It is MOST important to me that you show what you have learned and only use code that you understand. Make something creative within the palette of your understanding. Be prepared to explain the most complex parts of your code.
- Focus on what's happening in your sketch computationally. Clarify the vocabulary you will use. Write out what you're going to say and prepare any diagrams that will help you explain what's going on. See my demo video (It is much longer than the time you will have!)
- Give yourself time to properly demo 1 aspect of your sketch.
- Explain 1 thing you learned in making your sketch. Talk about what programming concept(s) you are using (e.g. objects and arrays, nested for loops, toggle logic, portable functions)
- Write down what you're going to say ahead of time. Prepare diagrams to help get your point across!
- OPTIONS FOR WHAT TO DO:
- Take this opportunity to really clean-up your code. You don’t even need to add any functionality!
- Add descriptive comments.
- Carefully name your variables and functions.
- Remove unnecessary repetition.
- Mash up a couple of your past assignments into a new sketch.
- Try incorporating arrays and classes with a sketch that has lots of something (balls, sheep, eyes).
- IF you are already working with classes/objects and arrays:
- Re-organize / break-down your classes into the "smallest functional units" possible.
- Try different ways to have your objects "communicate" with each other in some way.
- Take this opportunity to really clean-up your code. You don’t even need to add any functionality!
-
READ / WATCH
- Videos 8.1-8.10(~2 hours)
- Focus on the basics, videos 8.1, 8.2, 8.4 (~30 minute)
- More resources from syllabus
- p5.dom section of Chapter 13.4-13.6 in Getting Started with P5.js
- Videos 8.1-8.10(~2 hours)
-
Examples
-
ASK
- Post at least 1 question here. Need help on asking a question?
-
Homework Links - Due Oct 16 12:59pm
- Your Name -- [Title of Blog Post](Link to Blog Post), [Title of Sketch](Link to Sketch) -- any other
- Tina Yu -- Week 6 Project: Arrays & Objects, Week 6 Project
- Luna Chen -- blog-Week6 - class + Arreys,P5 week5HW
- Junqi Zhang -- blog-Week6,it's okay to
- Yao Zhang -- Blog week6, Code week6-1,Code week6-2
- Siming Lu -- W6-Blog, W6-Homework
- Olivia Lee -- patternMaker, patternMaker-Basic, patternMaker-Fail, week6
- Han Bao -- week6 blog, week6
- Laurel Fang -- Week 6 Blog, Blinking Smileys
- Rajeshwari Kotwal -- WEEK 6 ASSIGNMET
- Keyi Ding -- Week06 Code
- Sky Seo -- Blog,Bubble Bubble
- Jenn Choi -- Blog,W6
- Vivian Jia -- Week6blog,week6_eyesanimation
- Michael Culleton -- Week 6,Pinch Palette
Week 5
-
Today
- Homework Review
- Quick loop review & P5 variable discussion
- Assessment Discussion
- Homework Review
-
RESOURCES FROM CLASS:
-
REQUIRED ASSESSMENT ON LOOPS (1 of 2):
- Location: Common Area outside of Room 426
- There is no time-limit, however give yourself at least 30 minutes.
- Topic: Loops. However it assumes basic knowledge of p5 drawing functions, variables and conditionals.
- Available windows of time:
- Friday Oct 4 12-4PM
- Monday Oct 7 12 - 2:30PM
-
TEST YOURSELF
- Complete the Worksheet
-
DO: Functions are the basic unit of labor in your code. Take a sketch you’ve already done and re-organize the code into functional units of labor that you define. You can also conceive of an entirely new world of labor. What kinds of labor does it take to make your sketch run?
- Aim to keep
setup()
anddraw()
as clean as possible, and do everything (calculations, drawing, etc.) in functions that you define. - Take care to name your functions precisely and accurately. Whenever possible, use verbs to name your functions. A good test of whether your functions are well-named is: Can someone else comment in/out individual function calls and predict what behaviors will start / stop working in your sketch?
- Challenge goal: Write a re-usable function, a function you can call in multiple ways to do the same thing slightly differently each time.
- Aim to keep
-
READ / WATCH
- Video 2.3 on JavaScript Object Literals (~10m)
- Videos 6.1-6.3, 7.1-7.7(~2h)
- More resources and code examples
- Getting Started with p5.js chapters 10-11
-
Examples
-
ASK
- Post at least 1 question here. Need help on asking a question?
Homework Links
- Your Name -- [Title of Blog Post](Link to Blog Post), [Title of Sketch](Link to Sketch) -- any other
- Tina Yu -- WEEK 5: FUNCTIONS,WEEK 5 PROJECT
- Siming Lu -- Week 5-Blog, Week 5-HW
- Junqi Zhang -- Week 5 Blog, A Pool of Dots
- Sky Seo -- Week 5 Blog, Fall is Coming
- Jenn Choi -- Week 5 Functions- mirror ball
- Olivia Lee -- week5;neonClock
- Yao Zhang -- week5week5 code
- Han Bao -- Week5 Blog; Week5
- Laurel Fang - Week 5 Blog Blue Smiley Faces
- Vivian Jia - week5blog;week5hw
- Luna Chen -- week5
- Rajeshwari Kotwal -- Week 5 Blog; WEEK 5 ASSIGNMENT
- Michael Culleton -- Comp Media Week 5; Color and Pattern
- Keyi Ding -- Week05
Week 4 - Sep 26, 2024
-
RESOURCES FROM CLASS:
-
TEST YOURSELF: Complete Worksheet 4
-
DO: Our ability to see patterns is what makes us human. However we also see patterns where none exist because our brains are biased towards detecting certain kinds of patterns over others (e.g. faces). Create a pattern by making something with a lot of repetition. Is the resulting pattern easy to see or hard to see? What would it mean to create the illusion of pattern? Can you predict what the pattern will be when you run your code or does it surprise you? You could take something you've already done where there was a lot of repetition in the code (e.g. your self-portrait) and see if you can re-write it using a loop so that instead of 28 lines of code that call rect(), you have 1 line of code calls rect() inside of a loop that goes around 28 times. How do you need to rework the way you position that rect() in order to make it work in a loop? Try creating an algorithmic design with simple parameters. (One example is 10PRINT, example code).
-
READ / WATCH
- Videos 5.1-5.3(~40min) in the learning p5.js series.
- Getting Started with p5.js chapters 9-10
-
RUN CODE
-
ASK * Post at least 1 question here. Need help on asking a question? * Name (optional): Question
- Rajeshwari - What does offset function do, and where is it used and how to use it?
- Luna Chen - Can we use function the same way as for/while loop do? What the difference between for and while loop? I feel like while loop can be used when there is less limitation, for loop used in conditions where there needs fully limitation. And while loop can also nest with if or other loops, is that correct?
Homework Links Due Oct 2 11:59pm
- Your Name -- [Title of Blog Post](Link to Blog Post), [Title of Sketch](Link to Sketch) -- any other comments
- Michael Culleton -- Comp Media Week 4, Pattern Camera
- Sky Seo -- Comp Media Week 4, Ripple wave
- Junqi Zhang -- my Blog Post,day to night wallpaper, dream of wave wallpaper
- Olivia Lee -- patternMaker;week4
- Rajeshwari Kotwal - Week 4 blog, WEEK 4 ASSIGNMENT *Jenn Choi https://editor.p5js.org/wonjchoi313/sketches/Bj054j_eY
- Luna Chen -- Week4-Function,Functionassignmentnoise, RedoPortait-itwillcrashyourcomputer...
- Jenn Choi -- Week4,mirrorBall
- Han Bao -- Week4 Blog, Week4
- Siming Lu--Week4-Blog, W4 HW
- Laurel Fang --- Week 4 Blog,Interactive Random Waves
- Yao Zhang --- week4 blog,week 4 homework
- Vivian Jia --- week4blog,scanimation,scanimation_leveledup
- Keyi Ding --- Week04, Week04 blog
- Tina Yu - WEEK 4 BLOG, WEEK 4 PROJECT
Thursday, September 19
Homework 3 - Due 11:59pm September 25
-
TEST YOURSELF: Complete Worksheet 3
-
DO: For this week’s assignment, you have 4 options to choose from. Pick one or many!
-
Option 1: Create your own version of a “bouncing ball” sketch. What kinds of events can you trigger when the “ball” hits the edge of the window (changing size, changing color, changing speed). What other types of physics can you simulate? Can you add gravity to the bouncing ball?
- Bouncing ball sketch references:
- Bouncing ball tutorial: https://youtu.be/LO3Awjn_gyU, code
- Bouncing DVD logo tutorial: https://youtu.be/0j86zuqqTlQ, code
- Bouncing ball sketch references:
-
Option 2: Try making a rollover, button, or slider from scratch. You are welcome to use the examples below as guides and inspiration:
-
Option 3: Create an algorithmic design with simple parameters. You may use any inspiration, but here is one of the earliest pieces of computer art as a starting point:
-
Option 4 Tie any of the above together! Can you create an interface element that controls the visual design or behavior of other elements in your sketch? For example, could a button start and stop the 10PRINT generation? Or could a slider alter the speed of a bouncing ball?
-
-
READ / WATCH
- Videos 4.1-4.2(~25min) in the learning p5.js series. | Code
- Chapter 4.5-4.13 of Getting Started with p5.js book | Ebook (free with NYU Library login) | Code
-
ASK
- Post at least 1 question below. Examples of good questions...
- Junqi Zhang : How to make the ball move in a circle?
- Vivian Jia : For documentation purposes, is there a way to programmatically capture a GIF or image created in p5.js and download it directly from the sketch?
- Luna Chen : How can I make a object rotate round another moving object?
Homework Links: 1 Sketch Per Pair Note be sure to do a Blog post about your experience with your homework
- Your Name -- [Title of Blog Post](Link to Blog Post), [Title of Sketch](Link to Code) -- any other comments
- Junqi Zhang -- Blog Post, catch the bouncing ball
- Tina Yu -- WEEK 3 BLOG,WEEK 3 PROJECT
- Michael Culleton -- Comp Media Week 3, Noise Coloring
- Sky Seo -- Comp Media Week 3, Noise and Ball Boundcing
- Keyi Ding -- ICM Week03
- Vivian Jia -- ICM_week3_blog,ICM_week3_rollover_power
- Laurel Fang Week 3 Blog Circle Art
- Yao Zhang -- Week3
- Olivia Lee -- Week 3, PoolSlider
- Jenn Choi -- [Week3]https://editor.p5js.org/wonjchoi313/sketches/-sJCV_-II
- Siming Lu--Week3,HW3
- Rajeshwari Kotwal -- WEEK 3 BLOG, WEEK 3 Assignment
- Luna Chen -- Week 3, Bounce ball
- Han Bao -- blog,Week 3
Week 2 - Thursday, September 12 (HW Due Sept 18, 11:59pm)
-
RESOURCES FROM CLASS:
-
TEST YOURSELF: Worksheet Post a url to your answers on the Google Doc.
-
DO:
-
Create an animated sketch!
-
As an exercise include all of the following.
- 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.
-
See if you can eliminate all (or as much as you can) hard-coded* numbers from the sketch. A hard coded number is something like fill(150). Better practice is to save 150 in a variable, for example myGreyColour, then use fill(myGreyColour)
-
-
-
WATCH, READ, RUN CODE:
- Watch Conditionals 3.1 - 3.4 ~1hr
- Getting Started with p5: Chapter 5 (Response). | Chapter 5 Code
- Learn about Transformations (Optional) Transformations Video Tutorials
- Getting Started with p5: Chapters 6 (Transformations) and 8.10-8.15 (More complex motion)
-
ASK
- Post at least 1 question below. Examples of good questions...
- Tina Yu - Is there a way to control frame rates for individual components within one project?
- Olivia Lee - Can we specifically take some time with the last challenge question from the worksheet?
- Rajeshwari Kotwal - How can I add background to the line moving at the top of my sketch, which has a gradient?
- Rajeshwari Kotwal - Can you please explain the function - Noise?
- Laurel Fang - Can we incorporate some pre-existing 2D/3D artworks/virtual fashion into P5?
- Vivian Jia - How can we control moving elements to ensure they stay within the frame without using the if() statement? or can we elaborate more on the if() statement in class?
- Luna Chen - Can we get a summarize of certain function? Like moving objects(without mouse interaction): speed, frameCount, target, easing.... Summary like these.... I'm confused everytime when I need to move a object, and also can't figuring out how to make the object back to original point automatically when the interaction is done.
Homework 2 - Due 11:59pm September 18
- Homework Links: (Enter your Blog Post URL)
- David Stein -- [blog post](url to blog), [zoog]
- Tina Yu -- WEEK 2
- Junqi Zhang -- Rainbow Stripes, & Iteration Version: Rainbow Weave, blog post
- Culleton, Michael -- Comp Media Week 2, Block Layer Painter
- Laurel Fang --- [Blog Post],[Color Changing Lines]
- Vivian Jia --- ICM_week2_blog,ICM_week2_animated_sketch
- Jenn Choi --- https://editor.p5js.org/wonjchoi313/sketches/O-S77zkBe https://jennwchoiblog.cargo.site/intro-to-comp-media-1
- Olivia Lee --- Week 2,AnimatedSketch
- Rajeshwari Kotwal ---WEEK 2 HW
- Siming Lu----WeekTwo
- Sky Seo----WeekTwo
- Keyi Ding ---WeekTwo
- Han Bao ---Week 2
- Yao Zhang ——-Homework 2
- Luna Chen -- week2 Make an Art Using Animation, p5animationgraph
Week 1 - Thursday, September 5 (HW Due Sept 11, 11:59pm)
-
RESOURCES FROM CLASS:
-
SET UP:
- Sign up for a Github Account. You need it to edit this wiki page.
- Log into a p5.js web editor account with your github account.
-
DO:
- Complete this worksheet. Our weekly worksheet become the basis for the next class. You must be logged in with your NYU account to access the worksheet.
- Create a "self" portrait using 2D primitive shapes. Play with symmetry in your portrait. Shapes include –
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 an example: Zoog - Write a blog post about how computation applies to your interests, due 24 hours before the next class. 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? (You can review and contribute to the ICM Inspiration Wiki page). In the same post (or a new one), document the process of creating your sketch. 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:
- Follow the TO THE LESSON Link:
- Watch before HW: Videos 1.1 - 1.6(~1h 15m)
- Watch after HW: Videos 2.1 - 2.3(~30m)
- If you prefer books, Chapters 1-3 of Getting Started with p5.js cover the same material. Log into the NYU network to read it for free
- Follow the TO THE LESSON Link:
-
ASK
- Post at least 1 question below. Examples of good questions...
- Name (optional) -- Question: Why is it that this is like this and that is like that?
- Sky Seo : How can I group the individual shapes to change the position of them together without changing all the shapes' position separately?
- Sky Seo : Can I use Hex Code in p5.JS? I don't see the option for hex code in 'colorMode()'.
- Sky Seo : IS the color RGB based or RGB'A' based? --- solved. RGBA based, but all the scales are 0 - 255 including 'Alpha' value.
- Tina Yu -- Question: Is there a more efficient way to determine your desired color and position for a shape requiring less guesswork?
- Junqi : What is an efficient way to understand the xy coordinate, especially when creating arc and curves. It was very hard to make the curve I want.
- Junqi : When I have a lot of variation in stroke/fill/color, what is the best approach to achieve a clean code?
- Laurel Fang: If I want to change the position of the hair clip altogether, is there a way to group all elements together and tilt the whole thing in one go?
- Laurel Fang: Can I change the brush properties, such as make it like a spray paint or has neon effect or a calligraphy pen?
- Yushin Li: How can I apply transformations like scaling or rotating to a group of shapes together more efficiently instead of doing each shape manually?
- Olivia Lee: I find that centering objects can be pretty difficult, is there some sort of function that can help with that?
- Jenn Choi: I was struggling making my top hair with oval shape + rotating. Is there any easier way to rotate them?
- Rajeshwari Kotwal : How do I make waves in p5? I tried doing that to my portrait for hair but could not achieve it
- Rajeshwari Kotwal : How do I select multiple objects and rotate them together?
- Vivian Jia: How does mirroring work with the arc() function?
Homework 1 - Due 11:59pm September 11
- Bao, Han -- Han's ICM blog, Han's Self Portait
- Chen, Luna -- Week 1 Self Portrait, Self Portrait Luna
- Choi, Jenn -- Intro to comp media(https://jennwchoiblog.cargo.site/intro-to-comp-media-1), Jenn's face(https://editor.p5js.org/wonjchoi313/sketches/6_I5DIsxB)
- Culleton, Michael -- Comp Media, Self Portrait
- Fang, Laurel -- ITP ICM Laurel's Blog, Self-Portrait
- Jia, Vivian -- ICM_week1_blog,ICM_week1_self_portrait
- Kotwal, Rajeshwari Ranjeet -- Rajeshwari_Week 1 blog, rajeshwari_Week 1 Assignment 2
- Lee, Olivia -- ICM: Week 1, Self-Sketch
- Li, Yushin -- Intro to Comp Media Blog, [My panda skin](https://editor.p5js.org/Kuroihitsuji/sketches/6xkkTwC05 / a pixel version)
- Lu, Siming -- Intro to Computing Media, ICM-Siming-1
- Seo, Sky -- weekly documentation & coding activities, SKY - ICM 2024 -class 1_Portrait
- Yu, Tina -- ICM: week 1, TINA'S SELF PORTRAIT
- Zhang, Junqi -- How computation applies to my interests, W1 Self Portrait
- Zhang, Yao -- (What's the point of P5? Why do we draw in code instead of by hand?), self portrait