Today, I am looking and extracting
a code on TurtleStitch so I could get a better understanding of what each block does to create a certain design.
|
Original code |
I will go in order from top to bottom and explain the blocks:
|
Figure 1 (max_stepsize=40) |
- when (flag) clicked: this block is used to control the script so when you click on the green flag, the turtle will start stitching the code.
- go to x: 0 y: 0: this block is used to direct the turtle to the center of the stage.
- set __ to __: this block is used to set the chosen variable to a given value (string or number).
a) max_stepsize is the spacing between the stitches so if it was set to 10, then it would look like the above image. If I changed it to 40, it would look like Figure 1.
b) len seems to be the size of the center of the design. When I set it to 50, I realized the center got bigger and when I set it to 100, there was an even greater difference (Figure 2).
|
Figure 2 (len=100) |
clear: it is used to remove any marks the turtle may have left behind.
- pen down: (check my other blog post!) it is used to start the stitching process.
|
Figure 3 (repeat 20) |
- repeat __: this block is used to create the same pattern or to loop the blocks that are held inside that block. If I reduced the number of repetitions to 20, the design would be a lot smaller and if I increased it, it would become larger. (Figure 3)
- if __ then, else __: this block is saying that if the boolean (hexagonal block) condition is true, the code inside the first space will activate and the script will go on, but if it is false, the code in the space under else will activate.
- __ > __: this block checks if the first value is greater than the second value and if it is, then the block is true, but if it isn't then it is false. In this certain code, the len should be greater than max_stepsize so the script could continue and if it isn't, the turtle would just do what is in else.
- round __: this block rounds a given number to the nearest integer.
- if __: this block is used to state that when a condition is true, the blocks held inside will run.
- __ mod __: this block states the remainder of the division when the first value is divided by the second. In this case, len is divided by max_stepsize.
- __ / __: this block states the quotient after the first number, dividend, is divided by the second number, divisor.
- __ +__: this block adds the two values together and states the sum.
- move __ steps: this block moves the sprite forward a certain number of steps.
- turn __ __ degrees: this block rotates the direction the turtle is facing.
I really like to organize your writing style, the right informationBlocs Crack Mac
ReplyDelete
ReplyDeleteI am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
Blocs Crack Mac
Blocs Crack MacI am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
ReplyDeleteMy response on my own website. Appreciation is a wonderful thing...thanks for sharing keep it up. Adobe Audition CC Crack
ReplyDeleteNexus Expansion Pack Crack
Marmoset Hexels Crack
UnHackMe Crack
<a
Cracking Down A Code 1 >>>>> Download Now
ReplyDelete>>>>> Download Full
Cracking Down A Code 1 >>>>> Download LINK
>>>>> Download Now
Cracking Down A Code 1 >>>>> Download Full
>>>>> Download LINK Hx
Cracking Down A Code 1 >>>>> Download Now
ReplyDelete>>>>> Download Full
Cracking Down A Code 1 >>>>> Download LINK
>>>>> Download Now
Cracking Down A Code 1 >>>>> Download Full
>>>>> Download LINK 77
Amazing blog! I really like the way you explained such information about this post with us. And blog is really helpful for us this website아로마
ReplyDelete아로마
아로마
아로마
아로마
아로마
아로마