Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions Documentation1.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation2.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation3.md

This file was deleted.

13 changes: 13 additions & 0 deletions Functions_Challenge/Functions_Challenge.pde
Original file line number Diff line number Diff line change
@@ -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;
}
20 changes: 20 additions & 0 deletions Math Function.md
Original file line number Diff line number Diff line change
@@ -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


28 changes: 28 additions & 0 deletions Physics Function Documentation
Original file line number Diff line number Diff line change
@@ -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


12 changes: 12 additions & 0 deletions Physics_Equation/Physics_Equation.pde
Original file line number Diff line number Diff line change
@@ -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;
}
27 changes: 27 additions & 0 deletions Visual Function Documentation
Original file line number Diff line number Diff line change
@@ -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


17 changes: 17 additions & 0 deletions Visual_Function/Visual_Function.pde
Original file line number Diff line number Diff line change
@@ -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
}
}
Binary file added Visual_Function/data/lakers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.