Curve's middle line points

Hi. Anyone can help me with this? I have letters and numbers (curves) and I need to place those points right in a middle, but I could not find the component I need.

Tried tween, offset, array, so far nothing. Maybe you had simillar problem like this?


Switch to a single line font and divide curves?

Mid point is not a solution here because I need to find middle line, not point.

Make a line between the 2 points and use the node into link it finds the midpoint into the curve.

as you can see, the letters contains more than one curve and I need to find like an average curve

What does ‘average curve’ mean to you? The red line shown in the second sketch?

Yes! Correct. Ant I have no idea so far how to gain it.

So, assuming you can’t just change the font to a single line version…

You want to pack as many identical circles of as large a size as possible into the region defined by each letter, then find the order of them that works for interpolate to produce the minimum length line or lines.

That’s a nasty problem space.

You could skip the circle packing, use offset to make a much smaller zone in the center of each circle (stop increasing offset if the offset curve self intersects). You can have free floating points in that zone, and use galagapos to find the location for each point to minimize the length of line of interpolation - it would break on the ‘t’ in the example. The galagpos evolution would handle getting the points in the right order as well as lcoation.


You could make each region a mesh in kangaroo, apply each edge as a support and apply gravity. The deflected shape would give you the position of the midline. Just take samples on a row by row basis. It wouldn’t solve the interpolation order problem though.

Any further info/context you could give us? there might be a different line of attack. If there are limited number of characters, a manual solution once with a lookup table might be possible.

I dont know what information should I add. Saw kangaroo tool but had no luck so far creating algorithm with that, circle packing may be a solution here


why you are doing this, college? laser cutting?
what do you need the middle line for? what is the next stage after making it?
how many letters you need to handle.
how many changes/updates to the letters can you expect.

As many people have suggested, depending on why you are doing this, using a single line font might be the best option. Otherwise what you are looking to find is sometimes called a Medial Axis. Which you can find lots of discussions on this forum about. This is a script that does an approximation of a medial axis using vorinoi diagrams.

MEDIAL (11.9 KB)

I need to put circles inside letters and numbers, they stand for LED bulbs.
This should work with any letter or number in any font.

Then convert to Single line font, Divide at intersections, divide remainder into segments equal to intended bulb spacing, send collection of points onwards.

Otherwise that medial axis script looks promising.