# Centroid (Center of Mass) Centering

Heya!

I’m looking for something that I think would make a lot of projects easier when dealing with anything art-based. I’d love a way to center objects (rasters, or, if possible (and preferably), vectors) by center of mass/centroid centering methods. I’m not sure of the mathematics behind centering vectors (might be easiest to just rasterize it temporarily) but for rasters its rather simple; just find the average (or weighted if applicable for greyscale) of all the pixels with a value.

This would solve the “play button issue”:

You can see the difference below (the one on the left is clearly “off” despite being perfectly “centered” by its rectangular bounding box):

This would be great if it could be extended to text, too (for example, when centering text that ends with L or something else “off-center”, it causes the entire text to feel off-center. Same for Title Case words being vertically centered.

I’m pretty new to Lightburn, however, might be able to take a crack at implementing this if someone could point me in the right direction! Looking forward to feedback on this

see my reponse in this topic :

this is a workaround using inkscape, but it can help.

I’m not sure why, but I didn’t understand the linked response the first time I read it, but now I do. That’s a pretty elegant work-around.

My work-around was to identify the intersection of two normals (in Inkscape) and then draw a circle around that point. One could accomplish that in LightBurn as well and set the circle to Tool status prior to grouping the polygon and the circle.

Gotcha! Somehow didn’t see that in my searches and pretty new to Inkscape – thanks for the trick!

I think I can use this and the locking tools (so I can center to the centroid with the builtin tools instead of eyeballing) to get what I wanted.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.