Welcome to trivector’s documentation!

This code is open source, and is available on GitHub.

trivector

Build Status Documentation Status

Description

Convert an image into a SVG vector image composed of triangular sectors.

Installation

trivector can be installed from PyPI with the following command:

pip install trivector

Usage

To get help on using trivector type the following command:

trivector --help

Example

Below is a simple PNG raster image to trivectorize!

Before trivector

Running trivector meface_before.png meface_after.svg 20 yields the following trivectorized SVG image at meface_after.svg:

After trivector

Command Line Use

Convert an image into a SVG vector image composed of triangular sectors

usage: trivector [-h] [-d {right,left,alternating}] image output sector_size

Positional Arguments

image path to the image to trivector
output path to output the trivectored image

Image Generation Options

sector_size size in pixels for each triangle sector
-d, --diagonal-style
 

Possible choices: right, left, alternating

diagonal arrangement of the triangle sectors

Default: alternating

Indices and tables