Filling in a Code

After looking at Artemis' Hallo code on the TurtleStitch gallery, I was intrigued by how she was able to fill in the flower petals. I thought to myself, This never came to mind! I didn't know it was possible! I decided to code a circle and fill it in. I was instructed to code two different scripts so they could run at the same time, therefore, creating gaps that will be filled in.



In the code above, the script on the left creates a line that glides up, while the one on the right creates a line that glides to the right. Since these two codes are run at the same time, it creates a gap that becomes filled in. If I were to run the codes separately, it would look like this:

I wanted to try the same code on TurtleStitch, and it looked like this:

The two lines look like functions I have done in Calculus, and (-121, -91) is the point of intersection.

Comments

  1. Great this feature of Scratch is finally documented on the internet. I don't think it translates easy to stitching. An idea that comes to mind is to let the turtle "record it's x-position and y-position" when it makes the move. You could use the left "glide" for the starting points, and the right glide for the end points. Once you these lists (four of them: x-values start / y values start / x-values end / y-values end) you can instruct the turtle to stitch between starting and end points.

    ReplyDelete
  2. Hey Jennifer!
    Send you an email about that. Cool, that you found a way to fill a shape by gliding parallel! I think the programms do absolutely the same, but it is a matter of display, which make them look differently. The blue lines are just the displayed stitching points, which are very dense besides each other.

    ReplyDelete

Post a Comment

Popular posts from this blog

What is Your Zodiac Sign?

Resizing and Adjusting a Pattern

Cracking Down a Code #1

Connecting TurtleArt with TurtleStitch

Stitch Warnings!