New Project Idea 'Getting code from designs'

Hello everyone…
I just got new project idea. We can make an addon which take any image and return p5 code for it. No need to make any design from scratch, we will just give an image to this addon and get p5 code and make better design by just changing that code. :smiley:

1 Like

I think it is a good idea, but that is not so trivial.

You have to decide what kind of input you want to take and what output you want to generate

If you have a SVG file, you don’t need to do any recoding. Just load and display the svg.
Or you could want to get SOME parts of the SVG file (which ones?) and make some line() or vertex() sentences from them.

If you have a JPG image, you could want to:
(a) simply display JPEG file or
(b) transform it in a mesh of vertex and lines like Makelangelo does (makelangelo is a java script that transforms jpeg drawings into gcode for plotters. I think I saw a processing version of it somewhere).

In my daily life I use Processing to convert my own proprietary formats of the nineties to modern, compatible formats. That way I made a processing script that turned computer-generated GWBasic drawing code into processing, another one that turned IBM proprinter fonts into png files, and so on. But generating more processing code from images sounds overwhelming.

3 Likes