TURTLE GRAPHICS IP 10 2014 MR. MELLESMOEN. LOGO IN THE 1970’S THERE WAS A SIMPLE BUT POWERFUL PROGRAMMING LANGUAGE CALLED LOGO THAT WAS USED BY A FEW.

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

Logo Lesson 1 TBE Fall 2004 Farah Fisher.
Noadswood Science,  To understand the flow procedure when writing programs Thursday, January 15, 2015.
Super Logo. Key Instructions Pendown penup Forward 50 ( this number can change) Right 90 ( this number can change as well) Now try and draw a Early finishers,
Logo Lesson 3 TBE 540 Fall 2004 Farah Fisher. Prerequisites for Lesson 3 Before beginning this lesson, the student must be able to… Use simple Logo commands.
Programming in Python Turtle Graphics Dr. Kristine Nagel Genie Yang Raquel Lawrence Dr. Kristine Nagel Genie Yang Raquel Lawrence Georgia Gwinnett College.
B.A. (Mahayana Studies) Introduction to Computer Science November March Logo (Part 1) An introduction to Logo: drawing, moving,
Classifying Polygons Objective; I can describe a polygon.
Turtle Graphics  Turtle graphics provide a simple way to draw pictures in a window.  The name suggests the way in which we can think about the drawing.
Polygons:.
Warm Up Jarod and Wake were building a castle using blocks. They began discussing the parallel sides on each of their quadrilaterals. Jarod said that all.
Patterns and Transformations $10 $20 $30 $40 $50 $30 $20 $40 $50 $10 $40 $50 Combine Shapes Patterns Polygons Transformations Transformations are worth.
Microsoft® Small Basic
1 CSC 221: Computer Programming I Fall 2011 Fun with turtle graphics  turtle module  relative motion (setup, reset, left, right, forward, backward) 
Georgia Institute of Technology Barb Ericson Georgia Institute of Technology May 2006 Teaching Java using Turtles part 2.
Art 321 Lecture 7 Dr. J. Parker. Programming In order to ‘make things happen’ on a computer, you really have to program it. Programming is not hard and.
Class 2 Introduction to turtle graphics
Turtle Graphics  Turtle graphics provide a simple way to draw pictures in a window.  The name suggests the way in which we can think about the drawing.
Agent P, I have been hearing some rumours about a Python Turtle.
Logo For beginners By Dali Matthews 9S What is logo?
An introduction to Logo Mike Warriner Engineering Director, Google Note: This course is not an endorsement of Logo by Google. All views in this document.
By. Circle Draw a circle in the box Tell about its attributes: sides, angles, whether or not it’s a polygon. Add any additional information you know about.
Sketchup For 3D Design, Part 3. Directions: Choose one of the classroom 3D objects. Measure all sides with a ruler. Re-create this object in Sketchup,
Section 1 Introduction National 4/5 Scratch Course.
LOGO as a Programming Language for Education. Background LOGO  The LOGO language was developed in 1967 by the Logo Group at MIT under the direction of.
Java Introduction part 2 CSC1401. Overview In this session, we are going to examine some of the instructions from the previous class in more detail.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
11.3 Perimeters and Area of Similar Figures
A polygon is a closed figure made by joining line segments, where each line segment intersects exactly two others. Polygons.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
Class Opener 1 – 18 – 12: The diagonals of a quadrilateral are perpendicular bisectors of each other. What is the name that best describes the quadrilateral?
Learning to program a turtle to build different structures.
Circles, Polygons and Area WHAT CAN YOU DEDUCE, GIVEN VERY LITTLE INFORMATION?
Computer Programming. Previous Experience 1.I have never seen a computer program 2.I have seen some code, but never written any 3.I have written some.
First of all – lets look at the window’s you are going to use. At the top you have a toolbar, with all your various tools you can use when customising.
Turtle Graphics Let’s see what we can draw on Python!
Turtle Graphics Lesson 2 1. There are 3 homeworks to complete during the six lessons of this unit. Your teacher will let you know when a homework has.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
The Interior Angles of Polygons. Sum of the interior angles in a polygon We’ve seen that a quadrilateral can be divided into two triangles … … and a pentagon.
Search for it on your computer
Introducing the turtle
Plane Figures. What are the types of figures? A closed figure begins and ends at the same end point. An open figure has ends that do not meet.
Using the Python Turtle
Stage 3: Artist What do you remember from the last class?
Computer Programming.
LOGO BY Kaotip 9S.
Intro CS – Loops & Creating Shapes
Opener: How many diagonals does each polygon have
Do Now.
What is a Polygon?.
Radial differentiation slide
A Tiny Look at the Graphics Window
Agent P, I have been hearing some rumours about a Python Turtle.
Learning to program with Logo
Let’s make a shape…. Move!
Microsoft® Small Basic
البرمجة مع لغة PYTHON TURTLE
11.3 Perimeters and Area of Similar Figures
11.3 Perimeters and Area of Similar Figures
Teaching Java using Turtles part 2
TECH 9 3D Design with Sketchup
Topics Augmented Assignment Operators Sentinels Input Validation Loops
7.7 Perimeters and Area of Similar Figures
Introduction to Turtle Graphics
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
A Tiny Look at the Graphics Window
Logo Programming.
Teaching Java using Turtles part 2
How to Draw a Regular Polygon
Presentation transcript:

