Ji : Drawing tool & Importing an image


1. Drawing tool


스크린샷 2013-10-02 오후 9.29.58

For my drawing tool, I used triangles on white background. Originally I tried to make the color change from yellow to purple and it was working on Java. but after export and uploading, the color changed like that which looks nice and fancy. I like that colorful drawing that I got unintentionally more than original one!

2. Image


스크린샷 2013-10-02 오후 9.30.14

I imported just a random image form my laptop, and this photo was taken at Hirshhorn Museum in Washington DC where I went last summer.

For Code:

1. Drawing toolfloat x;
float y;
float lerp;
int r;
int g;
int b;

boolean colorchange;

void setup() {
colorchange= false;

void draw() {
noStroke ();
color from = color(255,123,0);
color to = color(74,0,191);
color interA = lerpColor(from, to, lerp);
if (!colorchange) {
else if (colorchange) {
if (lerp <=0.001 || lerp >=0.999)
{colorchange =!colorchange;

if (mousePressed==true) {
triangle(x, y, x-10, y-20, x+10, y-20);

}2. Image
PImage img;

void setup() {
size(480, 800);
img = loadImage(“museum.jpg”);

void draw() {
image(img, 0, 0);

28 thoughts on “Ji : Drawing tool & Importing an image

Leave a Reply

Your email address will not be published.