Graphics intro lesson

advertisement
Woof, Bark, Bark
Simple Turing Graphics
The Screen
(0,400)
(600,400)
(150,300)
300
(0,0)
150
First line of code: View.Set(“graphics:600;400”)
(600,0)
All Draw commands need…
• A colour!
• Colours are numbers between 0 and 255
• There are some predefined colours that
you can use: black, red, yellow, green…
• There is a colour chart in the Turing
Resource section of the website.
Lets Draw some Stuff!
• All graphics commands start with Draw.
• Try this one: Draw.Dot(200,100,24)
– 200=x coordinate
– 100= y coordinate
– 24 is the colour
• Colours a single pixel
Draw.Box
• Creates a Box…
• Try this: Draw.Box(10,10, 60,60,red)
(60,60)
v
(10,10)
The Turing Help
•
•
•
•
Press F10
Has how the commands work
Sample programs
Tips on how to do cool things!
Click on the Index Tab
The Turing Help
Draw.
Double click on these commands
to see how they work!
Your Graphics Assignment
• On the site!
Download