neolateral

programming, drawing, photograpy etc.

In the last few weeks, I've rewritten the PicoTurtle programming API in a C++ program. Here are the major features/changes of the new implementation:- * The turtle API has Lua bindings. Lua is sufficiently lightweight that the interpreter can be distributed with the new picoturtle program. * The new implementation does not have a client-server design greatly reducing its complexity from the older nodejs/electron based implementation. * The program uses Skia Canvas for the drawing implementation. Skia (developed by google) is also the canvas for google chrome. * Although bindings for other programming languages can be developed, the current version is only available for use from a C++ program and Lua.

To release soon!

I will soon be making a new release of the picoturtle API.

This release will not have any GUI. Which means you need to import the libraries in your C++ or Lua program and then use them in your own editing environment.

Example - Square Spirals in PicoTurtle Lua

Here is a few lines of Lua which use picoturtle to draw a square spiral.

canvas_size(1000, 1000)     -- set the size of the canvas to 1000x1000
reset()                     -- reset the settings, sets position to center of the canvas
pendown()                   -- lower the pen for writing
penwidth(4)                 -- set pen width to 4 pixels
for i = 1, 1000, 8 do       -- draw the square spiral
    forward(i)
    right(90)
end

export_img('spiral.jpg')    -- export the canvas as a jpeg image

The resulting image is...