## Recreation Project- Falling Down Looking the Eclipse-Computer Science Blog Post #2

February 24, 2019

From the previous blog post, I have decided to make a recreation project that uses the “Eclipse” and “Peaks” project from turtle art. The main reason I have decided to use these two was that with these two, I was able to make a story out of it.  In my recreation project, there is a stickman, and I have changed the color of the peaks. Also, I have decided to change the color of the moon and the size as well. Thus, I made the moon so big that, this unexpected phenomenon of an eclipse, has happened in front of the stick man’s eyes. From what we already know, a solar eclipse is when the moon covers the sun and perfectly fits the sun which is a total solar eclipse. However, in this story, the moon is just a huge giant that, it is so big that it makes the stickman shocked, and it is about to cover the whole sun. I also, changed the colors of the mountain because I wanted this stickman to be in a situation where he is going out for a hike on the mountains by himself, and he was the only one noticing this “magic.”

Because I was transferring some turtle art codes to processing, it was essential for me to use the incrementing pattern for the repeats I have. However, I didn’t stop with only using increments for the codes I got from turtle art. I used some increment/decrement pattern to make my stars since I wanted to have it a tiny star each time to make the moon in my project. For recreation, I have also used the debugging tool by using println.

My Moon:

As far as how the code runs in my recreation project, for the moon, I had added some shade so that there is much more of whiteness than the by the sun. This is for me to explain to the audience that this total solar eclipse is exceptional because there isn’t any red moon but white mon instead. To recreate this image, I also used additional parameter patterns in my processing. I started using this after our teacher, Mr. Beatty, has shown us how we can use parameter patterns in processing. From my peaks, I used peaks( int X, int Y) so later on, when I used my setXY, I would do everything according to my X and Y that I used in the main code of that block. Not only that, I used many incrementing as I used this text-based coding which is from the while code p++.

My stickman was the main character that I have used to make my recreation project. I tried to make the eyes for the stickman, and by using a sub-procedure block of a sub-procedure block, I was really successful, make it look real as a person that is about to fall down looking at this non-nature phenomenon. I also used penUp and penDown to show that I can use these tools to make an exact drawing. After making the stickman, when I put it in my main code, I had to move the pen away from the moon, so I needed penUp, so I moved to the place where I needed the stickman to be drawn at. However, from writing this block post, I think I could have reduced this block a little bit because there were two turns to the right in the 19th line and I think a lot of the parts were repetitive, so I could have used a different way such as using other parameter patterns to make this code a little simple.

This block of code is how I made my eyes. As we can see, I have used PenSize really which was tiny, and had several arcs because it is going to have two eyes but in different places. I was considering using the repeat block in hear, however, I thought that was very inefficient and time-consuming. Therefore, I just decided to make 7 lines of code. In this code, because I am putting it in the stickman code, I did not have anything extraordinary.

This is my Star’s code. As we can see from the code, I used iterations for this code. However, one thing I didn’t do was changing the setXY which means there would be 35 stars in one place, the same place. However, when I tried my piece of code with changing the block, I found out that there were problems with overlapping the mountain, which made the mountain look really shiny. Therefore, I thought this would just make a huge mess in my project which I decided to just put it in one place. In conclusion, in this block of code, I used iterations. Adding on, whenever I tried to change my code for stars, the sun would change making my project look ugly.

This is the code for my peaks. As we can see, I used the parameter pattern that Mr. Beatty told us and has setXY to use the parameter pattern. In this block of code, I also repeatedly used the peak block, so there are many mountains but I won’t have to make the code look really messy which is a way to destroy my project. I used setting Color, setting Shade for a better-looking color which is different from the turtle art code. I usually think mountains as more of a green object, So, instead of using blue, I chose green. Also, it is more logical because blue makes the art look “cold” but green makes it look “happy.”

This is my peak code. It is straightforward, and the only thing I had to do is setting the head and making iterations.

Lastly, I would like to introduce to another principal object, my sun. My block for the sun also uses iterations, and as I mentioned from the top of this blog post, I used println to see whether there were problems with the sun or not. I set the shade as 60 because it still has to look bright and it’s before the moon has covered the sun.

Therefore, I used parameter, iterations, sub-procedures to make my main code, increments, and decrements, variables were also used in the project I have made for recreation.

Final Image of recreation:

Entry Filed under: 2018-2019,Design,Electives,Grade 9. Posted in  2018-2019 ,Design ,Electives ,Grade 9 .