From 4a14bcfd39aa0a2673acc8a6fb41b88a270cc55d Mon Sep 17 00:00:00 2001 From: mmansingh2 Date: Wed, 9 Dec 2015 08:52:42 -0500 Subject: [PATCH 1/4] mathOperations function --- Documentation1.md | 19 ------------------- mathOperations.md | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 19 deletions(-) delete mode 100644 Documentation1.md create mode 100644 mathOperations.md diff --git a/Documentation1.md b/Documentation1.md deleted file mode 100644 index 28f94fa..0000000 --- a/Documentation1.md +++ /dev/null @@ -1,19 +0,0 @@ -# Name: - -## Examples: -Insert examples here. - -## Description: -Insert description here - -## Syntax: -Demonstrate syntax here - -##Parameters: -Name and describe parameters here - -##Returns: -What type of data does it return? - -##Other notes: -Anything else? diff --git a/mathOperations.md b/mathOperations.md new file mode 100644 index 0000000..cc3b729 --- /dev/null +++ b/mathOperations.md @@ -0,0 +1,24 @@ +# Name: mathOperations() + +## Examples: +void draw() { + println(mathOperations(5)); +} + +float mathOperations(float number) { + return number/2*7 +5; +} + +## Description: +Divides a any number by two, multiplies it by seven, and adds five to the product. + +## Syntax: +mathOperation(n) + +##Parameters: +n float: value to be evaluated + +##Returns: +float + + From 764fe8a1a529a4dc7e505d06c2496413b08b6c68 Mon Sep 17 00:00:00 2001 From: mmansingh2 Date: Wed, 9 Dec 2015 08:59:16 -0500 Subject: [PATCH 2/4] vF function physics --- Documentation2.md | 19 ------------------- vF.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) delete mode 100644 Documentation2.md create mode 100644 vF.md diff --git a/Documentation2.md b/Documentation2.md deleted file mode 100644 index 28f94fa..0000000 --- a/Documentation2.md +++ /dev/null @@ -1,19 +0,0 @@ -# Name: - -## Examples: -Insert examples here. - -## Description: -Insert description here - -## Syntax: -Demonstrate syntax here - -##Parameters: -Name and describe parameters here - -##Returns: -What type of data does it return? - -##Other notes: -Anything else? diff --git a/vF.md b/vF.md new file mode 100644 index 0000000..b9754f8 --- /dev/null +++ b/vF.md @@ -0,0 +1,25 @@ +# Name: vF() + +## Examples: +void draw() { + println(vF(0)); +} + +float vF(float vI) { + float t; + t= random(0, 2400); + return vI + 9.8*t; +} + +## Description: +Calculates the final velocity of an object with a gravitational acceleration of 9.8 and a random time between zero and 2400 seconds, given the initial velocity. + +## Syntax: +vF(vI) + +##Parameters: +vI float: initial velocity + +##Returns: +float + From da7ad11678ce013060b2f268c7507dd338cd62b0 Mon Sep 17 00:00:00 2001 From: mmansingh2 Date: Wed, 9 Dec 2015 09:02:24 -0500 Subject: [PATCH 3/4] randomCircle function --- Documentation3.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Documentation3.md b/Documentation3.md index 28f94fa..80c09ce 100644 --- a/Documentation3.md +++ b/Documentation3.md @@ -1,19 +1,32 @@ -# Name: +# Name: randomCircle ## Examples: -Insert examples here. +void setup() { + size(800, 600); +} + + +void draw() { + frameRate(2.5); + background(0); + randomCircle(); +} + +void randomCircle() { + fill(random(255), random(255), random(255)); + float diam = random(5, 80); + ellipse(random(width), random(height), diam, diam); +} ## Description: -Insert description here +Draws a circle of a random color at a random location on the canvas. The circle has a random diameter between 5 and 80. ## Syntax: -Demonstrate syntax here +randomCircle() ##Parameters: -Name and describe parameters here +none ##Returns: -What type of data does it return? +void -##Other notes: -Anything else? From 9179c9fa19da7174dce6a803d2886d80cca76ec4 Mon Sep 17 00:00:00 2001 From: mmansingh2 Date: Thu, 10 Dec 2015 08:18:27 -0500 Subject: [PATCH 4/4] visual function --- Documentation3.md | 32 -------------------------------- bullseye.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 32 deletions(-) delete mode 100644 Documentation3.md create mode 100644 bullseye.md diff --git a/Documentation3.md b/Documentation3.md deleted file mode 100644 index 80c09ce..0000000 --- a/Documentation3.md +++ /dev/null @@ -1,32 +0,0 @@ -# Name: randomCircle - -## Examples: -void setup() { - size(800, 600); -} - - -void draw() { - frameRate(2.5); - background(0); - randomCircle(); -} - -void randomCircle() { - fill(random(255), random(255), random(255)); - float diam = random(5, 80); - ellipse(random(width), random(height), diam, diam); -} - -## Description: -Draws a circle of a random color at a random location on the canvas. The circle has a random diameter between 5 and 80. - -## Syntax: -randomCircle() - -##Parameters: -none - -##Returns: -void - diff --git a/bullseye.md b/bullseye.md new file mode 100644 index 0000000..c330344 --- /dev/null +++ b/bullseye.md @@ -0,0 +1,38 @@ +# Name: bullseye + +## Examples: +void setup() { + size(800, 600); + background(0); +} + + +void draw() { + bullseye(); +} + +void bullseye(){ + fill(255); + ellipse(width/2,height/2,120,120); + fill(255,0,0); + ellipse(width/2,height/2,90,90); + fill(255); + ellipse(width/2,height/2,60,60); + + fill(255,0,0); + ellipse(width/2,height/2,30,30); + +} + +## Description: +Uses different sized and colored circles with the same center point to make a bullseye. + +## Syntax: +bullseye() + +##Parameters: +none + +##Returns: +void +