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.
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.
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.
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.
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.
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?
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.