neolateral

programming, drawing, photograpy etc.

Articles tagged with c++

First Previous Page 2 / 2
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 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 …
First Previous Page 2 / 2