# 20. Mathematics I

25 %
75 %
Education

Published on March 15, 2014

Author: JosephHenryMurphy

Source: slideshare.net

From last time… • Added a PONG countdown and sound effects! • Minim: AudioPlayer vs. AudioSample! • Brieﬂy discussed external libraries & debugging! • Homework 3 was graded and returned

CAP Mathematics I

% Modulo Operator • Use modulo to make “counter” variables! • Similar to division but returns the remainder! • The remainder never be greater than the divisor 0 % 3 0 R0 0 1 % 3 0 R1 1 2 % 3 0 R2 2 3 % 3 1 R0 0 4 % 3 1 R1 1

random() Numbers • random(high); OR random(low,high);! • Weighted randomness: we’ve seen this many times before!

Perlin noise() • noise(x); • noise(x,y); • noise(x,y,z); • We have to feed it a “time” value! • Always returns a ﬂoat between 0 and 1

Demo! Fireﬂies

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! Drawing on Arcs

For next time… • Iteration 2: we present in 1 week!! • Reading: Shiffman, p. 214–225 (Mathematics II)

 User name: Comment:

January 16, 2019

January 16, 2019

January 16, 2019

January 16, 2019

January 16, 2019

January 16, 2019

## Related pages

### MATH 20 Home § Mathematics 20 (Fall 2010-2011)

Mathematics 20: Algebra and Multivariable Mathematics for Social Sciences: Harvard College/GSAS: 125396: Fall 2010-2011: Rachel Louise Epstein: Location ...

### archive - Mathematics

20 T 21 U 22 V 23 W 24 X 25 Y 26 Z.col-md-8.col-md-4. Toggle navigation. Sections; About; Contact; asdas. 1. 0. Tim. Last active 10 hours ago ? >> 4h ago ...

### Mathematics 20-2 - Alberta Online Education

Mathematics 20-2 Mathematics 20-2 is ideal for students planning on attending university (depending on the program) college or trade school. Mathematics 20 ...

### Mathematics - Wikipedia, the free encyclopedia

The word mathematics comes from the Greek μάθημα (máthēma), ... ^ Hilbert, D. (1919–20), Natur und Mathematisches Erkennen: Vorlesungen, ...

### Mathematics - Quora

Here are a few books : What Is Mathematics? An Elementary Approach to Ideas and Methods: Richard Courant, Herbert Robbins, Ian Stewart; This book has ...

### Foundations of Mathematics 20 - Blackboard Learn

Outcome: FM20.2. Demonstrate understanding of inductive and deductive reasoning including: analyzing conjectures; analyzing spatial puzzles and games

### Mathematics Courses - University of California San Diego ...

Mathematics [ undergraduate program | graduate ... Credit not offered for both Math 15A and CSE 20. Equivalent to CSE 20. Prerequisites: ...

### Blackboard Learn

Foundations of Mathematics 20; Foundations of Mathematics 30; ... W & A Math 20. Aim & Goals. Outcomes & Indicators. Teaching an Effective Learning Program.