# 21. Mathematics II

50 %
50 %
Education

Published on March 15, 2014

Author: JosephHenryMurphy

Source: slideshare.net

From last time… • Obnoxious ﬁre drill! • % // modulo operator • random(); • noise(); // organic movement • degrees(); radians();

CAP Mathematics II

Demo! Solar System

Radians & Degrees • Radians = 2π (Degrees / 360)! • float myRadians = radians(360); // 6.2831… • float myDegrees = degrees(TWO_PI); // 360.0 • QUARTER_PI HALF_PI PI TWO_PI TAU • sin(); cos(); tan();

Demo! Sine Waves Applied to size…! Applied to color…! Applied to position…

A useful pattern… • noise(), sin(), random(), and related functions! 1. Create a variable: circleWidth! 2. Create an “angle” or “time”: circleTheta! 3. Increment the angle/time each frame: circleTheta += 0.001; 4. Feed this angle/time to the function, and map its output to the range you want: circleWidth = map(sin(circleTheta),-1,1,50,150); circleX = map(noise(circleTheta),0,1,0,width);

2D Arrays • Useful for 2D things!! • A 2D array of pixels (an image)! • Positions on a game board

Demo! Clouds / Array Dots

For next time… • Iteration 2: we present in less than 1 week!! • I’ve posted the expectations to the site! • Shiffman, p. 227–239 (Translation/Rotation I)! • Now—Quiz 4: Algorithms, Debugging, & Libraries

 User name: Comment:

June 25, 2018

June 24, 2018

June 24, 2018

June 24, 2018

June 24, 2018

June 24, 2018

## Related pages

### 21.Mathematical Induction II.pdf midterm #2.pdf ...

View Test Prep - 21.Mathematical Induction II.pdf midterm #2.pdf from MACM 101 at Simon Fraser. Mathematical Introduction Induction II Discrete

### American Mathematical Society - Volume II: Mathematics ...

American Mathematical Society. ... Volume II: Mathematics into the Twenty-First Century. Editor: Felix E. Browder. Publication Date: 1992 Number of pages ...

### Examination in Mathematics II Working time

Fakult at f ur Mathematik Institut fur Mathematische Optimierung Prof. Dr. F. Werner Examination in Mathematics II (21.07.2003) Working time: 120 minutes

Math 21 . A thorough treatment ... Any of these four courses of study will give you the tools you need to continue learning advanced mathematics. If you ...

### 21 - Introduction Mathematical Induction II Discrete ...

View Notes - 21 from MACM 101 at Simon Fraser. Introduction Mathematical Induction II Discrete Mathematics Andrei Bulatov Discrete Mathematics -

### Question 21 Mathematics CPE 2013 - YouTube

Question 21 Mathematics CPE 2013 The Property of Anagnorisis Educational Services. Our Fb Page: https://www.facebook.com ...

### Department of Mathematical Sciences Courses

Department of Mathematical Sciences Courses. Note on Course Numbers. ... 21-700 Mathematical Logic II Spring: 12 units Higher-order logic (type theory).

### Mathematics II exam. January 21, 2011.

Mathematics II exam. January 21, 2011. Sebastian Koehne Per Krusell Instructions Clearly state all steps towards the answer. Showing under-standing of a ...