- Creating 3D-printable landscapes and craters in Logo
Terrain can be saved as STL files (under the File menu in the web IDE) and then 3D printed!
setterrain
| style (word)
Creates terrain on the z-plane between the specified x and y co-ordinates.
These co-ordinates represent 10 turtle-units, ...
- Turtle Wordle: A Clone of Wordle in 60 Lines of Logo
Wordle, a cross between Mastermind and Hangman, seems to be the rage these days. Also, implementing it in as few lines as possible. In Logo we get to cheat a little about the second bit, as we can stack multiple commands on the same line. But we still need to keep things within a reasonable ...
- Floaty Turtle: A Flappy Bird clone in Logo
Floaty Turtle is a simple clone of Flappy Bird written in the Logo programming language that turtleSpaces uses.
Open in the integrated development environment (IDE)
NEWTURTLE "myrtle
TO floaty
;here is yet another example of a relatively complex
;game that can be rather simply implemented in Logo:
;a flappy bird clone!
;to make it ...
- Bale Example: Dodgeball
Dodgeball is a very simple game using a bale wherein the player moves the turtle from the left to right sides of the screen using the keyboard.
This is similar to a popular example used to teach Scratch, and the basic concept should be familiar to most Scratch learners.
In the case of this example, there are ...
- Activity Idea: Gone Fishin’
Build this cool island scene using turtleSpaces Logo and a few basic shapes!
First we begin with a tree. We can build a trunk using a repeat loop of cylinders that get narrower in diameter and longer as we go. We can introduce a slight curve as well by tilting the turtle up a bit each ...
- turtleSpaces Halloween!
Witches, pumpkins, devils, ghosts and black cats are all haunting turtleSpaces this Hallowe’en! turtleSpaces is great for creating 3D models using code.
You can also find these models in the Published projects section of the webLogo interpreter.
The Pumpkin:
The pumpkin is created using the spheroidslice primitive, which creates an elongated slice of a sphere. By creating ten ...
- Creating Animated Videos Using turtleSpaces
The above animation was created inside turtleSpaces, and then exported as a webm video file using the savewebm primitive. I then used Final Cut Pro to add the audio and the titles.
The Logo code used to create the animation is fairly straightforward. The turtle moves in an arc outwards from the center, creating arcs around ...
- Example: Towers of Hanoi
This rendition of Towers of Hanoi is a simple game to code and makes introductory use of 3D shapes. Recreating it could serve as a great introduction to turtleSpaces and Logo coding in general.
In the game, you attempt to transfer the disks on post 1 to post 3 ending in the same order the disks ...
- Example: Plane Trapped in a Torus
This example demonstrates the use of various camera-related functions, shape inversion, the premodel primitive and others to create this cool animation of a plane trapped in a torus!
The procedure first sets the turtle model to the built-in plane model, before creating a tag that sets the color of the torus. Then it creates an inverted ...
- Rocket Orbit
This simple commented project allows for the introduction of 3D movements and shapes (the rocket procedure) including a basic introduction to repeat, the creation of turtle models and the use of premodel, an introduction to the orbit primitives and the use of a new worker (thread) for orbiting the camera!
TO rocket
forward 70
...
- Example: Tetris written in turtleSpaces Logo
What do Steve Wozniak and George H.W. Bush have in common? They’ve both been seriously into Tetris! But who can blame them? The object of the game (as if you didn’t know) is to complete horizontal lines using falling shapes of various configurations. When you finish a line, it disappears, causing the rest of the blocks to fall down a line. However, if you stack up shapes to the ...
- Example: Invasion (3D Space Invaders Clone)
Check out this simple space invaders clone, featuring 3D UFO’s and UFO and player movement. This runs well on both the application and in the web version using modest hardware.
Rather than using hatchlings each with its own thread (worker), Invasion creates 15 static turtles representing each UFO, then iterates through moving them using the main ...
- Random Sine Wave Flowers Made With turtleSpaces Logo
This simple yet attention-grabbing Logo procedure is a real visual treat, creating random three-dimensional ‘flowers’ based on the sine function. This could spice up a math class or just provide a brief introduction to sine waves in general.
The procedure makes use of the move primitive, which allows the turtle to move based on an arbitrary ...
- Simple Hexagon Pattern
Here is a simple Logo project to get started with. It creates a colorful filled hexagon pattern using the polyspot primitive.
TO hex
clearscreen penup
;not drawing lines
repeat 10 [
;do all of the following ten times
setpos ...
- Example: My Gosh, It’s Full of Stars!
Open in turtleSpaces IDERun starscape to create a galaxy of randomly-shaped and colored stars.
TO star :radius :points :size :filled
;takes number number number boolean (true or false)
;eg star 10 9 40 false
;or star 20 5 50 true
pu dropanchor tether
;pull up the turtle pen, drop ...
- Example: It’s Turtles All The Way Down!
In turtleSpaces, you can ‘stamp’ the current model, leaving a copy of it in the current position. This can be useful in some circumstances, to create artworks made out of more sophisticated models. In the case of this example, we’re going to use the default ‘myrtle’ turtle model to create a descending spiral of turtles.
If ...
- One-A-Day: Qtips
Today’s example is short but sweet. It creates a design made out of a bunch of qtip-like ‘sticks’ with balls on the ends.
It is a design made out of ‘almost squares’ (four sides each at an 85 degree angle to each other). The turtle then turns right 5 degrees, and slides left 20 before continuing ...
- Logo Fireworks
This Logo program uses hatchlings to create simple 2D fireworks. The turtle’s model is changed into an icosphere to simulate a launching firework, and then more hatchlings are used to create the starburst. The trails are merged back into the main turtle ‘track’ and the hatchlings are terminated, leaving the rendered drawing on-screen at the ...
- turtleArt Thumbtack String Corkboard
This commented Logo source code creates a thumbtack, a cork board, and then draws random string art using them.
Read the ;comments to learn more about what the primitives do and what their shortcuts are.
Try some of the primitives out in turtleSpaces interactive mode (the myrtle prompt) and see what they do!
You can drag-select the source ...
- Solar System Simulation
This Solar System simulation features the ability to add orbiting moons to the planets, a few of which are already defined. It is not entirely to scale (the planets are larger than they are in reality).
Use the scrollwheel or finger-scroll to zoom in and out, and drag the mouse to rotate around the sun!
TO solarsystem
...
- One-a-Day: Space Tube Ride using TUBE and TUBEARC
Sometimes Myrtle needs to take a break and have a little fun! One of the things she can do is make a space tube and fly through it, using the TUBE and TUBEARC primitives:
TUBE makes a straight tube, and takes the parameters <radius> <depth> and <sides>. So, tube 20 10 10 makes a tube with ...
- One-a-Day: Amiga Ball Bounce
The Commodore Amiga computer had a famous ‘bouncing ball’ demonstration program, a checkered bouncing ball. It was a bit different than this, but this is certainly reminiscent of it.
We love the Amiga demo so much that we created a special checkered ball primitive, AMIGABALL, and a second ‘oid’ primitive, AMIGABALLOID, which is used to create ...
- One-a-Day: FRAG
The FRAG primitive creates a filled shape out of the current turtle position and her last two positions. For example:
FD 100 RT 90 FD 100 FRAG
will create a triangle.
While turtleSpaces has a variety of shape primitives, sometimes you need to create an arbitrary shape, and FRAG aids you in this.
Take this example, which draws a ...
- Quick Play: Warped Logo Spirals
One of the best things about turtleSpaces is its capacity for discovery through play.
Today I was playing with spirals:
I started off by creating a simple spiral using the RARC primitive and a simple REPEAT loop. This loop uses REPCOUNT (the current repeat loop iteration) to define the radius of the arc, resulting in an ever-growing ...
- Make it Rain!
TO rain
reset
penup hideturtle
fullscreen
setbackgroundcolor blue setbackgroundshade 12
make "count 0
forever [
inc "count
setposition {-300 + random 600 300 -300 + random 600}
make "size 0.25 + ((1 + random 20) / 20)
...
- ‘Snake’ written in turtleSpaces Logo
TO snake
;setup:
reset
;empties (erases) all containers (variables),
;returns the turtles to their default positions,
;restores their states to defaults
release
;sets all the turtles, except for the default ones
;(myrtle, snappy, libby) 'free' - erasing ...
- Example: Spiral Tunnels
TO spiraltunnelanimation
reset fullscreen
setbackgroundcolor 0
dropanchor penup
raise 190 pullout 50
repeat 2100 [
setfillshade -15 + int (repcount / 65)
setfillcolor (item 1 + remainder int (repcount / 2.35) 8
{red orange yellow ...
- Examples: Turtle Art
Logo is great for creating art! And 3D Logo makes it even better.
Many of these Logo artworks were inspired by examples created by Seymour Papert’s daughter Artemis Papert using the two-dimensional block-based TurtleArt application developed by LCSI Logo developer Brian Silverman. We’re grateful for both of their efforts in advancing Logo over the past several ...
- Example: Fly Me to the Moon
Let’s make a rocket ship kind of like the Saturn V used in the moon landings!
TO rocket
;step
;uncomment step line above to 'step through'
;building the rocket. You will need to call
;rocket twice
clearscreen
penup
up 90
...
- Example: Random Solar System
Create a ‘random’ solar system and surrounding star field using these commented Logo procedures:
TO solsys
reset
;reset the turtles and clear the environment
fullscreen
;don't display text
ask "snappy
;ask the camera turtle to pull away from
;myrtle 1000 turtle units
...
- Example: 3D Filled Trees
Filled triangles
TO tree
clearscreen penup
setpos setfillcolor 4
repeat 6 [
setfillshade -6 + 3 * repcount
;repcount returns the current iteration
back 4 * repcount
fiso 8 * repcount 5 * repcount
;fiso = filled iso triangle
...
- Example: Sierpinski’s Turtles
Sierpinski’s Gasket
These routines use recursion (they repeatedly call themselves) to realise different Sierpinski algorithms. Logo’s recursion capabilities and relational turtle make it excellent for the task of rendering these algorithms! They’re also very pretty.
TO half_s :size :level
if :level = 0
half_s :size :level - 1
lt 45 fd ...