Projects tagged "vector"
This page highlights several of my personal software projects.
Table of Contents
Contour Maps February 2018
Generate vector-based contour maps using AWS terrain tiles.
This code generates topographic maps (using contour lines) based on elevation data. It can automatically fetch and cache terrain tiles from AWS. It can render a region defined by a lat/lng bounding box or by a shapefile (such as for a given country or state). I used this code to draw topographic maps on my AxiDraw pen plotter.
The example below shows the topography of the Grand Canyon and its surroundings with contour lines separated by 50 meters in elevation.
Links: GitHub
AxiDraw January 2017
Unofficial Python library for working with the AxiDraw pen plotter.
The AxiDraw is a very nice modern pen plotter. It ships with Inkscape-based software for controlling it, but I was more interested in programmatically controlling it myself. So I wrote this library that controls the plotter directly over the USB serial port.
The most interesting part of this project, for me, was writing my own motion planning algorithm. I stuck with constant-acceleration for simplicity, and the code for the planner came out to just a couple hundred lines of Python!
See the motion planning algorithm in action in this web-based visualization.
Features
- control the AxiDraw directly from Python with a simple API
- convenient command-line utility
- constant acceleration (trapezoidal velocity) motion planning
- path drawing order optimization
- drawing transformations
- preview drawing (render to png)
- turtle graphics
- lindenmayer systems
Links: GitHub • Medium Article
Primitive September 2016
Recreate your photos with vector-based geometric primitives.
You provide an image as input. The app tries to find the most optimal shape that can be drawn to maximize the similarity between the target image and the drawn image. It repeats this process, adding one shape at a time. Using this process, the program can recreate a photo with surprisingly few shapes.
This project was originally inspired by the popular and excellent work of Roger Johansson - Genetic Programming: Evolution of Mona Lisa. Since seeing that article when it was quite new, I've tinkered with this problem here and there over the years. But only now am I satisfied with my results.
The core is written in Go and is open source. A native macOS app is also available in the App Store, providing a nice UI on top of the engine as well as some additional features like "drawing mode." To date, this has been my most successful paid app.
Links: GitHub • Website • App Store • Twitter Bot
Line Art January 2016
Rendering engine that produces 2D vector graphics (think SVGs) depicting 3D scenes.
Unlike OpenGL, where the output of the rendering pipeline is a rastered image, the output of ln
is a set of 2D vector paths. It supports texturing, CSG, and more! I created this so I could plot 3D drawings with my pen plotter, which naturally requires vector input.
Links: GitHub