Menu

Turning a drawing into a dot-to-dot puzzle: Moore tracing, Visvalingam–Whyatt and a label placer
📰

Turning a drawing into a dot-to-dot puzzle: Moore tracing, Visvalingam–Whyatt and a label placer

DEV Community: python·Jeremiah Say·about 8 hours ago
#gJNzD9SD
#devtopython#devto#dev#dots#outline
Reading 0:00
15s threshold

A dot-to-dot looks like the simplest printable there is. Then you try to generate one and find three separate problems:

Which points become dots? Too few on the T. rex's jaw and it turns into a potato. Too many on its claws and the rest of the outline gets none.

How do you offer 20, 50 or 100 dots of the same picture without hand-placing every version?

Where does each number go? A number that sits nearer to dot 18 than to dot 17 will send a six-year-old the wrong way.

I built the dot to dot printables on Toggle9 with 17 pictures: 10 dinosaurs, a Pteranodon and 6 Christmas pictures. You pick a picture, a count (20, 30, 50, 75 or 100 dots) and how to count (1s, 2s, 5s, 10s, or the alphabet in capitals or small letters). Here's the same T. rex at three counts, made by the code in this post:

The work is split in two. A Python build step turns each drawing into a ranked list of outline points, once. The browser then picks the dots and places the numbers each time you change a setting.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.