Computer Science Blog # 3


Star Trail



Since the main focus of my inspiration is the stars’ circular movement with the origin of the polar star, called star trail, I will focus on making a detail star trail. Moreover, I will try to add other objects such as mountain and the rock, which can describe a nature place.

  1. Star Trail: I am thinking two ways to create the star trail. The first way is to decrement the pensize of the forward(0). I will first create the biggest circle with a certain origin with the biggest pensize. Then, I will decrement that pensize with a random color. More iterations will make more realistic star trail because the gap between two circles(forward(0)) is smaller. The alternative method is more creative by using an arc. If arc draws a circle depends on its center, it would be much easier and less creative. However, since the arc code starts drawing from the turtle’s head, I would need to add one more code: I will use an iteration that keeps changing either x-coordinate or y-coordinate and uses the magnitude of the changed coordinate as a radius.

    second method
  2. Green Plain: I will use a decrement of shade to demonstrate the scenography so that my final product looks more realistic.
  3. Trees at the front: I will try to utilize ‘if’ and ‘then’ code with the pensize so that the branches of the tree gets sharper and stop when the pensize is zero.
  4. Grasses under the front trees: I will randomize the color, coordinate, shade, pensize, and the setH of forward with random magnitude.

    code of grass
  5. Trees at the back: First, I will make a tree with forward and arc and randomize the location of the trees.
  6. Mountain: I will try to code a three dimension mountain.

Leave a Reply

Your email address will not be published. Required fields are marked *