Bitmap2Vector
Tuesday, 25 December 2007 01:38

title
Pythonscripts bitmap2circle, bitmap2square, bitmap2wave, bitmap2spiral



Looked at from near it looks like stripes and looked at from far it looks like a picture. Applied on a window, it enables you to look through from near and look at a picture from far.

The last converter was written in C, but I like Python more and more. No filepointer is necessary, the debugging info is useful and handling of variables is easy.

The svg core is taken from the net. The licence is not defined by the author and on the same site I found following sentence: "Except where otherwise noted, recipes in the Python Cookbook are published under the Python license.". Looks free to me. I changed the integer output to float and added functions for polygons of any pointcount.

The other part is taken from the Timeguy again. His script is intended to generate g-code and looks at the brightness of every pixel. The same is needed here, except the g-code part. Because it is for vinyl plotter, I added a maximum and a minimum bound, this makes later deburring easier and the stripes more stable.

The new spiralscript has a positioning bug in the center. You can play with the initial circlesize (variablename: circle) to compensate this.

This picture drawn by Leonardo da Vinci now sticks to my door:
door2
You can discern the stripes in the detailed view. This is the first try. The next one will be made with a border, because the narrow stripes will turn up at the ends, also the min- and max-bound wasn't implemented when this got cut.

Here you see the source image:

Grotesque_Profile

The licensing is more complicated this time. The included "svg.py" is Python licenced and the other parts are GPLd.

Download:
bitmap2vector_30jan2008.tar.bz2
bitmap2vector_30jan2008.zip
There are four scripts, one for waves like the one decorating my door, one for circles, one for squares and one for spirals.

bitmap2vector_old.tar.bz2

Beispiele:
Wavetux Squaretux
Spiraltux Circletux
Onefile Pack bitmap+vector

Source of Tux: Tux-G2.png

Circletux on my back:
shirt_spiraltux
It got professionally cut and transfered to my shirt. Source-svg.


Last Updated on Friday, 22 January 2010 19:07
 
Creative Commons Lizenzvertrag

Valid XHTML & CSS | Design by: LernVid.com