Digital Scene- Individual Responses
Digital Scene (Josh Lim B Block)
Group with Jack and Inal
My Code: (The Sun of the Digital Scene)
//Draws the Sun
function drawSun (size,x,y){
moveTo(x, y);
penColor("orange");
dot(size);
moveForward(size);
penDown();
penWidth(size/6);
// Arcs the turtle a certain amount around the Sun and draws the ray
for (var i = 0; i < 12; i++){
moveForward(size/1.7);
turnLeft();
turnLeft();
moveForward(size/1.7);
turnLeft();
turnLeft();
turnRight();
arcRight(30, size);
turnLeft();
}
}
- Individual Written Responses
After completing your project, respond to each of the following reflection questions. Your response to anyone prompt must not exceed 300 words.
- Provide an overview of the purpose of your program and how your program code works. Describe the most important program features, rather than providing a line-by-line summary of the program code.
My purpose of my program was to just to draw a sun in a random position in our outer space digital scene. Overall, it draws a sun at any random visible position along with a size so the sun can big or small. In outer space, our group thought that we should add one sun along with some planets and stars to make our digital scene look complete. My program first makes the background black to make the scene look in space. It then makes a random size dot with the color being orange. After that, there is a loop that causes the program to draw lines surrounding the sun to indicate that those are the sun’s rays. By the end of the program, the orange sun with its rays is drawn at a random location of the screen while being a random size with it being very distinguishable from the planets and stars in the digital scene as well.
- Describe the most difficult programming problem you encountered while writing your individual code. What was the difficulty? Explain how you resolved it.
The most difficult programming problem I encountered while writing my individual code was drawing the sun’s rays because since we decided that the size would be random, it was creating a segment of the code for it to create equally-long lines coming out of the sun. In order to solve this problem, I had to do trial and error multiple times. Most of the times, it would normally lead to a bunch of messy curvy lines coming out of the sun but that wasn’t the sun rays that we envisioned. It was difficult at first since I had to use more variables such as size and radius to figure out how to make these rays in any type of size. At the end of the product, I was able to create a loop by introducing a for() statement that allowed to make the sun’s rays. In the for() statement, the program was made to move forward, turn left, turn right, and arc right repeatedly until it has done the statement 12 times. The i variable in the for statement indicated that the statement was run 12 times since the i variable adds 1 every time the program runs through known as (var i = 0; i < 12; i++) in the code. This loop was successful and I was able to create an orange sun with an equal set of rays.
- Identify an abstraction used in your program and explain how it helped manage the complexity of your program.
An abstraction used in my program was the for() statement in drawing the sun’s rays. This segment of the code helped manage the complexity of the program as it was a simplified representation of a more complex action, which was drawing 12 tedious lines. Instead, I created a loop that can only draw one line but thanks to the i variable (var i = 0; i < 12; i++), the same loop twelve times, making this loop effective and efficient. If I were to draw the lines 12 times without the loop, it would be a tedious process as the code would have been much longer and more time would have been wasted. This loop allowed me to hide details and help make things simpler while still focusing on relevant concepts and issues.
- Explain in detail points in your development process where collaboration was used.
○ Describe the form of collaboration you used. Refer to Process section A-E in your description.
○ Explain how this collaboration affected your program development. Cite specific examples from the collaboration, such as how the group worked together to arrive at solutions, or feedback that you gave and received.
Our group had a form of collaboration where in the development process, we were thinking and sharing ideas about how the digital scene would look if we were looking at the code from top to bottom. We effectively inspired each other to do a digital scene in outer space with various shapes that can be done with the code we learned such as circles being planets, star being stars, and one circle with lines sticking out being the sun. To make the development process simpler, we split up the work so the coding can be easily be put together and developed into a final version. We also wrote this top piece together, as it puts all of our individual functions together. Because of effective collaboration, code from everyone from the group was able to be completed efficiently and quickly. At the end of the development process, our code was successful but didn’t please everyone of our group yet so we went back and adjusted the code. For example, Inal wanted to fine-tune it since there were an overabundance of stars taking up the background, so we reduced the number of stars in the program and we were all satisfied on how the digital scene looks.
Hey can you please take your digital scene posts down. I teach AP Computer Science Principles, lately most my students have been copying your code down and trying to pass it off as there's.
ReplyDelete