This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String arrayOne [] = { "SQUARE", "RECTANGLE", "CUBE", "QUADRILATERAL", "FOUR-SIDED THING" }; | |
void setup() { | |
background(255); | |
size(500, 300); | |
//rectMode (CENTER); | |
float r = random(0, 1); //probability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int num = 10; | |
int wPositions [] = new int [num]; | |
int hPositions [] = new int [num]; | |
color [] circleColor = new color [num]; | |
int r1 [] = new int [num]; | |
int r2 [] = new int [num]; | |
int[] x = new int[width/2]; | |
int[] y = new int[height/2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change the color of an ellipse from black to white if the mouse is hovering over it | |
int circleColor; | |
void setup() { | |
size(700, 700); | |
noStroke(); | |
} | |
void draw() { | |
background(255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change this sketch so it rotates around the original position of the shape | |
int x, y; | |
int size = 100; | |
void setup() { | |
size(600, 600); | |
rectMode(CENTER); | |
x = width/2; | |
y = height/2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create a button that generates the product of two random integers | |
//the multiplication sentence should be displayed somewhere on the screen | |
//the sketch is started for you, but isn't quite right | |
int x, y; | |
int size; | |
float dist; | |
boolean buttonClicked; | |
int num1, num2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create a button that generates the product of two random integers | |
//the multiplication sentence should be displayed somewhere on the screen | |
//the sketch is started for you, but isn't quite right | |
int x, y; | |
int size; | |
float dist; | |
boolean buttonClicked; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Replicate pattern | |
//Create a single loop. | |
//Change size of shape based on position in the loop (shape get smaller/larger) | |
//Create nested loop. Use map function in loop (differently than in class!) | |
//Use mouse position to create dynamic loop | |
int bgColor; | |
void setup(){ | |
size(600, 600); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///make functions for: INT/FLOAT(done), BOOLEAN(done), STRING(done), VOID(done) | |
//use map function to change fill based on shape distance(done) | |
//use LERP function --linear interpolation(done) | |
//image goal: match(rect) to collect the circles(fire) | |
//when mousepressed, hover match to fire around canvas | |
//when mouse is moving(mouseX,mouseY) change bgColor or match color | |
//incorporates instructions with string function in console | |
int r, g, b; //for color mapping | |
int size = 35; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int circleSize; | |
int circleX, circleY; | |
int distance; | |
float x; | |
float y; | |
int xspeed; | |
int yspeed; | |
color circleColor, bgColor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int circle; | |
int circleSize; | |
int circleX, circleY; | |
int distance; | |
float x; | |
float y; | |
int xspeed; | |
int yspeed; | |
color circleColor, bgColor; |
NewerOlder