Professional Documents
Culture Documents
Doodling App
Doodling App
Tootles
By: Richard Dorta, Henry Hoare,
Shilian Li, Issac Young
Research Summary......................................................................................................1
Project Summary………...................................................................................................1
Future Plan......................................................................................................................1
Flow Chart.. ........................................................................................................................2
Initial Sketch……...................................................................................................................2
Code/Comments…...............................................................................................................3
Images………….…..............................................................................................................11
Doodling App
Research Summary
The research found out that our user is an urban dweller who was often distracted by
other factors that surround them, such as phone apps and the smell or sound of the
environment. We have designed the doodling app to keep their attention on the phone
in a non-obstructive way while listening to podcasts during their commute.
Project Summary
The full edition of our app will be a functional drawing board that allows users to draw
freely with different tools. The app can let them choose types of brushes, shape tools
and a color picker. The users can also choose to save their progress on the app.
The first version of the app have circles and squares ready to use, users can switch to
the shape that they want to use by press the keys. The color of all shapes is set to
change randomly while the user inputs a new shape on the background.
Future Plan
We are considering to add the function to adjust the size, color and stroke weight of the
shape. Then expand the toolkit and produce different shapes, then complete the color
picker, also add the undo function for a previous shape. Lastly, we would want to make
a preview function to let the users preview what the shape would look like before the
actual placement.
Pseudocode
1. Tap to enter the app=> blank canvas => instructions lead to the toolkit
2. Follow the instruction=> pick shape/ brush & color
3. Set stroke value=>or no stroke
4. Move on the screen to draw && press the screen and hold to preview
5. Release to set shape at the position after the preview
6. Press the “clear” or “Undo” to clear up the mistake
7. Edit the drawing to save or upload the result
Flow Chart
Initial Sketch
Code
//https://processing.org/examples/ referenced
// Richard Dorta, Henry Hoare, Shilian Li, Issac Young
ArrayList<Circle> circles; // an arraylist (an array whose size can change dynamically),
which has a type of the Circle class and is called circles
ArrayList<Square> squares; // an arraylist (an array whose size can change
dynamically), which has a type of the Square class and is called squares
int CircleWidth = 48; //int called CircleWidth set to a value of 48 and is used for the
width(and height) of ellipses in the Circle class
int SquareWidth = 48; //int called SquareWidth set to a value of 48 and is used for the
width(and height) of rectangles in the Square class
boolean drawing = false; //a boolean variable called drawing set to false, used to tell if a
shape has been created, but not set to a locked location yet
void setup() {
size(1200, 800); // set the size of the canvas to 1200 by 800
rectMode(CENTER); //set the drawing mode for rectangles to be based on the center
(rather than the top left corner)
// Create an empty ArrayList (will store Circle objects)
circles = new ArrayList<Circle>(); //create an array list of the type Circle called circles
squares = new ArrayList<Square>(); //create an array list of the type Square called
square
}
void draw() {
background(255); //set the background to white
for (int i = 0; i < circles.size(); i++) { // a for loop to do the following block of code for
every circle in the circles arraylist
// An ArrayList doesn't know what it is storing so we have to cast the object coming
out
Circle circle = circles.get(i); //current circle is equal to the current place in the arraylist
the for loop is at
circle.display(); //calls the display function from the Circle class which draws the circle
on the screen
}
for (int i = 0; i < squares.size(); i++) { // a for loop to do the following block of code for
every square in the squares arraylist
// An ArrayList doesn't know what it is storing so we have to cast the object coming
out
Square square = squares.get(i); //current square is equal to the current place in the
arraylist the for loop is at
square.display(); //calls the display function from the Square class which draws the
circle on the screen
}
if (circles.size()>0 && circles.get(0)!=null && drawing == true) { //if you have at least
one circle already and the first circle actually exists and you're currently drawing
(haven't released the mouse yet)
Circle circle = circles.get(circles.size()-1); //the current circle is equal to the last
circle placed int the circles arraylist
circle.reDraw(mouseX, mouseY, CircleWidth); //continue to draw the current circle
at the location of the mouse on the x and y axis, with the preset circle width
}
}
Circle(float tempX, float tempY, float tempW) { //constructor method for Circle class,
passing in three floats
x = tempX; //set x = tempX which was passed in
y = tempY; //set y = tempY which was passed in
w = tempW; //set w = tempW which was passed in
r = int(random(0, 255)); //set r equal to a random number between 0 and 255 and
convert it to an int
g = int(random(0, 255)); //set g equal to a random number between 0 and 255 and
convert it to an int
b = int(random(0, 255)); //set b equal to a random number between 0 and 255 and
convert it to an int
}
void reDraw(float tempX, float tempY, float tempW) { //redraw method passing in three
floats (method used to set final location of circle
x = tempX; //set x = tempX which was passed in
y = tempY; //set y = tempY which was passed in
w = tempW; //set w = tempW which was passed in
display(); //call the display method
}
Square(float tempX, float tempY, float tempW) { //constructor method for Square class,
passing in three floats
x = tempX; //set x = tempX which was passed in
y = tempY; //set y = tempY which was passed in
w = tempW; //set w = tempW which was passed in
r = int(random(0, 255)); //set r equal to a random number between 0 and 255 and
convert it to an int
g = int(random(0, 255)); //set g equal to a random number between 0 and 255 and
convert it to an int
b = int(random(0, 255)); //set b equal to a random number between 0 and 255 and
convert it to an int
}
void reDraw(float tempX, float tempY, float tempW) { //redraw method passing in three
floats (method used to set final location of circle
x = tempX; //set x = tempX which was passed in
y = tempY; //set y = tempY which was passed in
w = tempW; //set w = tempW which was passed in
display(); //call the display method
}
Images