Tag Archives: Open Source Software

The AxiDraw CLI and Python API

Following the release of our new AxiDraw software this week, we are pleased to announce the release of two additional software components that greatly extend the capability of the machine.

The AxiDraw software is now available in two alternate versions that may be helpful for developers or for anyone who would like to control the machine programmatically rather than through Inkscape: A stand-alone command-line interface (CLI) tool, as well as a full-featured Python library.

The AxiDraw CLI

The first new tool is the AxiDraw CLI,  a command-line API to drive the AxiDraw outside of Inkscape. Like the Inkscape-based software, its primary function is to plot SVG files. However, it is a stand-alone utility that can be driven from within shell scripts and other environments that make use of shell commands.

Once installed, plotting a file can be as simple as executing the following command:

axicli filename.svg

There are, of course, a breadth of different modes and configuration parameters available. We have written detailed descriptions of each of these options in our comprehensive API documentation. The CLI also supports the use of configuration files to quickly switch between different sets of parameters.

Since most common scripting and programming environments allow one to call shell commands like this, that allows the AxiDraw to be used directly within a wide variety of frameworks.

 

The Python API

The second new tool is the AxiDraw Python API. The AxiDraw CLI is written within Python, and we have both exposed and expanded upon that nucleus to create a flexible and powerful Python module, complete with its own comprehensive documentation.

Just like the CLI, the Python API can plot SVG documents; it can both read SVG files and accept strings containing SVG data.

It also has features that are not available within Inkscape or the CLI: It supports direct interactive XY control. You can use absolute or relative moveto/lineto type commands to control the AxiDraw from within your own programs. This is particularly useful for a wide variety of potential AxiDraw applications that are not writing or drawing, but otherwise making use of the AxiDraw as a low-cost motion control platform.

Politicians To Poop: A Chrome extension

Politicians To Poop

Politicians To Poop is a new extension for the Chrome web browser that replaces the names of presidential candidates (US, 2016) with the “pile-of-poo” emoji. Options allow you to “poopify” the names of Democrats, Republicans, or both.

Politicians To Poop is available now, for free, at the Chrome web store.

Screenshots:

Politicians To Poop

Politicians To Poop

Politicians To Poop

Applications:
Possible reasons that you might want to use this extension include:

  • You are from outside the US, and don’t need to hear these names every day.
  • You are temporarily overloaded by the amount of poop that the candidates sling at one another.
  • Because it is funny.

No judgement upon any of the named individuals, nor their platforms, parties, or beliefs is either implied or intended. This is intended to be an equal-opportunity text replacement tool, for the good of all humanity.

More information:
This project was inspired by Millennials to Snake People. Much more information including source code, the list of names, and additional attribution is available at our GitHub repository.

Help wanted: RoboPaint

James “techninja” Todd writes that a few more hands might be helpful on the RoboPaint project:

RoboPaint is an open source app for controlling painting/drawing robots, made for my daughter’s award winning Open Source WaterColorBot! The project is taking off with lots of users and lots of great features, and is all written in web standards node-webkit to run on all operating systems.

Interested? Sign up to help out at http://www.doerhub.com/for/robopaint

 

SymmetriSketch: A simple app for playing with symmetry

We were recently contacted by a mathematics instructor, who suggested that it might be interesting to have a program like Snowflake, but with the option of picking and choosing different symmetry properties.

Natural snowflakes have (approximate) sixfold rotation symmetry plus reflection symmetry. However, a lot of things that you can draw by hand have absolutely no resemblance to snowflakes at all– and it is somewhat fun to explicitly play with the rules.

Our new program, SymmetriSketch, sticks to the same basic design principles as Snowflake: it’s cross platform, open source, and able to export a true vector drawing with a closed path. However, SymmetriSketch is a much more flexible program that allows you to play with different symmetries, and create all kinds of different things that would never be mistaken for frozen water.

Here’s what it looks like when the program first opens:

SymmetriSketch 1

The initial shape is an overall pentagon– an object with five-fold rotation symmetry and reflection symmetry. The figure is generated by taking the editable slice– highlighted here and when you start the program– and reflecting and rotating it to complete the full shape that you see.

Within the editable slice, you can also see three highlighted control points that can be dragged around. There is control point at every vertex and at the midpoint of every line segment between two vertices. If you drag a control point that is the midpoint of a line segment, it turns that control point into a new vertex. That new vertex also gets new control points at the midpoints to its neighbors.

Every vertex point can be moved to any location on the screen with the exception of the vertex that is initially at the top point of the pentagon– that vertex is constrained to move along the vertical axis– the axis of reflection symmetry.

SymmetriSketch 6

The controls are purposefully kept simple. There are two symmetry controls– for the order of rotational symmetry and to toggle reflection– which you can change in the lower left hand corner of the screen.

The number, with its +/- controls, refers to the order of discrete rotational symmetry. If the number shown is n, then n-fold rotational symmetry is applied, which means that the displayed object is unchanged when rotated by 360 degrees/n. In the screenshot above, 9-fold rotational symmetry is applied.

Orders from 1 to 99 are allowed– note that 1-fold rotational symmetry is “no symmetry at all” since it requires 360/1 = 360 degrees of rotation to return to the original shape.

The second control is for reflection symmetry, and toggles between “reflect” or “rot. only,” where it either does, or does not apply a mirror reflection across the vertical axis.

SymmetriSketch 3

With reflection symmetry turned off, the figure is drawn with pure rotational symmetry. (This screenshot was taken while editing the shape, and you can see control points, indicated by little circles.)

Continue reading SymmetriSketch: A simple app for playing with symmetry