I'm looking for an algorithm to do this effect, but it's not helping that I don't even know what to look for. I use PHP, so any existing code samples would be great. I want to specify the borders of the shape and have php auto fill it with letters. I'm also open to other ideas to accomplish the same thing. Does this algorithm have a name?
I do not know the exact name of the algorithm - I would imagine that it is a variant of the 2D bin packing problem, but without having the interest of the best possible pack.
Here are some resources and questions:
If question two is yes, it would seem to me that the easiest way to produce the image would be to fill the entire rectangle with characters, inverse the image shape and use it as a mask.
Here is an answer for not just characters, but entire sentences. Algorithm for Text Wrapping Within a Shape
Edit:
Some popular modern graphic fill websites that could be worthwhile to study
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With