From 07e5f69117d0d8b339cda4bbb5a186a297025f17 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Tue, 8 Dec 2015 14:26:22 -0500 Subject: [PATCH 01/10] math function --- math_functions/math_functions.pde | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 math_functions/math_functions.pde diff --git a/math_functions/math_functions.pde b/math_functions/math_functions.pde new file mode 100644 index 0000000..3c2d000 --- /dev/null +++ b/math_functions/math_functions.pde @@ -0,0 +1,15 @@ +void setup() { + background(0); +} +void draw () { + ConvertFarenheitToKelvin (0); + { + } +} + +float ConvertFarenheitToKelvin (float Fdeg) { + Fdeg += 459.7; + Fdeg = Fdeg * 5/9; + println(Fdeg); + return Fdeg; +} \ No newline at end of file From d2fd1182a395e8121a18905cfc2ca96b1d83c381 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Tue, 8 Dec 2015 14:51:12 -0500 Subject: [PATCH 02/10] physics function --- physic_function/physic_function.pde | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 physic_function/physic_function.pde diff --git a/physic_function/physic_function.pde b/physic_function/physic_function.pde new file mode 100644 index 0000000..2fd8bab --- /dev/null +++ b/physic_function/physic_function.pde @@ -0,0 +1,15 @@ +void setup () { + +} + +void draw () { +FinalVelocityOfObject (); +} + +float FinalVelocityOfObject (float Vof0,float Acceleration, float Time) { + float finalvelocity; + finalvelocity = Vof0 + (Acceleration*Time); + println(finalvelocity); + return finalvelocity; + +} \ No newline at end of file From 1b50cfdf6ae298b4daa3d40bbc518b5877f544a4 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Wed, 9 Dec 2015 13:54:29 -0500 Subject: [PATCH 03/10] added visual function --- visual_function/visual_function.pde | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 visual_function/visual_function.pde diff --git a/visual_function/visual_function.pde b/visual_function/visual_function.pde new file mode 100644 index 0000000..3dad764 --- /dev/null +++ b/visual_function/visual_function.pde @@ -0,0 +1,18 @@ +void setup(){ +size (800,600); +background (0); +} + +void draw(){ +DrawATree(300); +} + +void DrawATree(float heightt){ + fill(153,51,0); +rect(height-250,width/3, 75,heightt); +fill(51, 204, 51); +ellipse(height/1.5,width/3,400,80); +ellipse(height/1.5,width/2.5,400,80); +ellipse(height/1.5,width/3.5,400,80); + +} \ No newline at end of file From 31484b1313c8c83bb32c3af2a8b2aa2b111802ba Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 16:55:05 -0500 Subject: [PATCH 04/10] added comments --- visual_function/visual_function.pde | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/visual_function/visual_function.pde b/visual_function/visual_function.pde index 3dad764..19477a5 100644 --- a/visual_function/visual_function.pde +++ b/visual_function/visual_function.pde @@ -1,18 +1,18 @@ void setup(){ -size (800,600); -background (0); +size (800,600); //sets size of screen +background (0); // sets background color } void draw(){ -DrawATree(300); +DrawATree(300); // calls function, also defines leaveswidth } -void DrawATree(float heightt){ - fill(153,51,0); -rect(height-250,width/3, 75,heightt); -fill(51, 204, 51); -ellipse(height/1.5,width/3,400,80); -ellipse(height/1.5,width/2.5,400,80); -ellipse(height/1.5,width/3.5,400,80); +void DrawATree(float leaveswidth){ //floats leaveswidth + fill(153,51,0); // sets fill +rect(height-250,width/3, 75,350); //draws rectangle +fill(51, 204, 51); // sets fill color +ellipse(height/1.5,width/3,leaveswidth,80); //draws ellipse +ellipse(height/1.5,width/2.5,leaveswidth,80);//draws ellipse +ellipse(height/1.5,width/3.5,leaveswidth,80);//draws ellipse } \ No newline at end of file From 97ff936832db8bc6cc4ed0ebd721b0a58b90c9a0 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:01:44 -0500 Subject: [PATCH 05/10] added comments --- physic_function/physic_function.pde | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/physic_function/physic_function.pde b/physic_function/physic_function.pde index 2fd8bab..8095708 100644 --- a/physic_function/physic_function.pde +++ b/physic_function/physic_function.pde @@ -1,15 +1,14 @@ void setup () { - } void draw () { -FinalVelocityOfObject (); + FinalVelocityOfObject (0, 2, 2); //calls function + //plug in inital velocity, acceleration, and time// } -float FinalVelocityOfObject (float Vof0,float Acceleration, float Time) { - float finalvelocity; - finalvelocity = Vof0 + (Acceleration*Time); - println(finalvelocity); - return finalvelocity; - +int FinalVelocityOfObject (int Vof0, int Acceleration, int Time) {// defines function + int finalvelocity; // sets finalvelocity as an int + finalvelocity = Vof0 + (Acceleration*Time); //defines finalvelocity + println(finalvelocity); //prints the value in the command line + return finalvelocity; //returns value } \ No newline at end of file From bc70096bbabad08f6a76e2a5051349f3a0ae2087 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:23:38 -0500 Subject: [PATCH 06/10] added comments --- math_functions/math_functions.pde | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/math_functions/math_functions.pde b/math_functions/math_functions.pde index 3c2d000..aa63614 100644 --- a/math_functions/math_functions.pde +++ b/math_functions/math_functions.pde @@ -1,15 +1,13 @@ void setup() { - background(0); + background(0); //sets background color } void draw () { - ConvertFarenheitToKelvin (0); - { - } + ConvertFarenheitToKelvin (0); //calls function } -float ConvertFarenheitToKelvin (float Fdeg) { - Fdeg += 459.7; - Fdeg = Fdeg * 5/9; - println(Fdeg); - return Fdeg; +int ConvertFarenheitToKelvin (int Fdeg) { // sets function and Fdeg + Fdeg += 459.7; // defines Fdeg + Fdeg = Fdeg * 5/9; //defines fdeg + println(Fdeg); //prints Fdeg in command line + return Fdeg; //returns Fdeg } \ No newline at end of file From 615898e331ceac8c6466f95b21470e07fcb63e9f Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:35:23 -0500 Subject: [PATCH 07/10] Update Documentation1.md --- Documentation1.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Documentation1.md b/Documentation1.md index 28f94fa..0fdba6d 100644 --- a/Documentation1.md +++ b/Documentation1.md @@ -1,19 +1,24 @@ -# Name: +# Math Function: ## Examples: -Insert examples here. +void setup() { + background(0); +} +void draw () { + ConvertFarenheitToKelvin (0); + } ## Description: -Insert description here +With this function you can enter any farenheit value and it will print under the command line the same value, but in kelvin ## Syntax: -Demonstrate syntax here + ConvertFarenheitToKelvin (Fdeg); ##Parameters: -Name and describe parameters here +Fdeg: The farenheit value you want to convert ##Returns: -What type of data does it return? +int ##Other notes: Anything else? From 6fe4a10f66a2a1a21a91bd793ad92c65bf4fccb7 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:35:50 -0500 Subject: [PATCH 08/10] Update Documentation1.md --- Documentation1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation1.md b/Documentation1.md index 0fdba6d..8bce98c 100644 --- a/Documentation1.md +++ b/Documentation1.md @@ -21,4 +21,4 @@ Fdeg: The farenheit value you want to convert int ##Other notes: -Anything else? +Good for scientists From 29402d24636983c740b985bd8864a5e7fa23b725 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:47:03 -0500 Subject: [PATCH 09/10] Update Documentation2.md --- Documentation2.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Documentation2.md b/Documentation2.md index 28f94fa..5acdafc 100644 --- a/Documentation2.md +++ b/Documentation2.md @@ -1,19 +1,24 @@ -# Name: +# Physics Function: ## Examples: -Insert examples here. +void draw () { + FinalVelocityOfObject (0, 2, 2); + } ## Description: -Insert description here +with this function you can easily find the final velocity of something by inputting the inital +velocity, the acceleration, and the time ## Syntax: -Demonstrate syntax here + FinalVelocityOfObject (a, b, c); ##Parameters: -Name and describe parameters here +a: initial velocity +b: acceleration +c: time ##Returns: -What type of data does it return? +int ##Other notes: -Anything else? +great for physics hw From 044c76a6a7f4f5c983c2b9785894feca78658c06 Mon Sep 17 00:00:00 2001 From: rafaelcandamil Date: Sun, 13 Dec 2015 17:49:48 -0500 Subject: [PATCH 10/10] Update Documentation3.md --- Documentation3.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Documentation3.md b/Documentation3.md index 28f94fa..cf7a2ba 100644 --- a/Documentation3.md +++ b/Documentation3.md @@ -1,19 +1,21 @@ -# Name: +# Visual Function: ## Examples: -Insert examples here. +void draw(){ +DrawATree(300); +} ## Description: -Insert description here +Draws a cute tree that you can set the leaf size of ## Syntax: -Demonstrate syntax here +DrawATree(a); ##Parameters: -Name and describe parameters here +a: leaf size ##Returns: -What type of data does it return? +void ##Other notes: -Anything else? +time saver