i can never face my family again
You ever see something so funny you bypass laughing entirely and go straight for crying?
Misplaced Lens Cap
occasionally subtle

Origami Around

if i look back, i am lost
taylor price

oozey mess

Kaledo Art

roma★
Aqua Utopia|海の底で記憶を紡ぐ
2025 on Tumblr: Trends That Defined the Year
todays bird
Cosimo Galluzzi
Game of Thrones Daily
Show & Tell

tannertan36

#extradirty
ojovivo
Peter Solarz
Keni
will byers stan first human second

seen from Australia
seen from United States
seen from United States

seen from United States
seen from United States
seen from United States
seen from United States
seen from United States

seen from United States
seen from United States

seen from United States

seen from United States
seen from United States

seen from United States

seen from Lithuania
seen from United States

seen from Türkiye

seen from Australia
seen from Italy
seen from United States
@dadsibcsinc
i can never face my family again
You ever see something so funny you bypass laughing entirely and go straight for crying?
Video conference: 12/11/2015
Today, I had the opportunity to have a live videoconference with Arturo Gomez, a member of Jacobs University Bremen. He showed us how genetic algorithms were applied into the field of robotics in order to create intelligent systems that could simulate human intelligence. My class learned how the implementation of those systems on certain fields such as industry improved the production of a company by the automatization of processes in general. In addition, we saw examples in code where genetic algorithms were applied in order to find the maximum or minimum points in a complex function. These kind of calculations could serve as the base in the creation of some of the agents we see in robotics. Finally, something i really appreciated from his part was the fact that he gave us advice on programming and life in general, teaching us lessons on what companies and other schools search for. He really did give us motivation and tips that we could use after we graduate high school and start our lives in college.
The nature of code: Chapter 9
Recently in my CS course, we were tasked with reading chapter 9 in the book The Nature of Code. The chapter revolves around the creation of complex algorithms that can simulate evolution, albeit in a broad way. The principle behind this resides in the use of genetic algorithms, following three basic concepts in Darwinian evolution: Variation, Heredity and selection.
A genetic algorithm is stated to be “a specific algorithm implemented in a specific way to solve specific sorts of problems”. In other words, it is stated to be an algorithm that can “learn” as it is being executed, thus presenting the idea of learning or evolution. Genetic algorithms are used when there is a great amount of information to process and the implementation of a “brute force algorithm” could result in a program that takes too long to find the solution (as it would check every single part of the information), while a genetic algorithm would “learn” and “evolve” from the information in order to reach the solution in a faster way.
It can be seen that a genetic algorithm “evolves” through the use of terms such as variance, genotype and phenotype. The variance would be the population of answers from which the algorithm would “learn”, the genotype would be the internal genetic information the variables in the code have, and the phenotype would be the physical or visible expression of the program created in every iteration of the code. The algorithm evolves by taking into account the natural selection, or survival of the fittest. This is done in the following way:
1. The “population” (all possible answers) is evaluated in order to find the members of the population with the most valuable “traits” (parts of the information that would lead to an absolute answer to the problem posed). This is done (in programming) by assigning a numerical value (percentage of closeness to absolute answer) to all possible answers, in order to determine the possible answers that are “closest” to absolute answer.
2. Then, based in probability, the answers that more closely fit the absolute answer should be picked most times, while answers that don’t resemble the absolute answer should be picked fewer times. This ensures that all possible answer have a degree of probability of being picked based on their traits, following the rule of the survival of the fittest.
3. Then, the population should “reproduce” and pass on traits to the “children”. Just like in evolution, children should inherit traits from both parents. This is ensured through: (1) Cross over: The creation of a child with genetic code from both parents. There should be a 50/50 distribution of the traits given to the child (50% from mother, and 50% from father). Nonetheless, the traits given to the child should be random (not all children from the same parents will receive the same traits). In code, this should be seen as the fact that, the “children” created from two possible answers should contain a 50/50 distribution of “traits” from the parents, but the information should be randomly given out to each child, creating variance in the genetic code each child has.
(2) Mutation: After creating a child with traits from the parents, a final step should be taken. This is the inclusion of a mutation of a child’s genetic code. This could be the changing of a character in an array of Strings, for example. The mutations should happen in a rate, like in nature. There is a probability that a child may or may not receive a mutation. Normally, the probability for mutations is small; therefore, the code should include a 5% mutation probability, for example.
After going through these steps, the “population” will evolve, and the “children” will obtain “traits” from the “parents” that will closely resemble the absolute answer. And the “population” will keep on evolving until the absolute answer is found. For example, there could be a code tasked with constructing the phrase “To be or not to be” from at least a 1000 other phrases. The genetic algorithm will check every phrase and compare them, classifying the phrases by fitness or closeness to final answer. Then, the phrases that more closely resemble the final answer will be picked and have a “child”, which will have traits from both parents. Since both parents both closely resemble the final answer, the child should be even more close to the answer. The child will repeat the cycle, having a child with another phrase that closely resembles the final answer. This cycle will repeat itself until the phrase “To be or not to be” is constructed. To summarize this, it could be seen that a genetic algorithm follows these steps:
SETUP: 1) Initialization: Creation of a population of N elements, each randomly generated
LOOP: 2) Selection: Fitness is evaluated, and the phrases mate and have children 3) Reproduction: Which is repeated until final answer is reached. Divided in: a) Selection of parents b) Crossover: Creation of child with traits from both parents c) Mutation: Chance of genetic code of child to change d) Add new child to population 4) Return previous population with new population and return to step 2
With this topic, I saw how we have come so far into our understanding of the world and its mechanisms that we have already transported them to our code, which can help us in creating better, more intelligent code. This could be the base of artificial intelligence, and the fact that it is so close to us is seriously amazing. By having the possibility to create our own intelligent code, we can now transport the rules of nature and have the possibility to create a truly autonomous agent.
My answer to the nature of code exercise 6,18. It was very difficult for me to get a definite answer to this exercise; and, to be honest, I did base my work off of Daniel Shiffman's. I manipulated a bit the variables by setting perlin noise, and different static values, giving different ranges when calculating the variables. These perlin noises added to the code make for the code to vary greatly from one iteration to he next, showing different ways for the flock to group, sometimes showing uniform distribution, while sometimes showing completely random distribution. However, something neat I managed to make, was that at the beginning of the code, the flock will divide into 2 halves, which will crash into each other at the middle of the screen; who knows? Maybe I could use this code to program a simulation of people in a heavy metal music concert
Code:
Flock flock;
void setup() {
size(640,360);
flock = new Flock();
// Add an initial set of boids into the system
for (int i = 0; i < 200; i++) {
Boid b = new Boid(width/2,height/2);
flock.addBoid(b);
}
}
void draw() {
background(255);
flock.run();
}
Vehicle class code -------------------
class Boid {
PVector location;
PVector velocity;
PVector acceleration;
float r;
float maxforce; // Maximum steering force
float maxspeed; // Maximum speed
Boid(float x, float y) {
acceleration = new PVector(0,0);
velocity = new PVector(noise(-1,7),noise(-5,3));
location = new PVector(noise (x),noise (y));
r = 5.0;
maxspeed = 5;
maxforce = noise(0.05);
}
void run(ArrayList boids) {
flock(boids);
update();
borders();
render();
}
void applyForce(PVector force) {
// We could add mass here if we want A = F / M
acceleration.add(force);
}
// We accumulate a new acceleration each time based on three rules
void flock(ArrayList boids) {
PVector sep = separate(boids); // Separation
PVector ali = align(boids); // Alignment
PVector coh = cohesion(boids); // Cohesion
// Arbitrarily weight these forces
sep.mult(1.5);
ali.mult(noise (3.0));
coh.mult(noise(5.0));
// Add the force vectors to acceleration
applyForce(sep);
applyForce(ali);
applyForce(coh);
}
// Method to update location
void update() {
// Update velocity
velocity.add(acceleration);
// Limit speed
velocity.limit(maxspeed);
location.add(velocity);
// Reset accelertion to 0 each cycle
acceleration.mult(0);
}
// A method that calculates and applies a steering force towards a target
// STEER = DESIRED MINUS VELOCITY
PVector seek(PVector target) {
PVector desired = PVector.sub(target,location); // A vector pointing from the location to the target
// Normalize desired and scale to maximum speed
desired.normalize();
desired.mult(maxspeed);
// Steering = Desired minus Velocity
PVector steer = PVector.sub(desired,velocity);
steer.limit(maxforce); // Limit to maximum steering force
return steer;
}
void render() {
// Draw a triangle rotated in the direction of velocity
float theta = velocity.heading2D() + radians(90);
fill(random (255));
stroke(0);
pushMatrix();
translate(location.x,location.y);
rotate(theta);
beginShape(TRIANGLES);
vertex(0, -r*2);
vertex(-r, r*2);
vertex(r, r*2);
endShape();
popMatrix();
}
// Wraparound
void borders() {
if (location.x < -r) location.x = width+r;
if (location.y < -r) location.y = height+r;
if (location.x > width+r) location.x = -r;
if (location.y > height+r) location.y = -r;
}
// Separation
// Method checks for nearby boids and steers away
PVector separate (ArrayList boids) {
float desiredseparation = 25.0f;
PVector steer = new PVector(0,0,0);
int count = 0;
// For every boid in the system, check if it's too close
for (Boid other : boids) {
float d = PVector.dist(location,other.location);
// If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself)
if ((d > 0) && (d < desiredseparation)) {
// Calculate vector pointing away from neighbor
PVector diff = PVector.sub(location,other.location);
diff.normalize();
diff.div(d); // Weight by distance
steer.add(diff);
count++; // Keep track of how many
}
}
// Average -- divide by how many
if (count > 0) {
steer.div((float)count);
}
// As long as the vector is greater than 0
if (steer.mag() > 0) {
// Implement Reynolds: Steering = Desired - Velocity
steer.normalize();
steer.mult(maxspeed);
steer.sub(velocity);
steer.limit(maxforce);
}
return steer;
}
// Alignment
// For every nearby boid in the system, calculate the average velocity
PVector align (ArrayList boids) {
float neighbordist = 50;
PVector sum = new PVector(0,0);
int count = 0;
for (Boid other : boids) {
float d = PVector.dist(location,other.location);
if ((d > 0) && (d < neighbordist)) {
sum.add(other.velocity);
count++;
}
}
if (count > 0) {
sum.div((float)count);
sum.normalize();
sum.mult(maxspeed);
PVector steer = PVector.sub(sum,velocity);
steer.limit(maxforce);
return steer;
} else {
return new PVector(0,0);
}
}
// Cohesion
// For the average location (i.e. center) of all nearby boids, calculate steering vector towards that location
PVector cohesion (ArrayList boids) {
float neighbordist = 50;
PVector sum = new PVector(0,0); // Start with empty vector to accumulate all locations
int count = 0;
for (Boid other : boids) {
float d = PVector.dist(location,other.location);
if ((d > 0) && (d < neighbordist)) {
sum.add(other.location); // Add location
count++;
}
}
if (count > 0) {
sum.div(count);
return seek(sum); // Steer towards the location
} else {
return new PVector(0,0);
}
} }
Flock code ----------------------
class Flock {
ArrayList boids; // An ArrayList for all the boids
Flock() {
boids = new ArrayList(); // Initialize the ArrayList
}
void run() {
for (Boid b : boids) {
b.run(boids); // Passing the entire list of boids to each boid individually
}
}
void addBoid(Boid b) {
boids.add(b);
}
}
TNoC exercise 6,3. This was my solution to the problem, in here, I wanted to simulate the agent to go from one "dimension" or a certain region where they can move faster and more freely, to another "unknown dimension" or region with more air, causing more friction, and the agent to move more slowly. This was accomplished by setting a boundary an an if condition whether the agent was either left or right of the boundary; code:
Vehicle v;
void setup() {
size(700, 570);
v = new Vehicle(width/2, height/2);
}
void draw() {
background(255);
PVector mouse = new PVector(mouseX, mouseY);
fill(200);
rect(width/2, 0, width, height);
// Draw an ellipse at the mouse location
fill(175);
stroke(0);
strokeWeight(2);
ellipse(mouse.x, mouse.y, 48, 48);
// Call the appropriate steering behaviors for our agents
v.seek(mouse);
v.update();
v.boundaries();
v.display();
}
Vehicle source code----------------
class Vehicle {
PVector location;
PVector velocity;
PVector acceleration;
float r;
float maxforce; // Maximum steering force
float maxspeed; // Maximum speed
Vehicle(float x, float y) {
// maxspeed =0.2;
acceleration = new PVector(0,0);
velocity = new PVector(0,-2);
location = new PVector(x,y);
r = 6;
maxspeed = 2;
maxforce = 0.1;
}
// Method to update location
void update() {
// Update velocity
velocity.add(acceleration);
// Limit speed
velocity.limit(maxspeed);
location.add(velocity);
// Reset accelerationelertion to 0 each cycle
acceleration.mult(0);
maxspeed += 0.1;
constrain(maxspeed,2,3);
constrain(maxforce, 0.1, 0.9);
}
void boundaries (){
if (location.x > width/2) {
maxspeed -=0.4;
maxforce -=0.08;
constrain(maxspeed,0.2,1);
}
if (location.x < width/2){
maxspeed += 0.2;
constrain(maxspeed,0.8, 1.8);
}
}
void applyForce(PVector force) {
// We could add mass here if we want A = F / M
acceleration.add(force);
}
// A method that calculates a steering force towards a target
// STEER = DESIRED MINUS VELOCITY
void seek(PVector target) {
PVector desired = PVector.sub(target,location); // A vector pointing from the location to the target
// Scale to maximum speed
desired.setMag(maxspeed);
// Steering = Desired minus velocity
PVector steer = PVector.sub(desired,velocity);
steer.limit(maxforce); // Limit to maximum steering force
applyForce(steer);
}
void display() {
// Draw a triangle rotated in the direction of velocity
float theta = velocity.heading2D() + PI/2;
fill(127);
stroke(0);
strokeWeight(1);
pushMatrix();
translate(location.x,location.y);
rotate(theta);
beginShape();
vertex(0, -r*2);
vertex(-r, r*2);
vertex(r, r*2);
endShape(CLOSE);
popMatrix();
}
}
In this video you can see, alongside some street ambient noises, my answer to the mousefollowing particle system problem in the nature of code. It was very hard for me, honestly speaking, and it didn't really turn out the way I wanted it to. At first, I wanted to impose a particle system that would move independently following a random sequence of numbers, however, translating that into the array list that contained the particles was very hard form me, therefore, I went with the mouse route. However, I will keep on trying, and if I manage to solve that bump in the road, I'll make sure to post the code
In this video, you can see, alongside some ambient street noises, my answer to the cursor following particle system problem. To be honest, I did have a hard time in getting the program to work, and I had to change my approach several times, eventually setting with what I was able to do. Originally, I had the idea of having the particle system follow a random movement, however, It was beyond my limit. However, I will keep on trying to crack the code, and if I manage to solve it, I will make sure to upload the video here
Code:
ParticleSystem ps;
void setup() {
fullScreen();
ps = new ParticleSystem(new PVector(width/2,50));
}
void draw() {
background(0);
ps.origin.set(mouseX,mouseY,0);
ps.addParticle();
ps.run();
}
--------------------------------------
particle class:
class Particle {
PVector location;
PVector velocity;
PVector acceleration;
float lifespan;
Particle(PVector l) {
acceleration = new PVector(0, 0.05);
velocity = new PVector(random(-5,1),random(5,0));
location = l.get();
lifespan = 255.0;
}
void update() {
velocity.add(acceleration);
location.add(velocity);
}
void display() {
strokeWeight(5);
fill(random(255),random(255), random(255),100);
ellipse(location.x,location.y,20,20);
}
}
--------------------------------------
ParticleSystem class
class ParticleSystem {
ArrayList particles;
PVector origin;
ParticleSystem(PVector location) {
origin = location.get();
particles = new ArrayList();
}
void addParticle() {
particles.add(new Particle(origin));
}
void addParticle(float x, float y) {
particles.add(new Particle(new PVector(x, y)));
}
void run() {
for (int i = particles.size()-1; i >= 0; i--) {
Particle p = particles.get(i);
p.update();
p.display();
}
}
}
In this video you can see my answer to the helium balloon problem posed in chapter 2 of the Nature of Code book. In order to make it, I edited my former bouncing ball code and added a force that would simulate the helium that would propel the balloon upward. Additionally, I added a border at the ceiling. It was a fun, easy exercise to get my mind going
Code:
Mover m;
void setup() {
size(360,500);
m = new Mover();
}
void draw() {
background(255);
PVector wind = new PVector(random(-0.01),0);
PVector gravity = new PVector(0,0.1);
float c = 0.05;
PVector friction = m.velocity.get();
friction.mult(1);
friction.normalize();
friction.mult(c);
m.applyForce(friction);
m.applyForce(wind);
m.applyForce(gravity);
m.update();
m.display();
m.checkEdges();
}
-------------------------------------------
Mover tab:
class Mover {
PVector location;
PVector velocity;
PVector acceleration;
float mass;
Mover() {
mass = -1;
location = new PVector(width/2,height);
velocity = new PVector(0,0);
acceleration = new PVector (0,0);
}
void applyForce(PVector force) {
PVector f = PVector.div(force,mass);
acceleration.add(f);
}
void update() {
velocity.add(acceleration);
location.add(velocity);
acceleration.mult(0);
}
void display() {
stroke(0);
fill(140,0,0);
ellipse(location.x,location.y,mass*25,mass*37);
}
void checkEdges() {
if (location.x > width) {
location.x = width;
velocity.x *= -1;
} else if (location.x < 0) {
velocity.x *= -1;
location.x = 0;
}
if (location.y > height || location.y <= 0 ) {
velocity.y *= -1;
location.y = 0;
}
} }
In This video, you can see my answer to the cannonball exercise from the Nature of code ebook. The purpose was to simulate objects thrown out of a cannon. Since the original code I made was very simple with only one object, I decided to make an array of objects instead, which would spawn differently and would have random forces put into them; however, it was difficult for me to restart the whole program, so that you could see it many times without having to restart the program
Code:
Mover[] m = new Mover [6];
void setup(){ size (600,300); for(int i=0; i < m.length; i++){ m[i] = new Mover (); }
frameRate(30); }
void draw(){ background(255);
PVector wind = new PVector (random(1.3,3.1),random(0.03,0.06)); PVector gravity = new PVector (0,0.1);
float c =0.05;
for(int i=0; i < m.length; i++){ m[i].applyForce(wind); m[i].applyForce(gravity);
m[i].update(); m[i].display(); }
}
--------------------------
Mover tab:
Mover[] m = new Mover [6];
void setup(){ size (600,300); for(int i=0; i < m.length; i++){ m[i] = new Mover (); }
frameRate(30); }
void draw(){ background(255);
PVector wind = new PVector (random(1.3,3.1),random(0.03,0.06)); PVector gravity = new PVector (0,0.1);
float c =0.05;
for(int i=0; i < m.length; i++){ m[i].applyForce(wind); m[i].applyForce(gravity);
m[i].update(); m[i].display(); }
}
Code
https://docs.google.com/document/d/1QihK5xwb-NIgxXLv2_rBnFeombNxVAFjLLVkUEDzqAY/edit
Being honest, it was a fun proyect to do, however, I also stumbled upon a lot of trouble when making it. The most prominent problem was the predator, which had to be changed at the end because of its difficulty. Nonetheless, the program does contain the answer to the steps requested. Squidward serves as a pseudo-predator that only follows you and annoys you until you die. In addition, I managed to find a way to kill of the entire ecosystem based on a time-based life span.
The code for the beginning of a videgame called Jesus Quest, which I co-developed alongside Ayax Casarrubias. The game is not yet finished, but I look forward when it becomes a true little game. The code is as follows.
PVector velocity; PVector acceleration ; PVector position; int value=0; PImage img,img2,img3,img4; boolean keyup = false; boolean keyright = false; boolean keyleft = false; boolean keydown = false; boolean keyuplook = false; boolean keyfast = false,start_screen= false; float w=0,ww=0,o=0; int www=1,px=0,game_set=0; float i= random(210); void setup(){ size(450,240,P3D); img = loadImage("jesus.png"); img2=loadImage("background.jpg"); img3 = loadImage("jabus.png"); img4 = loadImage("paragoomba.png"); position= new PVector(height/2,0); velocity= new PVector(0,0); acceleration= new PVector(0,0.5); position.set(0,(height-40)); velocity.set(3,0); } void display(){ pushMatrix(); translate(px,0); image(img2, 0, 0, 600, 240); if(i<=150){ i= random(210); } // image(img, position.x, position.y, 30, 30); popMatrix(); pushMatrix(); image(img4,600+o,i,30,30); o=o-2; if(i<=100){ i= random(210); } if(o==-600){ i= random(210); o=0; } popMatrix(); /* if(position.x>=580+o & position.x<=620+o & position.y<=i+20 & position.y>=i-20){ start_screen=false; } */ if(keyright== true){ px=px-1; position.add(velocity); }else{ } if(keyleft== true){ px=px+1; position.sub(velocity); }else{ } if(keyuplook== true){ if(ww==0){ position.y=position.y-2; } if(position.y<=height-80){ velocity.y=-velocity.y; position.y=height-80; ww=1; } if(position.y>=height-40){ velocity.y=-velocity.y; position.y=height-40; } } if(keyuplook==true){ if(ww==1){ position.y=position.y+2; } } if (keyuplook==false){ ww=0; position.y=position.y+3; } if(position.y<=height-80){ velocity.y=-velocity.y; position.y=height-80; } if(position.y>=height-40){ velocity.y=-velocity.y; position.y=height-40; } } void keyPressed() { if (key == CODED) { if (keyCode == UP) keyuplook = true; if (keyCode == LEFT) keyleft = true; if (keyCode == RIGHT) keyright = true; if(keyCode ==DOWN) start_screen= true; } } void keyReleased() { if (key == CODED) { if (keyCode == UP) keyuplook = false; if (keyCode == LEFT) keyleft = false; if (keyCode == RIGHT) keyright = false; } } void draw(){ background(255); if(start_screen ==false){ pushMatrix(); fill (255,132,120); scale(3); text ("JESUS QUEST", 10, 20); popMatrix(); pushMatrix(); fill(133,10,200); scale(2); text("Show the force of God", 15, 50); popMatrix(); pushMatrix(); translate(0,0,-4); image (img3,250,100, 200,200); popMatrix(); } if(position.y>=(height-39)){ velocity.y=-velocity.y; position.y=(height-40); } if(position.x<=-1){ px=px-1; position.x=0; } if(position.x>=426){ px=px+1; position.x=425; } if (start_screen== true){ display(); } }
The video to the exercise found in the introduction of the Nature of Code book. This wasn’t very hard for me, and i found it very interesting and fun to play and experiment with the code in order to find the different results it could produce.
Code:
void setup() { size(640, 360); background(255); }
void draw() {
// Get a gaussian random number w/ mean of 0 and standard deviation of 1.0 float xloc = randomGaussian(); float yloc = randomGaussian();
float sd = 70; // Define a standard deviation float mean = width/2; // Define a mean value (middle of the screen along the x-axis)
float sd2 =70; float ymean=height/2;
xloc = ( xloc * sd ) + mean; // Scale the gaussian random number by standard deviation and mean yloc = (yloc *sd2 ) + ymean;
int colorR = int (random(255)); int colorG = int (random(255)); int colorB = int (random(255));
fill( colorR,colorG,colorB, 25 ); noStroke(); ellipse(xloc, yloc, 16, 16); // Draw an ellipse at our "normal" random location }
My answer to exercise 1.3 from the Nature of Code book. It was a fun challenge to turn the PVector lessons into a 3D exercise. Even so, I had a bit of trouble with making the sphere and having it move using vectors, as I hadn’t considered using translation functions for some time.
Code for the ball class:
class Ball{ PVector location; PVector Yvelocity; PVector Zvelocity; PVector Xvelocity;
Ball(){ location= new PVector(0,0,0); Yvelocity = new PVector(0,0.5,0); Zvelocity = new PVector(0,0,0.5); Xvelocity = new PVector(0.5,0,0); }
void update(){ location.add(Yvelocity); location.add(Zvelocity); location.add(Xvelocity);
if ((location.x > 5) || (location.x < -5)){ Xvelocity.x=Xvelocity.x * -1; } if ((location.y > 10) || (location.y <-9)){ Yvelocity.y=Yvelocity.y * -1; } if((location.z > 10) || (location.z < -10)){ Zvelocity.z =Zvelocity.z * -1; }
} void display(){ stroke (0); fill(175); translate(location.x,location.y,location.z); sphere(2); } }
Code for the actual program:
Ball b;
void setup(){ size(700,700,P3D); float fov =PI/3.0; float cameraz=(height/2.0)/tan(fov/2.0); perspective(fov, float(width)/float(height),cameraz/100.0,cameraz*10.0); b= new Ball(); }
void draw(){ background(255); camera(100*mouseX/500.0-50, -45*mouseY/500.0, 45, 0,0,0, 0,1,0); noFill(); box(20);
b.update(); b.display(); }