Turtle Graphics (TG)
About
This library implementation is written in pure JavaScript and has no dependencies on any third party library. All examples use p5js because it provides a simple framework to demonstrate the library. TG also provides helper functions to support interatcion with p5js.
Using Turtle Graphics and Turtle Text in your own webpages?
To use these in your own webpage add the following code to the HTML in your webpage
<script language="javascript" type="text/javascript"
src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics@1.0.0/dist/lib/tg.min.js">
</script>
<script language="javascript" type="text/javascript"
src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics@1.0.0/dist/lib/tt.min.js">
</script>
replacing 1.0.0 with the library version number you wish to use.
If you don't include a version number, the latest available version will be used i.e.
<script language="javascript" type="text/javascript"
src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics/dist/lib/tg.min.js">
</script>
<script language="javascript" type="text/javascript"
src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics/dist/lib/tt.min.js">
</script>
Turtle Text is an extension to the Turtle Graphics library and will not work without it.
Historical Background
Turtle graphics came into being in the late 1960s when Seymour Papert added support for it to the Logo programming language. Since then there have been numerous implementations of both Logo and Turtle Graphics in several programming languages. Python even includes a turtle graphics module as part of its standard library.
Library Support
The TG github repository is the principal source of information on using this library and I suggest you read the wiki there. The other main source is the user guide which documents the entire TG API
Also, I have used the p5js online sketch editor to create many examples for users to explore and experiment with.
If you can't find the answer here or on github them you can always ask questions on the Processing forum as I am a regular visitor there.