General Process
Understand the
problem &
timeline
Brainstorm
Identify the problem to solve. It may sound obvious, but its hard to solve a problem
if you dont deeply understand it.
Review the steps of the process for completing this project (see above and
below)
Review Practice PT Project Overview and Rubric - Design a Digital Scene
make sure you understand what is required of you and your teammates.
Make sure you also understand the time constraints. Theres always
too much to do and too little time! This will help you prioritize work later.
What kind of digital scene will you create? Make it rain with ideas! Whether youre
in a group or on your own, take the time to generate lots of different ideas for your
digital scene
Put a time limit on how long you will brainstorm
No criticism of ideas, only building up on ideas
Once you have decided on what your scene will be, complete the Project
Description below. I t must contain a brief description and at least a rough sketch
of what you are trying to create.
Break it down
Use Top-Down Design to identify the major components you will wish to include
in your image. At this point you only need to break down the image at a high level.
Decide as a group what high-level functions y ou will need.
For example, in the Under the Sea project, the high-level functions for
each component were things like: drawAllFish(),
drawAllSeagrass(), drawAllBubbles(), etc. These high-level
functions are all you need to think about at this point.
Complete the Project Component Table below; this is where you will declare
what functions you will write and who will do what.
Project Description
Once you have chosen your topic, write a brief description of it below and include either a sketch or digital image that
shows what you are aiming to draw. Its fine if your image includes more components or detail than you will be including in
your digital scene. You can also have more than one representative image.
https://studio.code.org/projects/applab/tWL47pPyDkUWU2WObc7VEQ
Scene Title:
Cherry Blossoms
Group Members:
Jacek - ground, gradient sky
Lily - road
Quinn - cherry blossoms, sunshine
Ryan - branches
Short Description:
Our digital scene is of a an early morning sunrise in a park surrounded by cherry blossom trees.
Component
Function Name
Group Member
ground
grassBlades
Jacek
sky
gradientSky
Jacek
Branches
drawBranch(Left/R
ight)
Ryan
road
rectangle
Cherry blossoms
cherryBlossoms
Quinn
Sun Beams
sunbeams
Quinn
Lily
ALL:
//Jack's
function gradientSky(startingPosition) {
penUp();
moveTo(0, startingPosition);
for (var i = 0; i < 300; i++) {
//i in this case defines the thickness of the sky, in addition to the extent of gradiency
penWidth(1);
//1-pixel pen
turnTo(90);
penDown();
moveForward(320);
//moves to edge of screen
moveTo(0, startingPosition + i);
//increases y position by 1
penRGB((4/3)*i, (2/3)*i, 255-(5/3)*i, 1);
//modifies RGB values to create a color gradient
//(feel free to modify coefficients as best suited) http://www.perbang.dk/rgbgradient/
}
}
function grassBlades() {
penUp();
penRGB(0, randomNumber(100, 175), 0, 1);
//sets random shade of green
penWidth(randomNumber(1, 5));
//sets random blade thickness
moveTo(randomNumber(0, 320), randomNumber(300, 450));
//defines boundaries by which grass can be drawn
penDown();
turnTo(randomNumber(-45, 45));
//sets grass blade angle
moveForward(randomNumber(5, 15));
//draws random length of grass
}
gradientSky(0);
for (var i = 0; i < 15000; i++) {
grassBlades();
//executes grass drawing 15000 times
}
//Lily
penRGB(170, 170, 170, 1);
penUp();
function rectangle(x, y, z) {
penWidth(15);
moveTo(x, y);
turnTo(0);
penDown();
moveForward(25);
turnRight(90);
penWidth(27);
moveForward(z);
turnRight(90);
penWidth(15);
6
moveForward(25);
}
rectangle(85, 455, 150);
penUp();
rectangle(90, 430, 140);
penUp();
rectangle(95, 405, 130);
penUp();
rectangle(100, 380, 120);
penUp();
rectangle(105, 355, 110);
penUp();
penUp();
rectangle(110, 330, 100);
//
moveTo(85, 450);
turnLeft(90);
penDown();
penWidth(25);
moveForward(150);
penUp();
//
penRGB(100, 100, 100, 1);
moveTo(80, 450);
penDown();
moveTo(100, 305);
penUp();
//
moveTo(250, 450);
penDown();
moveTo(220, 305);
//Ryan
penUp();
for (var i = 0; i < 15; i++) {
moveTo(randomNumber(10, 15), 350);
turnTo(randomNumber(15, -15));
drawAllBranchLeft(15);
drawAllBranchLeft2(15);
drawAllBranchLeft3(15);
}
for (var i = 0; i < 15; i++) {
moveTo(randomNumber(15, 20), 350);
turnTo(randomNumber(15, -15));
drawAllBranchLeft(10);
drawAllBranchLeft2(10);
drawAllBranchLeft3(10);
}
//Draws random branches
function drawAllBranchLeft(length) {
penDown();
penRGB(102, 51, 0, 1);
for (var i = 0; i < 5; i++) {
penWidth(3);
7
moveForward(length);
drawBranchLeft();
}
function drawBranchLeft() {
turnLeft(randomNumber(-15-i, 5-i));
moveForward(randomNumber(5, length));
}
penUp();
}
function drawAllBranchLeft2(length) {
penDown();
penRGB(102, 51, 0, 1);
for (var i = 0; i < 5; i++) {
penWidth(3);
moveForward(length);
drawBranchLeft2();
}
function drawBranchLeft2() {
turnRight(randomNumber(15-i, -5-i));
moveForward(randomNumber(5, length));
}
penUp();
}
function drawAllBranchLeft3(length) {
penDown();
penRGB(102, 51, 0, 1);
for (var i = 0; i < 5; i++) {
penWidth(3);
moveForward(length);
drawBranchLeft3();
}
function drawBranchLeft3() {
turnRight(randomNumber(-15-i, -20-i));
moveForward(randomNumber(5, length));
}
penUp();
}
penUp();
for (var i = 0; i < 15; i++) {
moveTo(randomNumber(305, 310), 350);
turnTo(randomNumber(15, -15));
drawAllBranchRight(15);
drawAllBranchRight2(15);
drawAllBranchRight3(15);
}
for (var i = 0; i < 15; i++) {
moveTo(randomNumber(300, 305), 350);
turnTo(randomNumber(15, -15));
drawAllBranchRight(10);
drawAllBranchRight2(10);
drawAllBranchRight3(10);
}
8
moveForward(350);
}
function cherryBlossoms() {
penUp();
penRGB(255, 105, 180, 0.8);
moveTo(randomNumber(0, 50), randomNumber(0, 250));
dot(randomNumber(4, 7));
penRGB(255, 105, 180, 0.6);
moveTo(randomNumber(50, 100), randomNumber(0, 250));
dot(randomNumber(4, 7));
penRGB(255, 105, 180, 0.5);
moveTo(randomNumber(100, 150), randomNumber(0, 250));
dot(randomNumber(4, 7));
penRGB(255, 105, 180, 0.8);
moveTo(randomNumber(270, 320), randomNumber(0, 250));
dot(randomNumber(4, 7));
penRGB(255, 105, 180, 0.6);
moveTo(randomNumber(220, 270), randomNumber(0, 250));
dot(randomNumber(4, 7));
penRGB(255, 105, 180, 0.5);
moveTo(randomNumber(170, 220), randomNumber(0, 250));
dot(randomNumber(4, 7));
}
for (var i = 0; i < 110; i++) {
sunbeams();
cherryBlossoms();
}
Link:
https://studio.code.org/projects/applab/yKJeO0vXzIkvD2IEWToJ-A
10