Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get polygon data from mosaic tool
#1
Hi,

So i found a question similar to this:
https://www.gimp-forum.net/Thread-define...ort-points

But it is not exactly what I want, because I just need the coordinates already created by the mosaic tool, I don't have them created by hand.

So I would like it somehow if the mosaic tool could output the coordinates of the resulting polygons' corner coordinates and rgb values belonging to them, is there a way to get such list out of gimp?

Thank you!
Reply
#2
(09-05-2024, 10:34 AM)Edvin76 Wrote: Hi,

So i found a question similar to this:
https://www.gimp-forum.net/Thread-define...ort-points

But it is not exactly what I want, because I just need the coordinates already created by the mosaic tool, I don't have them created by hand.

So I would like it somehow if the mosaic tool could output the coordinates of the resulting polygons' corner coordinates and rgb values belonging to them, is there a way to get such list out of gimp?

Thank you!

I do not have an answer for that one. Since it is a GEGL tool I assume the answer is not trivial. It might not even use a co-ordinate system.

The pattern from Mosaic can be very dense or much simpler depending on settings. Can you post an example of the type of pattern you expect to use. It might help finding a procedure.
Reply
#3
The RGB value is always going to be the color set for the joints.

Otherwise for the hexagon case it looks like a standard Voronoi diagram with the center points of each hexagon on a lattice with a regularity set by the Neatness parameter. The "corners" are the points that are equidistant to 3 points of the lattice.
Reply
#4
Still no idea if it is a simple or complex mosaic pattern.

I can not get anything out of the Gimp mosaic tool. I did try centerline trace of the pattern borders but these are not simple one-node-at-each-end paths.

Never known to find an easy way, so I started off making the pattern using Inkscape. Save that as an svg.
Open the svg in Gimp keeping the paths, and there are a lot of them even with a simple pattern
Merge the paths into one and apply Ofnuts path-csv plugin to get a list co-ordinates.
Too many decimal points for me so I simplify using a spreadsheet.
Coloured the pattern in using the gimp_gmic_qt plugin.

That gets you something like this.

   

Attached as example the Gimp file / inkscape svg / csv from plugin / tidied up text file.


Attached Files
.gz   drawing.xcf.gz (Size: 37.64 KB / Downloads: 24)
.zip   svg-csv-txt.zip (Size: 2.73 KB / Downloads: 91)
Reply


Forum Jump: