Brian, can we cut the text at the bottom after the standards? --MF, 11/15/19
In this lab, students use a sprite not as a character in an animation, but to draw pictures on the stage, using turtle graphics. They also have the opportunity to mimic the work of famous artists.
Josef Albers | Vassily Kandinsky | Kazimir Malevich | Alma Thomas | |
---|---|---|---|---|
original | ![]() |
![]() |
![]() |
![]() |
BJC | ![]() |
![]() |
![]() |
![]() |
Coming soon...
The 6 required lab pages could be split across 3-5 days (105-210 minutes). Expected times to complete follow:
repeat
block to carry out the same action several times.move
block.turn
block.set pen size
block.set pen color to
block with the square picture of the actual color (not the block with a color number). This is fixed in Chrome version 78. pinwheel
block by introducing more input parameters.pinwheel
block as shown in the Take It Further. These are intended as thought-provoking ideas that they can come back to later in the Unit.pinwheel
block twice is better than other options (e.g., copying and pasting the same code, creating a second block called second pinwheel
).pinwheel
block by by introducing more input parameters. Again, this is an example of abstraction.circle
block. A natural choice for the single input would be "radius". The students may need a reminder from the previous page that a regular polygon with a large number of sides, for example a 30-gon, is a good approximation for a circle. The difficulty in this case will be determining the "side length" of the approximating polygon. Students can discover this by experimenting or it may be helpful to remind them that for a regular polygon:forever
, repeat
, and for
blocks. for
block, in addition to providing looping functionality like to the forever
and repeat
blocks, also provides access to the individual stages of a loop with the use of a counter; this enhances the possibilities of what can be achieved by looping.for
block by letting the index start from a larger number and end with a smaller number as shown at right. This code will have the sprite count backwards from 10 to 1.
Coming soon...
pinwheel
version from later page in TIF. Solutions need careful review. --MF, 1/31/19The U1L3p6LoopingwithCounter(answer file) breaks the niceness of Snap! block names and our general rule for block naming. The housekeeping () () ()
block should be named housekeeping, x-position: () y-position: (), direction: ()
and draw squiral () ()
should be renamed as well as its variables input1 and input2, which should be more meaningful too. Same for other blocks: nest squares
, nest polygons
, and draw concentric squares
. The code in this file should also be "cleaned up." --MF, 3/19/18
The same idea applies in U1L3-PinwheelArtAnimation2. And why are there 2 local blocks? There is only one sprite; shouldn't they be normal blocks? Also, the green flag should be removed from this solution. --MF, 3/19/18
All three issues (block naming, local blocks, green flag block) also appear in U1L3-PinwheelArtAnimation1. --MF, 3/19/18
Lastly, the filenames are mixed up: U1L3-PinwheelArtAnimation2 is for Animation 1 and U1L3-PinwheelArtAnimation1 is for Animation 2. --MF, 3/19/18
REPEAT n TIMES { <block of statements> }in which the
block of statementsis executed
ntimes.
procName (arg1, arg2, …)as a way to call
PROCEDURE procName(parameter1, parameter 2, …)which takes zero or more arguments;
arg1is assigned to
parameter1,
arg2is assigned to
parameter2, and so on.
PROCEDURE procName(parameter1, parameter2, …) { <block of statements> }which is used to define a procedure that takes zero or more arguments. The procedure contains
block of statements.
point in direction
block can be any number, and this gives an opportunity to talk about different inputs to point in direction
that produce the same effect. Try, for example, turning on the direction reporter in the Motion palette (it reports the direction of the sprite), but try using point in direction
with an input of -20 and then again with an input of 340. The sprite points the same way—nothing changes—but direction reports -20 and then 340. Clearly, -20 ≠ 340, but they differ by 360:
340 = -20 + 360
Sprite direction is determined only up to multiples of 360, because a complete turn is 360° and that brings you back to where you started. So, using inputs to point in direction
that are multiples of 360:
0,360,720,1080,...
will all bring you back to pointing straight up, and similarly, inputs that are, say, 75 more than these:
75,75+360,75+720,75+1080,...
point in direction
with an input of 75. The mathematical shorthand for this is to say something like "75 is the same as 435 modulo 360, which can be expressed in Snap! as shown at right. (The word modulo was introduced by Gauss as a way to say "except for multiples of." These days, the meaning is often used in other ways, like "The game will take place today, modulo rain.")