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/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/Documentation3.md b/Documentation3.md deleted file mode 100644 index 28f94fa..0000000 --- a/Documentation3.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/Functions_Challenge/Functions_Challenge.pde b/Functions_Challenge/Functions_Challenge.pde new file mode 100644 index 0000000..8b2900d --- /dev/null +++ b/Functions_Challenge/Functions_Challenge.pde @@ -0,0 +1,13 @@ +void setup() { + size(800, 600); //draw a canvas +} + +void draw() { + println(volumeofcylinder(5,10)); //give the result of the volume +} + + +float volumeofcylinder(float r, float h) { //find volume of cylinder + float result = (pow(r,2))*PI*h; + return result; +} \ No newline at end of file diff --git a/Math Function.md b/Math Function.md new file mode 100644 index 0000000..ae07736 --- /dev/null +++ b/Math Function.md @@ -0,0 +1,20 @@ +# Name: volumeofcylinder() + +## Examples: +println(volumeofcylinder(5,10)); + +## Description: +This function will find the volume of a cylinder. A cylinder is a solid geometric figure with straight parallel sides and a circular or oval cross section. When finding the volume, the amount of space that a substance or object occupies, or that is enclosed within a container is being found. + +## Syntax: +volumeofcylinder(radius,height) + +##Parameters: +r float: radius of the cylinder + +h float: height of the cylinder + +##Returns: +float + + diff --git a/Physics Function Documentation b/Physics Function Documentation new file mode 100644 index 0000000..d001ddd --- /dev/null +++ b/Physics Function Documentation @@ -0,0 +1,28 @@ +# Name: +finalvelocity() + +## Examples: +void draw() { + println(finalvelocity(5, 9, 30)); //print the final velocity in m/s +} + +float finalvelocity( float vo, float accel, float t) { //find the final velocity + float result= vo+(accel*t); + return result; +} + +## Description: +This function uses the equation vf=vo+at to find the final velocity given the other parameters. Velocity is is a physical vector quantity; both magnitude and direction are needed to define it. The final velocity is the velocity at the ending time or position. + +## Syntax: +finalvelocity(vo,accel,t); + +##Parameters: +vo float: Initial Velocity +accel float: Acceleration +t float: Time + +##Returns: +float + + diff --git a/Physics_Equation/Physics_Equation.pde b/Physics_Equation/Physics_Equation.pde new file mode 100644 index 0000000..5fa105f --- /dev/null +++ b/Physics_Equation/Physics_Equation.pde @@ -0,0 +1,12 @@ +void setup() { + size(800, 600); //draw a canvas +} + +void draw() { + println(finalvelocity(5, 9, 30)); //print the final velocity in m/s +} + +float finalvelocity( float vo, float accel, float t) { //find the final velocity + float result= vo+(accel*t); + return result; +} \ No newline at end of file diff --git a/Visual Function Documentation b/Visual Function Documentation new file mode 100644 index 0000000..9beeba3 --- /dev/null +++ b/Visual Function Documentation @@ -0,0 +1,27 @@ +# Name: lakers() + +## Examples: +void draw() { + lakers(); //draw the lakers function +} +void lakers() { + lakers=loadImage("lakers.jpg"); //load image + image(lakers, 0, 0); //image position + if (keyPressed) { //when key is pressed + tint(random(255), random(255), random(255)); //random tint when key is pressed + } +} + +## Description: +This function will draw an image which is the logo of the Los Angeles Lakers. The Los Angeles Lakers is a NBA team based in Los Angeles. Also, this function allows the user to change the tint of the image by pressing any key. + +## Syntax: +lakers(); + +##Parameters: +None + +##Returns: +void + + diff --git a/Visual_Function/Visual_Function.pde b/Visual_Function/Visual_Function.pde new file mode 100644 index 0000000..65d6d3d --- /dev/null +++ b/Visual_Function/Visual_Function.pde @@ -0,0 +1,17 @@ +PImage lakers; //image + +void setup() { + size(800, 600); //canvas size +} + +void draw() { + lakers(); //draw the lakers function +} + +void lakers() { + lakers=loadImage("lakers.jpg"); //load image + image(lakers, 0, 0); //image position + if (keyPressed) { //when key is pressed + tint(random(255), random(255), random(255)); //random tint when key is pressed + } +} \ No newline at end of file diff --git a/Visual_Function/data/lakers.jpg b/Visual_Function/data/lakers.jpg new file mode 100644 index 0000000..76ab2d8 Binary files /dev/null and b/Visual_Function/data/lakers.jpg differ