diff --git a/Circle.txt b/Circle.txt new file mode 100644 index 0000000..25c1e65 --- /dev/null +++ b/Circle.txt @@ -0,0 +1,23 @@ +# Name: circle + +## Examples: +Insert examples here. + +## Description: +Draws a circle using the standard equation of a circle + +## Syntax: +float circle(h,k,r,x,y){} + +##Parameters: +h- the x coordinate of the center of the circle +k- the y coordinate of the center of the circle +r- the radius of the circle +x- the x position on the canvas +y- the y position on the canvas + +##Returns: +float + +##Other notes: +the fill color also changes everytime the mouse is pressed 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/LikeASir.txt b/LikeASir.txt new file mode 100644 index 0000000..89dd5d2 --- /dev/null +++ b/LikeASir.txt @@ -0,0 +1,19 @@ +# Name: likeASir + +## Examples: +? + +## Description: +Draws an image on to the canas of a very elegant man + +## Syntax: +void likeASir(){} + +##Parameters: +N/A- There are no parameters in this function + +##Returns: +void + +##Other notes: +The man is very elegant diff --git a/ReturningValues/ReturningValues.pde b/ReturningValues/ReturningValues.pde new file mode 100644 index 0000000..212a866 --- /dev/null +++ b/ReturningValues/ReturningValues.pde @@ -0,0 +1,33 @@ +void setup(){ + size(800,600); + background(0); + noStroke(); +} + + +void draw(){ + println( work(3,5)); +println( circle(400,300,5,78,91)); +likeASir(); +} + +float work(float k, float x){ + float answer; + answer=.5*k*sq(x); + return answer; +} + +float circle(float h, float k, float r, float x, float y){ + r=sqrt(sq(x-h)+sq(y-k)); + ellipse(h,k,r*2,r*2); + if (mousePressed){ + fill(random(255),random(255),random(255)); +} +return r; +} + + void likeASir(){ + PImage las = loadImage("like_a_sir.png"); + image(las,400,300,733,800); + imageMode(CENTER); + } \ No newline at end of file diff --git a/ReturningValues/data/like_a_sir.png b/ReturningValues/data/like_a_sir.png new file mode 100644 index 0000000..3cb0ec7 Binary files /dev/null and b/ReturningValues/data/like_a_sir.png differ diff --git a/Work.txt b/Work.txt new file mode 100644 index 0000000..27b02f7 --- /dev/null +++ b/Work.txt @@ -0,0 +1,18 @@ +# Name: Work + +## Examples: + + +## Description: +Work is force put on an object times the distance the object goes. + +## Syntax: +float Work(f,d){} + +##Parameters: +f- Force= the amount of energy put into an object to make it move +d- Distance= the distance an object is taken by the force + +##Returns: +float +