3.1: Angles and Angular Motion – The Nature of Code

[ad_1]
Chapter: 3

Official book website:

Twitter:
This video describes how angles work in Processing and how you can model the angular motion of a shape.

Read along:

Help us caption & translate this video!


Posted

in

by

Tags:

Comments

9 responses to “3.1: Angles and Angular Motion – The Nature of Code”

  1. Vissaeus Avatar

    I thought this was JavaScript

  2. The Shroud Avatar

    Woah, the push and pop matrix thingy could maybe do with a bit more of an explanation!

  3. zoilo garingan Avatar

    where could i get the function definition of rectMode(), translate(), rotate(), and map();;; ??

  4. Beqa Meqvabishvili Avatar

    can anyone explain what map method does? I only know javascript but understand everything in the course so far, except this part

  5. Geekboy Avatar

    4:27 Eisenberg?! 0o let's cook jessy

  6. David James ASMR Avatar

    //So, this code will make an oscilating circle out of rectangles using this video;
    //It has a really mesmerizing effect if you watch the oscillation over time;

    float a = 0.0;
    float aVel = 0.0;
    float aAcc = 0.01;

    void setup(){
    size(600,600);
    }

    void draw(){
    //maps the speed of rotation to the mouseX location;
    aAcc = map(mouseX, 0, width, 0.001, 0.002);

    a += aVel;
    aVel += aAcc;

    background(0);
    translate(width/2,height/2);
    rotate(a);
    strokeWeight(4);
    stroke(0,255,0);
    fill(255,150);
    rect(50,0,200,250);
    }

  7. Ilustrado Avatar

    HEY! That's pretty good! 3:42 VSauce & iDubbz

  8. adil hassan Avatar

    Excellent videos. Thank you very very much. Just one liner for you and everyone reading it "The Best instructor you can have to teach you how to program." Thanka again.

  9. SIMuTech Avatar

    Hi Daniel, is there a reason why most if not all your videos are missing or have broken links to the examples that you walk us thru in the video? i try to look for this video as i am watching all your videos im sure you noticed already and when i get to hit hub the title of the video is found but the examples are not the same as in the corresponding video

    this is the example i found in git:
    https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/blob/master/chp03_oscillation/NOC_3_02_forces_angular_motion/sketch.js

    but this is your broken link on this video:
    https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/Processing/chp3_oscillation/NOC_3_02_forces_angular_motion

    it seems that this directory dont exist:
    https://github.com/shiffman/The-Nature-of-Code-Examples-tree

Leave a Reply

Your email address will not be published. Required fields are marked *