├── README.md └── extras ├── Triangle_Strips ├── Icon ├── Triangle_Strips.pde └── data │ └── cat.jpg ├── alignment ├── Icon ├── index.html ├── sketch.js └── vehicle.js ├── millis_timer ├── Icon └── millis_timer.pde └── textured_flag ├── Particle.pde ├── Spring.pde ├── data └── cat.jpg └── textured_flag.pde /README.md: -------------------------------------------------------------------------------- 1 | The Nature of Code Part 1 (Spring 2017) 2 | ====================================== 3 | 4 | Syllabus for Part 1 of Nature of Code: "Physics and Animation" at ITP Spring 2017 5 | 6 | Class Info 7 | ---------- 8 | * Daniel Shiffman: daniel.shiffman@nyu.edu 9 | * Section 1: Tuesdays, 9:00-11:30am 10 | * Section 2: Wednesdays, 9:00-11:30am 11 | * [Office Hours](https://itp.nyu.edu/inwiki/Signup/Shiffman) 12 | * [Sign up for Mailing List](https://groups.google.com/a/itp.nyu.edu/forum/#!forum/natureofcode) 13 | 14 | Resources 15 | --------- 16 | * [All course videos](https://www.youtube.com/user/shiffman/playlists?view=50&sort=dd&shelf_id=6) -- If you would like offline access to the videos and/or just prefer to watch them somewhere other than YouTube, let me know. 17 | * [Nature of Code Kadenze Course](https://www.kadenze.com/courses/the-nature-of-code/info) 18 | * [Online textbook](http://natureofcode.com/book/) 19 | * [p5.js code examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js) 20 | * [Processing (Java) code examples](https://github.com/shiffman/The-Nature-of-Code-Examples) 21 | * [Other ports](https://github.com/shiffman/The-Nature-of-Code-Examples/blob/master/README.md) 22 | * [Further Reading](http://natureofcode.com/book/further-reading/) 23 | * Some assignments and materials based on Mimi Yin's [Nature of Code course](https://github.com/mimiyin/Nature-of-Code-S-16/). 24 | 25 | Related Reading and Watching 26 | ---------------------------- 27 | * [Coding Math Video Series](http://www.youtube.com/user/codingmath) 28 | * [Generative Design with Processing](http://www.amazon.com/gp/product/1616890770/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1616890770&linkCode=as2&tag=natureofcode-20) 29 | * [Mathematics and Physics for Programmers](http://www.amazon.com/gp/product/1435457331/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1435457331&linkCode=as2&tag=learniproces-20) 30 | * [Computational Beauty of Nature](http://www.amazon.com/gp/product/0262561271/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0262561271&linkCode=as2&tag=natureofcode-20) 31 | * [Form and Code](http://formandcode.com/) 32 | 33 | Week 1 - Introduction (Jan 24/25) 34 | ------------------------------- 35 | * Class Intro / Overview 36 | * [Related and Past Projects](https://github.com/shiffman/The-Nature-of-Code-S14/wiki/Nature-of-Code-Related-and-Past-Projects) 37 | * [Processing](http://www.processing.org), [p5.js](http://p5js.org), or ______________. 38 | * Randomness, Probability, and Perlin Noise 39 | * [Nature of Code Introduction](http://natureofcode.com/book/introduction/) 40 | * [Videos I.1 - I.5](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YVljJvFRCyRM6mmF5wMPeE) 41 | * [Perlin Noise playlist](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6bgPNQAdxQZpJuJCjeOr7VD) 42 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/introduction) 43 | * Object Oriented Programming Review & Vectors 44 | * [Nature of Code Chapter 1](http://natureofcode.com/book/chapter-1-vectors/) 45 | * [Videos 1.1 - 1.6](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZwSmtE13iJBcoI-r4y7iEc) 46 | * [Processing examples](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp1_vectors) 47 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp01_vectors) 48 | * Assignment 49 | * [Sign up for class mailing list](https://groups.google.com/a/itp.nyu.edu/forum/#!forum/natureofcode) 50 | * [Assignment](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Homework-1). 51 | * Supplemental Reading 52 | * [Mathematics and Physics for Programmers](http://www.amazon.com/gp/product/1584503300/) Chapter 5 53 | * [Computational Beauty of Nature](http://www.amazon.com/gp/product/0262561271/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0262561271&linkCode=as2&tag=natureofcode-20), Introduction 54 | * [Probability Theory](http://www.probabilitytheory.info/) 55 | 56 | Week 2 - Build a Physics Engine (Jan 31 / Feb 1) 57 | ------------------------ 58 | * [Nature of Code Chapter 2](http://natureofcode.com/book/chapter-2-forces/) 59 | * [Videos 2.1 - 2.6](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZRrqLcQ5BkBKmBLiGD8n4O) 60 | * [Processing examples](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp02_forces) 61 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp02_forces) 62 | * [Assignment](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Homework-2). 63 | * Supplemental Reading 64 | * [Newtonian Physics, An Online Textbook](http://www.lightandmatter.com/area1book1.html) (This is long, you may find Chapter 4 to be particularly relevant to this week's discussion.) 65 | * [The Physics Classroom -- Newton's Laws](http://www.physicsclassroom.com/Class/newtlaws/newtltoc.html) 66 | * [Mathematics and Physics for Programmers](http://www.amazon.com/gp/product/1584503300/), Chapters 12 and 14 67 | 68 | Week 3 - Oscillation and Particle Systems (Feb 7/8) 69 | ------------------------------- 70 | * [Nature of Code Chapter 3: Oscillation](http://natureofcode.com/book/chapter-3-oscillation/) 71 | * [Nature of Code Chapter 4: Particle Systems](http://natureofcode.com/book/chapter-4-particle-systems/) 72 | * Videos 3.1 - 3.5, Videos 4.1 - 4.9 73 | * [p5.js chapter 3 examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp03_oscillation) 74 | * [p5.js chapter 4 examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp04_systems) 75 | * [Simple Harmonic Motion by Memo Akten](http://www.memo.tv/simple-harmonic-motion/) 76 | * [Demo of Oscillating Movement and Sine Wave](https://www.youtube.com/watch?v=PhvJcVDuJsY#t=55) 77 | * Supplemental reading 78 | * [Trigonometry, What is it good for?](http://www.phy6.org/stargaze/Strig1.htm) 79 | * [Mathematics and Physics for Programmers](http://www.amazon.com/gp/product/1584503300/), Chapter 4 80 | * ["Particle animation and rendering using data parallel computation", Karl Sims](http://doi.acm.org/10.1145/97879.97923) (available via NYU network/proxy) 81 | * ["Particle Systems, a Technique for Modeling a Class of Fuzzy Objects", Reeves](http://doi.acm.org/10.1145/357318.357320) (available via NYU network/proxy) 82 | * [How my Dog learned Polymorphism](http://www.javaranch.com/campfire/StoryPoly.jsp) 83 | * [Particle System API, by David K. McAllister](http://www.siggraph.org/education/materials/HyperGraph/animation/particle.htm) 84 | * [Particle Systems by Allen Martin](http://web.cs.wpi.edu/~matt/courses/cs563/talks/psys.html) 85 | ms) 86 | * [Assignment](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Homework-3) 87 | 88 | Week 4 - Autonomous Agents (Feb 14/15) 89 | ----------------------------------- 90 | * [Nature of Code Chapter 6: Autonomous Agents](http://natureofcode.com/book/chapter-6-autonomous-agents/) 91 | * [Videos 6.1 - 6.8](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YHt0dtyf4uiw8tKOxQLvlW) 92 | * [Processing examples](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp06_agents) 93 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp06_agents) 94 | * Supplemental 95 | * [Reas Process Compendium](https://vimeo.com/22955812) 96 | * [Braitenberg Vehicles](http://books.google.com/books/?id=7KkUAT_q_sQC) 97 | * [Craig Reynolds' Steering Behaviors for Autonomous Characters](http://www.red3d.com/cwr/steer/) 98 | * [BetterExplained/ Dot Product + Finding The "Normal"](http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/) 99 | * [Finding the closest point on a curve.](http://www.mesacc.edu/~marfv02121/readings/nearest_point/index.html) 100 | * [Homework-4: Final Project Start](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Project-Step-1) 101 | 102 | Week 5 - Physics Libraries (Friday Feb 24!) 103 | --------------------------- 104 | * '''Please note the makeup time for this week on Friday, Feb 24''' 105 | * '''Both classes will meet in room 50 from 12pm-3pm''' 106 | * [Add your questions here](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Questions:-Steering-and-Physics-Engine) 107 | * [Nature of Code Chapter 5: Physics Libraries](http://natureofcode.com/book/chapter-5-physics-libraries/) 108 | * Box2D 109 | * [Box2D web site](http://box2d.org/) 110 | * [Videos 5.1 - 5.12](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6akvoNKE4GAxf6ZeBYoJ4uh) 111 | * [Processing examples](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp05_libraries/box2d) 112 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp05_libraries/box2d-html5) 113 | * Toxiclibs 114 | * [Videos 5.13 - 5.16](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6akvoNKE4GAxf6ZeBYoJ4uh) 115 | * [Processing examples](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp05_libraries/toxiclibs) 116 | * [p5.js examples](https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/tree/master/chp05_libraries/toxiclibs) 117 | * [ToxicLibs](http://toxiclibs.org/) 118 | * [ToxicLibs.js](http://haptic-data.com/toxiclibsjs/) 119 | * [The Making of Nokia Friends](https://vimeo.com/1472427) 120 | * [Advanced Character Physics](http://www.gamasutra.com/resource_guide/20030121/jacobson_pfv.htm) 121 | * Bullet 122 | * [bRigid Processing Library](http://www.lab-eds.org/bRigid) 123 | * [ammo.js Javascript port](https://github.com/kripken/ammo.js/) 124 | * [simple 3d box demo](https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp5_physicslibraries/bRigid_jBullet) 125 | * Other libraries? 126 | 127 | Week 6 - Catch-up and Project Workshop (Feb 28 / Mar 1 ) 128 | ------------------------------------ 129 | * More on inheritance/polymorphism 130 | * Geometry and Texturing 131 | * Matter.js 132 | * Closer look at flocking and complex systems 133 | * Preview of NOC: Intelligence and Learning 134 | 135 | Week 7 - Project Presentations (Mar 7/8) 136 | ------------------------------ 137 | * [Project Presentations and Documentation](https://github.com/shiffman/NOC-S17-1-Physics-Animation/wiki/Project) 138 | 139 | Policies 140 | ----------------------------------------------- 141 | * Submit assignments by the evening before class to the extent possible. 142 | * Come prepared with questions. 143 | * Put away screens during others' presentations. 144 | * Participate! 145 | * Document! 146 | * Grading: 147 | * 40% Class Participation 148 | * 40% Quality of assignments 149 | * 20% Final project 150 | * For a 2-point class, 2 or more unexcused absences is grounds for failure. 151 | -------------------------------------------------------------------------------- /extras/Triangle_Strips/Icon : -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature-of-code/NOC-S17-1-Physics-Animation/7740d290402e10dbcd203de14f043c4498402206/extras/Triangle_Strips/Icon -------------------------------------------------------------------------------- /extras/Triangle_Strips/Triangle_Strips.pde: -------------------------------------------------------------------------------- 1 | PImage img; 2 | void setup() { 3 | size(600, 600, P2D); 4 | img = loadImage("cat.jpg"); 5 | background(0); 6 | strokeWeight(3); 7 | stroke(255); 8 | noFill(); 9 | 10 | beginShape(TRIANGLE_STRIP); 11 | texture(img); 12 | for (float x = 0; x < width; x+= 50) { 13 | float u = map(x, 0, width, 0, img.width); 14 | vertex(x, 300, u, 10); 15 | vertex(x, 350, u, 60); 16 | } 17 | endShape(); 18 | } -------------------------------------------------------------------------------- /extras/Triangle_Strips/data/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature-of-code/NOC-S17-1-Physics-Animation/7740d290402e10dbcd203de14f043c4498402206/extras/Triangle_Strips/data/cat.jpg -------------------------------------------------------------------------------- /extras/alignment/Icon : -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature-of-code/NOC-S17-1-Physics-Animation/7740d290402e10dbcd203de14f043c4498402206/extras/alignment/Icon -------------------------------------------------------------------------------- /extras/alignment/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |