Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual pet light gif.gif #1

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Note: The following Processing functions do not work on the web:

Samples of Student Work
-----------------------
None yet!
none yet!

Binary file added VirtualPet Light Gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 76 additions & 4 deletions VirtualPet.pde
Original file line number Diff line number Diff line change
@@ -1,8 +1,80 @@

void setup(){
//some of your code here
void setup (){
size(400,400);
background (100,150,200);
}

void draw(){
//more of your code here
}

//Back Tenticles
stroke(50,150,90);
strokeWeight(40);
noFill();
arc (150,70,100,200,PI/4,PI);

arc(250,70,100,200,0,3*PI/4);
strokeWeight(4);

//Second from Back Tenticles
stroke(50,150,90);
strokeWeight(40);
noFill();
bezier(200,150,150,250,100,200,50,150);

bezier(200,150,250,250,300,200,350,150);
strokeWeight(4);

//2nd from front Tenticles
stroke(50,150,90);
strokeWeight(40);
noFill();
arc (100,170,175,200,PI/4,4*PI/5);

arc(300,170,175,200,1*PI/5, 3*PI/4);
strokeWeight(4);

//Front Tenticles
stroke(50,150,90);
strokeWeight(40);
noFill();
bezier(200,250,200,250,150,250,175,375);

bezier(200,250,200,250,250,250,225,375);
strokeWeight(4);

//Body
noStroke();
fill(40,140,90);
ellipse(200,200,110,120);

/*control points for front tenticles
stroke(255,0,0);
point(200,250);
point(200,250);
point(150,250);
point(250,250);*/

//Head
noStroke();
fill(50,150,100);
ellipse(200,125,110,150);

//Eyes
float leftEye = 175;
float rightEye = 225;
float eyeHeight = 100;
float eyeSmall = 112.5;
noStroke();
fill(255,255,255);
ellipse(leftEye,eyeHeight,20,40);
ellipse(rightEye,eyeHeight,20,40);
fill(0,0,0);
ellipse(leftEye,eyeSmall,15,15);
ellipse(rightEye,eyeSmall,15,15);

//Mouth
noFill();
stroke(0,0,0);
arc(200,170,50,25,PI/6,5*PI/6);

}
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Title</title>
<title>Nikhita's Octopus Pet</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="styles.css">
<script src="processing.js"></script>
</head>
<body>
<header>
<h1>Headline</h1>
<h1>Thomas the Octopus</h1>
</header>
<section id="content">
<canvas id="VirtualPet" data-processing-sources="VirtualPet.pde">
</canvas>
</section>
<footer>
Footer
By Nikhita Law
</footer>
</body>
</html>