neolateral

programming, drawing, photograpy etc.

Articles in the PicoTurtle category

Page 1 / 2 Next Last
PicoTurtle release - v0.2.0-alpha.4

The tenth weekly release PicoTurtle v0.2.0-alpha.4 of PicoTurtle is out.

This release features a couple of important editor features:

  1. Indent/De-indent code lines and blocks. Editor shortcuts are Ctrl+] and Ctr+[ respectively. One can also indent and de-indent using Tab and Shift-Tab.
  2. Toggle comment code lines and blocks using Ctrl+/.

Here's a screenshot of the application on my macbook air...

alt PicoTurtle 0.2.0 on MacOs

The windows installer can be downloaded here -> PicoTurtle v0.2.0-alpha.4 for Win/64-bit. Linux and Macos installers are still work in progress. Macos is turning out to especially difficult with my current CMake/vcpkg based …

PicoTurtle release - v0.1.0-alpha.5

A new source-only release PicoTurtle v0.1.0-alpha.5 of PicoTurtle is out. This release has minor bug fixes, better documentation and an improved docs viewer, and a new about dialog. The release page contains detailed release notes.

Few changes in the CMake build to support a windows installer are added to the release. These will be used to publish a binary installer for Windows starting next release.

PicoTurtle release - v0.1.0-alpha.4

A new source-only release PicoTurtle v0.1.0-alpha.4 of PicoTurtle is out. The release page contains detailed release notes. However here are a few highlights:

  1. Turtle Lua Console - allowing turtle run in an interactive lua console widget. This is similar to the browser developer console functionality - although with fewer features.
  2. Find/replace - is enabled in the Turtle Lua editor.
  3. LUA_PATH - The path of the currently run lua file is added to the LUA_PATH.
PicoTurtle in Lua (alpha release)

I've been working on a C++/Lua version of PicoTurtle for the last year on and off. This last week I've stretched myself to work on it and make a release. This is a full rewrite of the turtle application that I had earlier built in nodejs and electron. The previous version was slow and it was harder to add features given the tech choices I'd made.

The new version is written in C++. The turtle drawing is done on a skia surface, and the GUI is built using Qt6. Developing with Qt6 was a positive experience - espescially because of …

Square Spirals Drawn using New PicoTurtle Lua API

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 …

PicoTurtle Java program to draw a groovy tunnel

I've also added Java support to picoturtle. Here's a program to draw a rather groovy tunnel. Java code follows.

import in.abhishekmishra.picoturtle.Turtle;
import in.abhishekmishra.picoturtle.TurtleState;

public class Tunnel
{
    public static void cuboid(Turtle t, double b, double w, double h) {
        t.forward(b);

        t.right(-45);
        t.forward(h);
        t.back(h);
        t.left(-45);

        t.left(90);
        t.forward(w);

        t.left(-45);
        t.forward(h);
        t.back(h);
        t.right(-45);

        t.left(90);
        t.forward(b);

        t.left(-135);
        t.forward(h);
        t.back(h);
        t.right(-135);

        t.left(90);
        t.forward …
PicoTurtle C# program to draw a wave

Recently I added C# .NET support to picoturtle. I was playing around generating waves... here's an example based on the sine function. And the C# Turtle code follows below.

using System;
using picoturtle;

namespace cspico
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            // Create the turtle before using
            Turtle t = picoturtle.Turtle.CreateTurtle(args);

            if (t != null) {
                // Your code goes here

                t.penup();
                t.setx(0);
                t.sety(250);

                for(double i = 0; i < 500; i+=0.25) {
                    t.setx(i);
                    double sin = Math.Sin(i/15);
                    double y = sin * 100;
                    t.forward(y);
                    t.pendown();
                    int col = Math.Abs …
Page 1 / 2 Next Last