Final Project

For my final project, I wanted to continue my ideas from the midterm and explore more possibilities. To work with abstract shapes and to be able to create images by using the concept of digital drawing.

Screen Shot 2014-12-13 at 5.01.27 PM

 

FINAL PROJECT

import org.philhosoft.p8g.svg.*;

PVector location;
PVector velocity;

P8gGraphicsSVG svg;
void setup(){
size(displayWidth, displayHeight);
noFill();
stroke(150);

smooth();
rectMode(CENTER);

svg = (P8gGraphicsSVG) createGraphics(width, height, P8gGraphicsSVG.SVG, “motifG.svg”);
beginRecord(svg);

location = new PVector(100,100);
velocity = new PVector(2.5,5);

}

void draw(){
//draw circles

//background(0);
fill(0010<<032<<0400);
for(int x=0;x<90;x++){
for(int y=0;y<90;y++){
frameRate(10);
float w=random(0,100);
float h=random(0,100);
rect(x*50,y*50,w,h);

stroke(random(255),random(89), random(90));
// noFill();

}
}
//fill(0010<<032<<0400);

fill(random(255), random(255), 0, 10);
fill(0);
rect(pmouseX, pmouseY, mouseX, mouseX);

noFill();

stroke(random(25),random(89), random(90));
rect(pmouseX, pmouseY, mouseX, mouseY);

// stroke(random(255),random(89), random(90));
//change the color
if(mousePressed){
float r=random(0,255);
float g=random(0,255);
float b=random(0,255);
// float t=random(0,255);
float strokeColor=random(0,255);
fill(r,g,b);
stroke(strokeColor);
}
}

void keyPressed()
{
if (key == ‘s’)
{
svg.endRecord();
println(“Saved.”);
}
else if (key == ‘q’)
{
svg.clear();
exit();
}
}

 

Screen Shot 2014-12-13 at 4.52.47 PM

import org.philhosoft.p8g.svg.*;
//pmouse
//mouse follower
//have different opacities
//mapping
//distance mapping
P8gGraphicsSVG svg;
ArrayList myCircles;

float x = 150; //mouse follower
float y = 150;

//float radius = 50.0;
int X, Y;
int delay = 500;
int value = 0;
//int stroke = 255;
float offset = 0;
float easing = 0.05;
int alphaVal = 1;

float velX = 10;
float velY = 0;
float radiusMe = 1;
float aX = 0;
float aY = 0;
float radius = 200;

int circleSize = 0;
int circleX = 100;
int circleY = 100;

PVector location;
PVector velocity;

void setup() {

size (displayWidth, displayHeight);
smooth();
rectMode(CENTER);

svg = (P8gGraphicsSVG) createGraphics(width, height, P8gGraphicsSVG.SVG, “motifG.svg”);
beginRecord(svg);

location = new PVector(100,100);
velocity = new PVector(2.5,5);
X = width / 2;
Y = height / 2;
}

void draw()
{
// background(175);
fill(random(255), random(255), 0, 10);
//fill(90);
rect(0, 0,5000,7000);
stroke(random(255),random(150),random(90));

fill(0010<<032<<0400);
// tint(255, 127);

ellipse(pmouseX, pmouseY, mouseX, mouseX);

fill(0100<<060);

// ellipse(pmouseY, pmouseY, mouseY, mouseY);
float angle = atan2(mouseY – y, mouseX – x);
// ellipse(x, y, radiusMe*100, radiusMe*100);
// ellipse( pmouseY, pmouseX, radius, 0 );

float distance = dist(y, y, aX, aY);
if ( distance < radius+radiusMe ) {
// stroke(random(25),random(89), random(150));
}
else {
fill(255);
}

// ellipse( pmouseX, pmouseY, 10, 0 );
// noFill();
// ellipse (x, y, radiusMe*100, radiusMe*100);

// radius = radius + sin( frameCount / 200);
// fill( 255);
//stroke(255);
pushMatrix();

if ( distance < radius+radiusMe ) {
fill(255, 0, 0);
}
else {
fill(255);
}
popMatrix();
x += .1 * (mouseX – x);
y += .1 * (mouseY – y);
}

void keyPressed()
{
if (key == ‘s’)
{
svg.endRecord();
println(“Saved.”);
}
else if (key == ‘q’)
{
svg.clear();
exit();
}
}

 

bfeuq
//pmouse
//mouse follower
//have different opacities
//mapping
//distance mapping

float x = 150; //mouse follower
float y = 150;

//float radius = 50.0;
int X, Y;
int delay = 1;
int value = 0;
int stroke = 255;
float offset = 0;
float easing = 0.05;
int alphaVal = 1;

float velX = 0;
float velY = 0;
float radiusMe = 10;
float aX = 0;
float aY = 0;
float radius = 20;

int circleSize = 0;
int circleX = 100;
int circleY = 100;

PVector location;
PVector velocity;

void setup() {

size (700, 700);
smooth();
ellipseMode(CENTER);

location = new PVector(100,100);
velocity = new PVector(2.5,5);

 

X = width / 2;
Y = height / 2;
}

void draw()
{
//background(0);
fill(255, 0, 0, 10);
rect(0, 0, width, height);

// tint(255, 127);
ellipse(pmouseX, pmouseY, mouseX, mouseY);
float angle = atan2(mouseY – y, mouseX – x);
//ellipse(x, y, radiusMe*2, radiusMe*2);
// ellipse( pmouseY, pmouseX, radius, 0 );

float distance = dist(x, y, aX, aY);
if ( distance < radius+radiusMe ) {
stroke(random(255),random(89), random(90));
}
else {
fill(255);
}

//ellipse( pmouseX, pmouseY, radius, 0 );
noFill();
//ellipse (x, y, radiusMe*2, radiusMe*2);

radius = radius + sin( frameCount / 200);
fill( 255);
stroke(255);
pushMatrix();

if ( distance < radius+radiusMe ) {
fill(255, 0, 0);
}
else {
fill(255);
}
popMatrix();
x += .1 * (mouseX – x);
y += .1 * (mouseY – y);
}

void mouseMoved() {
value = value + 5;
if (value > 255) {
value = 0;
}
}

 

 

//Other manipulations using the code

ref 1

 

2

7

6

 

5

 

 

 

Leave a reply