Skip to content

Instantly share code, notes, and snippets.

String arrayOne [] = { "SQUARE", "RECTANGLE", "CUBE", "QUADRILATERAL", "FOUR-SIDED THING" };
void setup() {
background(255);
size(500, 300);
//rectMode (CENTER);
float r = random(0, 1); //probability
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];
//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);
//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;
//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;
//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;
//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);
///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;
int circleSize;
int circleX, circleY;
int distance;
float x;
float y;
int xspeed;
int yspeed;
color circleColor, bgColor;
int circle;
int circleSize;
int circleX, circleY;
int distance;
float x;
float y;
int xspeed;
int yspeed;
color circleColor, bgColor;