TURTLE GRAPHICS IP MR. MELLESMOEN

LOGO IN THE 1970’S THERE WAS A SIMPLE BUT POWERFUL PROGRAMMING LANGUAGE CALLED LOGO THAT WAS USED BY A FEW RESEARCHERS. IN THE ’80’S TURTLE GRAPHICS WAS ADDED TO THE LANGUAGE AND THE POPULARITY OF THIS LANGUAGE GREW IMMENSELY

THE TURTLE TO BEGIN, WE NEED TO MAKE THE TURTLE VISIBLE ON THE SCREEN. SIMPLY TYPE IN: TURTLE.SHOW( ) WHAT YOU WILL SEE IS A WHITE GRAPHICS WINDOW WITH A GREEN TURTLE IN THE MIDDLE. IT IS THIS TURTLE THAT WILL FOLLOW OUR INSTRUCTIONS AND DRAW WHAT WE COMMAND IT TO.

MOVING AND DRAWING ONE OF THE INSTRUCTIONS THE TURTLE UNDERSTANDS IS MOVE. THIS OPERATION REQUIRES A NUMBER TO TELL THE TURTLE HOW FAR (OR HOW MANY PIXELS) TO MOVE. ENTER THE FOLLOWING: TURTLE.MOVE (100) IF ENTERED CORRECTLY YOU SHOULD HAVE SEEN THE TURTLE MOVE 100 PIXELS UP. HOW DO YOU THINK YOU COULD MAKE IT MOVE 100 PIXELS DOWN?

DRAWING A SQUARE TRY THE FOLLOWING TO SEE IF YOU CAN CREATE A SQUARE: TURTLE.MOVE(100) TURTLE.TURNRIGHT( ) TURTLE.MOVE(100) TURTLE.TURNRIGHT ( ) THESE ARE THE FIRST 4 LINES OF COMMAND YOU WILL USE. YOU NEED TO FIGURE OUT HOW TO COMPLETE THE SQUARE.

USING A FOR LOOP WE CAN USE A FOR AND ENDFOR LOOP TO DRAW A SQUARE. FOR I = 1 TO 4 TURTLE.MOVE(100) TURTLE.TURNRIGHT( ) ENDFOR When you are done try this one: For i = 1 To 4 GraphicsWindow.PenColor=GraphicsWindow.GetRandomColor( ) Turtle.Move(100) Turtle.TurnRight( ) EndFor

GETTING A LITTLE MORE COMPLEX WE CAN HAVE OUR TURTLE DRAW MORE COMPLEX SHAPES BY ADDING A TURN COMMAND. WHAT DO YOU END UP WITH WHEN YOU INPUT: FOR I = 1 TO 6 TURTLE.MOVE(100) TURTLE.TURN(60) ENDFOR

ANGLES FOR A REGULAR POLYGON THE ANGLES ARE FOUND BY DIVIDING 360 BY THE NUMBER OF SIDES (I.E. THE HEXAGON HAD ANGLES OF 60 BECAUSE 360/6 SIDES = 60) ARMED WITH THIS, TRY: SIDES=12 LENGTH=400/SIDES ANGLE=360/SIDES FOR I = 1 TO SIDES TURTLE.MOVE(LENGTH) TURTLE.TURN(ANGLE) ENDFOR

CIRCLE (OR CLOSE TO IT) IN YOUR LAST PROGRAM YOU ENTERED THE NUMBER OF SIDES AS 12, WHAT WOULD YOUR SHAPE LOOK LIKE IF YOU TOLD THE COMPUTER TO USE 200 SIDES? 500? TRY IT!

TRY THIS ONE SIDES=50 LENGTH=400/SIDES ANGLE=360/SIDES TURTLE.SPEED=9 FOR J = 1 TO 20 FOR I = 1 TO SIDES TURTLE.MOVE(LENGTH) TURTLE.TURN(ANGLE) ENDFOR TURTLE.TURN(18) ENDFOR

MOVING AROUND YOU CAN USE A COMMAND CALLED PENUP. THIS WILL TELL THE TURTLE TO STOP DRAWING UNTIL YOU TELL IT TO PENDOWN. TRY: SIDES=6 LENGTH=400/SIDES ANGLE=360/SIDES FOR I = 1 TO SIDES FOR J = 1 TO 6 TURTLE.MOVE(LENGTH/12) TURTLE.PENUP ( ) TURTLE.MOVE(LENGTH/12) TURTLE.PENDOWN ( ) ENDFOR TURTLE.TURN(ANGLE) ENDFOR

CHALLENGE USE THE TURTLE TO WRITE THE NUMBER 11 DON’T PEAK AT THE NEXT SLIDE, BUT THE PROGRAM FOR 11 IS THERE.

DON’T PEAK! TURTLE.MOVE(100) TURTLE.TURNLEFT() TURTLE.MOVE(10) TURTLE.PENUP() TURTLE.MOVE(20) TURTLE.PENDOWN() TURTLE.MOVE(10) TURTLE.TURN(180) TURTLE.MOVE(10) TURTLE.TURNRIGHT() TURTLE.MOVE(100)