--- title: "Tiny Turtle (turt 2)" id: 72227 type: "computer_media" slug: "tiny-turtle-turt-2" url: "http://localhost/computer_media/tiny-turtle-turt-2/" markdown_url: "http://localhost/computer_media/tiny-turtle-turt-2.md" published_at: "2026-10-23T01:10:26+00:00" modified_at: "2026-10-23T01:10:26+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/tinyturtle-1.png" excerpt: "Draws turtle-graphics spirals and polygons from the centre of the screen, with an increment that changes the turning angle on every step." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Graphics" slug: "graphics" taxonomy: "genre" url: "http://localhost/type/graphics/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/Tiny%20Turtle%20%28198x%29%28-%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Tiny Turtle (198x)(-)(TS2068)(US)(Program).tap" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/10/tinyturtle-1.png" media_type_tags: "Graphics" license: false --- # Tiny Turtle (turt 2) Draws turtle-style line patterns from the centre of the screen. It asks for the number of repeats, the angle to turn right, the number of steps forward, an increment added to the turning angle after each move, and whether to clear the screen first. A zero increment gives regular polygons and stars, and a non-zero increment curls the path into spirals. After each pattern it asks again, so new figures can be drawn over the old ones. The program was saved as “turt 2.” ## Program Analysis ### Program Structure Line 20 defines `FN R` to convert degrees to radians. Lines 40–65 collect the settings. If the screen is cleared, `PLOT 127,87` puts the drawing position at the centre. The loop at 80–130 adds `RIGHT` to the heading, works out the move with `SIN` and `COS`, draws it with a relative `DRAW`, and then adds `INCSTEP` to `RIGHT`. Line 140 returns to the prompts. ### Potential Issues - `ANGLE` is only zeroed at line 30, and the pen is not moved back to the centre unless the screen is cleared. Each new pattern therefore starts from the previous heading and end point. - No bounds check is made, so a pattern that runs off the screen stops with an “Integer out of range” error. ## Source Code ``` 10 REM TINY TURTLE 20 DEF FN R(X)=X*PI/180 30 LET ANGLE=0 40 INPUT "NO. OF REPEATS? ";REPEAT 50 INPUT "ANGLE TURN TO RIGHT? ";RIGHT 60 INPUT "STEPS FORWARD? ";FORWARD 62 INPUT "STEP INCREMENT ";INCSTEP 65 INPUT "CLEAN BEFORE DRAWING (Y/N)? ";A$ 70 IF A$="Y" OR A$="y" THEN CLS : PLOT 127,87 80 FOR A=1 TO REPEAT 90 LET ANGLE=ANGLE+RIGHT 100 LET ACROSS=SIN (FN R(ANGLE))*FORWARD 110 LET DOWN=COS (FN R(ANGLE))*FORWARD 120 DRAW ACROSS,DOWN 125 LET RIGHT=RIGHT+INCSTEP 130 NEXT A 140 GO TO 40 ```