EZ Programing Demos

Slow motion, step by step, animated demonstrations of basic computer programing techniques

Links to topics:

Current topic:

Set heading

seth means 'set heading'. It aims the turtle by spinning it toward a certain direction.

Here directions are stated in degrees. Some examples:

  • Right: 0 degrees
  • Up: 90 degrees
  • Left: 180 degrees
  • Down: 270 degrees

 Slow  Medium  Fast 
Click 'Run' to go.

Stated in degrees, turtle headings here work this way:

Note that a direction of directly right is 0 degrees (or 360 degrees, as we shall see). The headings increase around a counter-clockwise rotation. This us usually called a positive rotation in mathematics. If you rotate a full 360 degrees, you are back at a 0 degree heading. So, 360 degrees is the same heading as 0 degrees. And rotating further, 390 degrees is the same heading as 30 degrees.


You use the 'set heading' (or seth) command to aim the turtle. It spins the turtle in place. You follow the command with an absolute direction given by an angle usually stated in degrees.

In the actual LOGO computer language the direction of 0 degrees is straight up with increasing values for the angle rotating clockwise. So, a direction of 90 degrees would be directly to the right.

At this site and at EZ Math Movie a direction of 0 degrees is directly right with increasing values for the angle rotating counter-clockwise. So, a direction of 90 degrees would be straight up. We do it that way to duplicate the behavior of an angle in 'standard position' as described in mathematics.


The flowchart for this demo:


Here's how it could all look in imaginary computer code:



Suggested next article:

At EZ Math Movie

    This article is related to this demo:


EZ Math Movie is a site that can help you experiment with and understand many topics in mathematics. Its main feature is an interactive animated (x, y) graph that you control with an actual programing language. There are many examples and tutorials, and EZ Math Movie is crossed referenced with both EZ Programing Demos and Zona Land Education.


Zona Land Education is a site with explanations and interactive diagrams covering many topics in physics and mathematics. Zona Land Education is cross referenced with EZ Math Movie, and it contains several animations that use EZ Math Movie's programing language.