banner



How To Draw Letters In Scratch

CS 1150 PEEE   Scratch: Initials

Overview

Your familiarity with Scratch and with programming should be allowing y'all to feel more comfortable as you programme. This programming activity should expand your experience and provide an example of an activeness your students would enjoy—drawing their initials. We look that most elementary students in third form or above should should exist able to do something like this activity. This document has ii parts—the specifications for the consignment and information that should help you amend understand how do to the assignment.

The kickoff step in this assignment is to consider what you want you initials to wait like: How big? Where placed? What color? Some additional planning considerations are provided beneath.

The program you program and implement should come across the expectations below.

  • Pass the dark-green flag examination
  • Use modularization—the Make a Block adequacy— with ane or more than parameters (e.g., peak and/or starting location).
  • Control of sprite animation when moving, e.thousand., decide whether the sprite should turn upside down when drawing function of a circle and have the sprite move at approximately the same speed for all drawing.
  • Depict "UNI" — the "I" should not take upwardly as much room as the "U" and "Due north" and some other set(south) of initials.
  • Have each letter of the alphabet's width be related to its elevation (for well-nigh letters, the width might be well-nigh half dozen tenths of the superlative, for M & W, width would exist most the aforementioned equally the height.
  • Move the sprite(s) out of the way when done.

Submitting Your Piece of work

When yous are finished with your plan you lot will want to share it with the class by placing it in our studio. That process involves:

  • making certain the project is named
  • making sure it is saved on the Scratch site (y'all might want to download a copy to your reckoner also)
  • "sharing" it on Scratch and in adding it to our "studio"

    I think the post-obit approach works

    • click the See project folio push near the tiptop right corner
    • enter any instructions you want people to see when they examine your program
    • enter "Notes and credits" ... minimally the user ids of the student(s) submitting the piece of work
    • click the Share button (near top right of window)
    • ringlet down (and left) till you lot see a bar containing four links: a star, a heart, "Studios", and "Embed"
    • click on the Studios link/tab

      It should show our class studio (PEEE_fall17) as a link and a checkmark (also as a link)

    • click on the checkmark link

      Information technology should turn green.

    • click on the PEEE_fall17 link

      You should exist able to see that your project has been added to the studio.

That should be all it takes to "submit" the programme. Whichever partner submitted the program should have the other partner sign in to Scratch and double check that the project is available in the studio. Don't forget that both partners are to consummate the PAC commenting together.

Annotation that you should always exist able to get back to the projection page or to the Scratch programming environment from which you can access the project page. If yous joined Scratch, your projects should all be bachelor and exist saved regularly past the system.

Grading

I will be checking the programs to encounter if they come across the specifications (noted above). A program that minimally meets all the specs is at least "okay" (will get a C or better). Better programs will go beyond the the minimal specs, east.g., employ variables/parameters and operators to calculate distances, use curves rather than direct lines for letters (due east.g., B, O, etc.), utilise boosted parameters with new blocks, employ multiple sprites, apply varying pen sizes and colors, accept commented & "cleaned upwardly" code, appear well planned rather than the result of guess and check coding, use additional Scratch features in reasonable/appropriate means, etc.

Some Background Information

scratch script for drawing a J with move blocks
scratch script for drawing an E with glide blocks
scratch script calling initial-drawing blocks scratch script to draw a semi-circle

There are at to the lowest degree 2 ways to approach this kind of cartoon:  one) relative—control motion via point in direction __ and move __ steps blocks (the first script image to the correct) and  two) absolute or using coordinates— use go to :__ y:__ and/or the glide __secs to ten:__ y:__ blocks for motility and cartoon (the 2d script image). Both scripts illustrate having fabricated use of building of i'due south ain blocks. Both also illustrate controlling the timing of motility so some are instantaneous and others not.

  • relative movement

    Things happen based on headings and distances. You lot (the sprite) might initially get to a particular location just the actions thereafter first indicate in a item direction and move a particular altitude. Drawing a vertical line and moving back to its peak could involve something like:

    This approach works well for letters the accept mostly horizontal and vertical line (perchance with one-half circles). The first script at the right will depict a J.

  • absolute motility

    Things happen based on the coordinate system. You (the sprite) goes to a particular location and so goes to a dissimilar location, then a unlike location, etc. The pen would demand to be raised and lowered depending on whether cartoon while moving was desired. (the second script)

The scripts also illustrate other concepts. (For the record, the J block definition does not come up from the same program every bit the dark-green-flag block. Green-flag assumes a J block with upper left starting position but the uses a elevation-center starting position.)

  • blocks and parameters (used as variables)

    Ii programmer-defined blocks shown have parameters. In this case the parameters indicate how tall the letter should exist (height) and a starting position for drawing the letter (two values indicate the starting coordinate). When the blocks lawmaking is chosen (meet the next-to-last script) numbers or formulas can exist placed in the instruction (cake) that calls the newly defined didactics (cake). The parameters in the definition are like variables that can be used within the defining script. The value used by the calling block is placed in the parameter for utilize when carrying out the instructions inside the newly defined block.

    This is hard to describe. Please ask questions if yous have any trouble following what is beingness said.

  • timing motility

    Call up that sprites move virtually instantaneously. However, drawing curves or circles requires substantial repetition which slows things downwardly. A nice program does not have slow parts and fast parts; rather the sprite moves effectually at a relatively constant speed (for the drawing parts at least). Try to command the timing and then the sprite'south movement is relatively consequent for all parts of the drawing.

    One way to control timing is to apply the glide __ secs to x: ___ y: ___ block (meet second script). Another is to carve up the altitude into increments and repeatedly move. When y'all know how far you demand to travel this is relatively unproblematic, only divide the distance by some number (e.g., 10) and repeat moving (and perhaps waiting for a bit) that aforementioned number of times (e.g., 10). At that place is a formula for computing distances on the coordinate plane.

  • commenting code

    Yous can attach a comment to any block. This is useful for identifying which part of the lawmaking does which activity or for explaining some tricky fleck of code or calculation. To add a comment, right click on the block and choose "add together comment".

  • drawing a half-circle

    Note that the lesser script contains code to depict a half-circumvolve. Through empirical research (human activity & find or approximate & cheque) I determined a formula that draws a one-half-circle of given bore.

If you lot take questions or difficulties

If y'all accept questions nigh the consignment send me an e-mail or drop by my office. If you have a question while working on the assignment practise the same. Go on in mind that when yous run across something y'all can't effigy out you tin/should recollect, explore, guess and check, etc. but, do not spend more than 15-30 minutes trying to overcome a detail error or problem.

Also, using pair programming helps to reduce the amount of time spent banging one's head on the wall. Remember, ane person types and the other person watches and corrects, questions, etc. After a bit (at most xxx minutes) you change roles.

Source: http://www.cs.uni.edu/~east/teaching/peee/spr18/scratch_initials.html

Posted by: smithknorted.blogspot.com

0 Response to "How To Draw Letters In Scratch"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel