Programming in Javascript - Drawing
This assignment will introduce you to the computer programming in Javascript using the Khan Academy materials.
Complete the Khan Lessons. This assignment assumes you have completed the lesson that takes you through the Khan Academy introduction to programming and drawing material. Your teacher will track that you did all of tutorials.
Complete the Following Steps.
- Your Iniitial . Do the Draw H exercise.
Select your code and copy it so that you can paste it. Go to the Create Program screen. Paste into the new program the final code from the draw H exercise. Add your own code to draw the first letter of your name in blocky rectangles (it doesn't have to be pretty, but it must resemble your initial). If your first initial is H, use your last initial; if they are both H, then draw a C. To get a diagonal block line (e.g. in the letter K), simulate it with many small blocks along a diagonal. Remove the strokes and add a fill color of your choosing. Your program should draw the H AND your initial. Save this at Khan with the program name lastname_myInitial, where lastname is your last name.
- Funny Face. . Do from the Funny Face exercise. Select your code and copy it so that you can paste it. Go to the Create Program screen. Paste into the new program the final code from the Funny Face exercise. Add code to draw your initials (first and last) in lines. Change the color of your initials only. Save this at Khan with the program name lastname_funnyFace, where lastname is your last name.
- Draw Your House . Go to the Create Program screen.
Use Khan javascript drawing commands to draw a picture of your family's house or apartment building. It should have the house and the yard or street in front. Use at least four different shapes like rect(), ellipse(), and triangle(). You can go to the Khan documentation to find other shapes to use. Use fill() and stroke() to color them. Check the "Documentation" tab on the Khan programming window and click for examples. A basic drawing will get most of the points, but there are discretionaty points for a thorough drawing. Save this at Khan with the program name lastname_myHouse, where lastname is your last name.
- Drawn An Animal.
Go to the Create Program screen. Use drawing commands to create a wild looking animal. You can try to draw one of your favorite animals, or if you really want to go wild, invent a new animal that only exists in your head. Your animal should have a background on the screen (solid color or image) as in the example to the right. Go to the Khan documentation to find shapes to use. A basic drawing will get most of the points, but there are discretionaty points for a thorough drawing. Save this at Khan with the program name lastname_myAnimal, where lastname is your last name.