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.

40 changes: 40 additions & 0 deletions FunctionsChallenge/FunctionsChallenge.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
//make a quadratic formula
float[] quadraticForm(float numberA, float numberB, float numberC) {
float answers[]= new float[2];
answers[0] = ((-numberB) + (sqrt((numberB*numberB) - (4* numberA* numberC))))/(2*numberA);
answers[1] = ((-numberB) - (sqrt((numberB*numberB) - (4* numberA* numberC))))/(2*numberA);
return answers;
}
//find the initial velocity
float initialVelocity(float vF, float a, float x) {
float answer;
answer = sqrt(sq(vF) + (2*a*x));
return answer;
}
//spam the picture Kappa on the screen
void spamKappaInTheChat() {
PImage KAPPA;
PImage KAPPAKID;
KAPPA = loadImage("KAPPA.png");
KAPPAKID = loadImage("KAPPAKID2.jpg");
if (mousePressed) {
fill(255);
textSize(40);
String Kappa = "EVERYBODY SPAM KAPPA IN THE CHAT";
text(Kappa, 25, 50);
image(KAPPA, random(800), random(600));
image(KAPPAKID, 0,100);
}
}

//size
void setup() {
size(800, 600);
}
//print the answers for the 2 equations and the command.
void draw() {
background(0);
println(quadraticForm(1,2,1));
println(initialVelocity(1, 0, 0));
spamKappaInTheChat();
}
Binary file added FunctionsChallenge/data/KAPPA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FunctionsChallenge/data/KAPPAKID.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FunctionsChallenge/data/KAPPAKID2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions initialVelocity()
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Name:
intialVelocity()

## Examples:
println(initialVelocty(1,0,0));

rect(initialVelocity(1,0,0), 100,50,50);

## Description:
Finds the inital velocity by using a simple physics equation, with the knowlege of the final velocity, acceleration and displacement

## Syntax:
initialVelocity(vF,a,x)

##Parameters:
vF float: Final Velocity
a float: Acceleration
x float: Displacement

##Returns:
float
24 changes: 24 additions & 0 deletions quadraticForm()
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Name:
quadraticForm()

## Examples:
println(quadraticForm(5,6,7));

rect (quadraticForm(1,3,2),50,50,50)

## Description:
Finds the quadratic formula for any three numbers you imput. Will produce both answers.

## Syntax:
quadratricForm(a,b,c)

##Parameters:
a float: the coefficient of the x squared value
b float: the coefficient of the x value
c float: the constant

##Returns:
float

##Other notes:

16 changes: 16 additions & 0 deletions spamKappaInTheChat()
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Name:
spamKappaInTheChat()

## Examples:
spamKappaInTheChat();

## Description:
When the mouse is pressed, text will appear on screen along with the appearance of Kappa on the screen at random locations.
There is no parameters, so '()' will be the only thing after this function

## Syntax:
spamKappaInTheChat();

#Returns:
void