diff --git a/Circle.md b/Circle.md new file mode 100644 index 0000000..fa11dd5 --- /dev/null +++ b/Circle.md @@ -0,0 +1,22 @@ +# Name: circle() + +## Examples: +circle(500,400,80); + +## Description: +Draws a circle with x and y position using a and b variables respectively and diameter of . The first two parameters set the location, and the third sets the diameter of the circle. +## Syntax: +ellipse(cx, cy, d) + +##Parameters: +cx float: x-coordinate of the ellipse + +cy float: y-coordinate of the ellipse + +d float: diameter of the ellipse + +##Returns: +Void + +##Other notes: + diff --git a/ConverttoCelcius.md b/ConverttoCelcius.md new file mode 100644 index 0000000..e31519d --- /dev/null +++ b/ConverttoCelcius.md @@ -0,0 +1,19 @@ +# Name: FtoCel() + +## Examples: +FtoCel(60); + +## Description: +This converts Fahrenheit to Celcius. Input a degree value in the parameters, in Fahrenheit, to convert to Celcius. + +## Syntax: +FtoCel(f) + +##Parameters: +f float: Degrees Fahrenheit + +##Returns: +float + +##Other notes: + diff --git a/ConverttoKelvin.md b/ConverttoKelvin.md new file mode 100644 index 0000000..0b36211 --- /dev/null +++ b/ConverttoKelvin.md @@ -0,0 +1,19 @@ +# Name: CeltoK() + +## Examples: +CeltoK(15.568); + +## Description: +This converts Celcius to Kelvin. Input a degree value in the parameters, in Celcius, to convert to Kelvin. + +## Syntax: +CeltoK(cel) + +##Parameters: +cel float: Degrees Celcius + +##Returns: +float + +##Other notes: + 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/FunctionsChallenge/FunctionsChallenge.pde b/FunctionsChallenge/FunctionsChallenge.pde new file mode 100644 index 0000000..600d21b --- /dev/null +++ b/FunctionsChallenge/FunctionsChallenge.pde @@ -0,0 +1,30 @@ +void setup() { + size(1000, 800); //size of canvas +} + +void draw() { + background(0); //set background + println(FtoCel(60)); //print value from fahrenheit to celcius + println(CeltoK(15.568)); //print value from celcius to kelvin + println(KinematicEq(15,9.8,10)); //print value of final velocity + circles(500,400,80); //draw ellipse in canvas +} + +float FtoCel(float f) { + return .556*(f-32); //functions converts fahrenheit to celcius +} +float CeltoK(float cel) { + return cel+273.15; //function to converts celcius to kelvin +} +float KinematicEq(float v0,float acc, float x ) { + return sqrt(sq(v0)+(2*acc*x)); //function calulates for final velocity using kinematic equation +} +void circles(float cx,float cy, float d) { + ellipse(cx, cy, d, d); //function draws circles + +} +void mousePressed() { //change fill of circle + fill(random(255), random(255), random(255)); + stroke(random(255), random(255), random(255)); + strokeWeight(10); +} \ No newline at end of file diff --git a/KinematicEquation.md b/KinematicEquation.md new file mode 100644 index 0000000..33f70d9 --- /dev/null +++ b/KinematicEquation.md @@ -0,0 +1,23 @@ +# Name: KinematicEq() + +## Examples: +KinematicEq(15,9.8,10); + +## Description: +Finds the final velocity using a kinematic equation when the intial velocity, acceleration, and distance are specified in the parameters. + +## Syntax: +KinematicEq(v0,acc,x); + +##Parameters: +v0 float: inital velocity + +acc float: acceleration + +x float: distance + +##Returns: +float + +##Other notes: +