LindeBuzoGrayStippling icon indicating copy to clipboard operation
LindeBuzoGrayStippling copied to clipboard

Python wrappers

Open AntonBiryukovUofC opened this issue 4 years ago • 2 comments

Hello Marc,

I was wondering how difficult it might be to create a Python wrapper for your codes. I have not found solid python-friendly stippling implementations, and would be happy to produce one with some guidance :)

In the end, it would be great to have a stipplize() function with all the dials used as arguments, that would accept something like a "grayscale" numpy array, and spit out the dot coordinates, and sizes.

Do you think you could suggest specific functions in your codes that could be a good entry point ?

Thanks, Anton.

AntonBiryukovUofC avatar Jun 07 '20 21:06 AntonBiryukovUofC

+1 on python library

morozgrafix avatar Jul 02 '20 22:07 morozgrafix

I'm not the author of the code but I can comment on your question. The stippling algorithm is easy to port, look here:

src/lbgstippling.cpp

however the hardest part, is the fast voronoi computation, as its implementation targets the gpu. You can replace it with a regular voronoi computation, the algorithm will be much slower then.

ghost avatar Jan 16 '21 11:01 ghost