Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 5.49 KB

File metadata and controls

72 lines (51 loc) · 5.49 KB

#Loops and Trigonometry

####Update Git to get week2 examples in your repo

  • Update your fork of the class repository. (Instructions from here.)
    • First make sure your online repository has your homework. If it hasn't, push your changes to github (see section on this here.
    • Then in the terminal cd to whereever your local repo is - this is whereever you have been working
    • Make sure your remote and your local repos are synced. (git status) will tell you this
    • You may need to git pull which will bring in your online changes to your local repository
    • Now your local and your remote version should be matched. git status showing no red lines!
    • Now you are going to pull in the new examples for this week from the master repository to your local. git checkout gh-pages
    • And pull the updated branch from the main repo git pull https://github.com/tegacodes/Drawing-Seeing-Moving-with-Code.git gh-pages
    • Fingers crossed you have no merge conflicts. (If you do, talk to me)
    • Push your now updated local repo to your repo online git push origin gh-pages
  • Github markdown. You may with to use Markdown reader such as MacDown for mac or Markdown pad for windows

###Trigonometry *See [reading from chapter 3 in nature of code.] (https://github.com/tegacodes/Drawing-Seeing-Moving-with-Code/blob/gh-pages/docs/readings/NoC-Oscillation.pdf)

Angular motion All these example are in the code/week 2 folder of the repo as well as being in code pen for your easy viewing..

Polar & Cartesian coordinates

Oscillation

####Loop Example

####Using a local server

  • There will come a time when you want to load images or fonts or sound into your sketch. This means we have to use a local server (we will go over this in more detail in weeks 3 and 4) Follow these instructions to get one set up.

###Examples

  • Try the load image example to see a local server in action.
  • Trigonometry review and loops. All these example are in folders in your

####Load an Image

###Submit your Week 1 homework

  • Pull request to Github (submit your homework)
    • Now you have everything synced and updated. Let's make your first pull request. This is where you are asking to add your new work to the class repo.
    • First navigate to your online repository
    • Find the New Pull Request button. Press it and you should see information on the changes between your repo and the main one. Create the request and I will then accept.
    • Well done! You've made your first pull request.

###Trigonometry Exercises

  • See chapter 3 in Nature of Code. or this draft primer on trig over here.
  • With one line of code, transform the circular motion example into a spiral (see the trig chapter reading for more on this)
  • Create a pulsing sketch where a color oscillates with sine. (You could hack the sinScaling example using sin to change the color rather than the scale).

###Deliverables:

  • Read this excerpt from the trig chapter from Nature of Code here to better understand the trig examples. I have blanked some of the text out, so as not to confuse you with stuff we havent covered yet. It goes over the difference between transformations and sin and cos equations. It is a chapter from Shiffman's Nature of Code.
  • Do the two exercise listed above.
  • Read the Project 1 brief in detail. Take a look at the examples of loops from the links and blogs in this outline. Review this video of some past student work to get a sense of how the prints come out. Start your project by doing a series of at least 3 hand drawn sketches of how your loop will work. Scan or take photos of these images and make a folder for these images in your student folder in the repo, you will be using them in a post on your project process post and that will be made as a markdown file. Come to class with your project process and code experiments for refinement next week. You will have most of class to work on your lenticular loop, the project will be due for upload by Monday at midnight.
  • If you are interested. Here is a short history of Javascript.