worldturtle alternatives and similar packages
Based on the "Teaching" category.
Alternatively, view worldturtle alternatives based on common mentions on social networks and blogs.
lambda-calculator8.8 3.5 worldturtle VS lambda-calculatorAn introduction to the Lambda Calculus
xturtleturtle like LOGO
Do you think we are missing an alternative of worldturtle or a related project?
Turtle Animations in Haskell
WorldTurtle is a Haskell take on Turtle Graphics.
The intent of this module is a teaching tool by using turtle commands to produce animations.
[parallel cirlces animation](worldturtle/docs/images/parallel_circles_animated.gif)
Turtle commands are monads!
The following snippet produces a square:
import Control.Monad (replicateM_) import Graphics.WorldTurtle main :: IO () main = runTurtle $ replicateM_ 4 $ do forward 90 right 90
[turtle drawing a square](worldturtle/docs/images/basic_turtle_square.gif)
Use of the Alternative operator
(<|>) allows animations to run in
example shows that when given this code:
import Graphics.WorldTurtle main :: IO () main = runWorld $ do turtle1 <- makeTurtle' (0, 0) north green turtle2 <- makeTurtle' (0, 0) north red -- Draw the anticlockwise and clockwise circles in sequence. (turtle1 >/> circle 90) >> (turtle2 >/> circle (-90)) clear -- Draw the anticlockwise and clockwise circles in parallel. (turtle1 >/> circle 90) <|> (turtle2 >/> circle (-90))
We get this animation:
[serial vs parallel comparison](worldturtle/docs/images/parallel_serial_turtles_2.gif)
You can interact with the animation window in the following ways:
|Pan the viewport.||Click and drag|
|Zoom in/out.||Mousewheel up/down|
|Reset the viewport to initial position.||Spacebar|
|Reset the animation.||
|Pause the animation.||
For all examples, look [here](worldturtle-examples)!
Building a project
To build this project you need
ghc. If you don't
already have these, then you can install them easily from the
If you get this error on startup:
user error (unknown GLUT entry glutInit)
Then this means you need the
freeglut MSVC binaries which you can get
freeglut\bin\x64\freeglut.dll to the same location as the executable
you wish to run, or place it in a folder that can be discovered by your
(Here are some steps on how to add a new folder to your
Making a new turtle project from a template
Using stack, you can create your own
worldturtle project by using the provided
To create and run your own project, use the following commands to get setup:
stack new my-new-project aneilmac/worldturtle cd my-new-project stack build stack exec my-new-project
Building and running examples
Examples can be built via stack.
stack setup stack build
After building, examples in the
worldturtle-examples folder can then be
executed from stack. To run
stack exec parallelcircles-exe