Showcase your libraries, tools and other projects that help your fellow love users.
-
arthure
- Prole
- Posts: 9
- Joined: Sat Jul 25, 2020 6:25 pm
Post
by arthure » Tue Jul 28, 2020 10:27 pm
Minimalist
turtle graphics implementation in lua.
Source code :
https://github.com/arthurealike/turtle.lua
If you are familiar with turtle graphics, it will be super easy to use our tool with chain methods.
Create a turtle instance, give commands it on load() or when an event is published, then call its draw function in love.draw(), and it is done.
Code: Select all
require "turtle"
local triangle = Turtle()
function love.load()
local red = {1, 0, 0}
triangle:setcolor(red):left(60):forward(50):right(120):forward(50):left(60):backward(50)
end
function love.draw()
triangle:draw()
end
You can also create multiple instances.
There are many methods that we described in readme on repository. We added also animation state that you can toggle drawing state such as stop and play in real-time. We'll keep updating/developing, finding better approaches to achieve turtle graphic's all methods. Thanks for supporting. Keep in touch!

Last edited by
arthure on Wed Aug 05, 2020 10:32 am, edited 3 times in total.
-
sphyrth
- Party member
- Posts: 252
- Joined: Mon Jul 07, 2014 11:04 am
-
Contact:
Post
by sphyrth » Wed Jul 29, 2020 2:48 am
I'm not old enough to have experienced it, but I'm old enough to know about it. This is a fun library!
-
arthure
- Prole
- Posts: 9
- Joined: Sat Jul 25, 2020 6:25 pm
Post
by arthure » Wed Jul 29, 2020 6:35 am
sphyrth wrote: ↑Wed Jul 29, 2020 2:48 am
I'm not old enough to have experienced it, but I'm old enough to know about it. This is a fun library!
Let me tell you a secret, I did not experienced turtle graphics too

But it is real fun and can be used in different ways. Thank you!
-
zorg
- Party member
- Posts: 3041
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
-
Contact:
Post
by zorg » Wed Jul 29, 2020 10:22 am
I'm ancient enough to have had the pleasure of doing turtle graphics decades ago, and it isn't less fun now than it was then.

It's a neat thing what one can draw with this; L-systems, patterns found in nature, fractals, chaos... the possibilities are endless!
Me and my stuff
True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
arthure
- Prole
- Posts: 9
- Joined: Sat Jul 25, 2020 6:25 pm
Post
by arthure » Wed Jul 29, 2020 11:02 am
zorg wrote: ↑Wed Jul 29, 2020 10:22 am
I'm ancient enough to have had the pleasure of doing turtle graphics decades ago, and it isn't less fun now than it was then.

It's a neat thing what one can draw with this; L-systems, patterns found in nature, fractals, chaos... the possibilities are endless!
I was trying to implement a fractal engine for love2d, then i found myself as writing turtle in lua. As you said, turtle is a super easy way of implementing fractals.
-
arthure
- Prole
- Posts: 9
- Joined: Sat Jul 25, 2020 6:25 pm
Post
by arthure » Sun Aug 02, 2020 5:27 pm
It is updated with new methods.
-
Alp
- Prole
- Posts: 7
- Joined: Wed Jul 10, 2019 2:48 pm
Post
by Alp » Wed Aug 12, 2020 12:31 pm
Huh... I've never even heard of turtle graphics!
Does it have any relation to Fourier Series, or is it entirely different?
Procedural graphics creation has always been a fascinating subject to me.
Lead programmer, and secondary artist at "Nosey Studios", I draw lots of butts!

-
zorg
- Party member
- Posts: 3041
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
-
Contact:
Post
by zorg » Wed Aug 12, 2020 7:13 pm
It is different; just a way to graph things... that said, it is indeed powerful. One could implement things like fourier series based waveform drawing, rule-based auromata visualization, L(indenmayer)-system based drawing (more natural things e.g. trees, leaves, etc.)
Me and my stuff
True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
pgimeno
- Party member
- Posts: 2410
- Joined: Sun Oct 18, 2015 2:58 pm
Post
by pgimeno » Thu Aug 13, 2020 2:16 am
Alp wrote: ↑Wed Aug 12, 2020 12:31 pm
Huh... I've never even heard of turtle graphics!
Does it have any relation to Fourier Series, or is it entirely different?
It has more to do with these:
http://cyberneticzoo.com/cyberneticanim ... -american/
Logo is a language with which you can give commands to a "turtle" (most commonly an arrow painted on the screen, but there were robot models that painted on paper too, as shown in the link). Basically, commands are relative to the turtle: forward N, right N, pendown, penup, etc. "Turtle graphics" refers to a way of drawing graphics using that basic concept from Logo, without being a Logo language implementation itself.
-
arthure
- Prole
- Posts: 9
- Joined: Sat Jul 25, 2020 6:25 pm
Post
by arthure » Fri Aug 14, 2020 8:46 pm
I keep developing and try to make it well documented guys, thanks for your interest.
Users browsing this forum: Bing [Bot] and 16 guests