My friend and I used to discuss a similar question: given a fixed set of curved Duplo tracks, how many different looped track layouts can you generate?
Straight sections are mostly ignorable since you can always add them in pairs on opposite sides of the loop if they are parallel. (although there are some interesting triangle-shapes that can be made that break that pattern)
My friend even went so far as to code up a solver for it which mostly worked and generated some interesting layouts. We never got around to adding switches into it.
As my kids got older, we upgraded to Lego system track and I was initially very disappointed in it. The math for Lego track is quite different and there is something very satisfying about the Duplo system.
The key difference is that switches in Duplo are equivalent to two oppositely curved tracks overlaid on each other. This means you can pop a switch in anywhere that there is a curve piece. In the Lego system track, it is a straight piece with a curve out and back in slightly. If you place two switches together you can connect two parallel tracks, but it has the disadvantage of being harder to place (you end up needing substantial straight sections to use switches)
There are a number of third party companies that are filling the missing links (literally) for Lego track geometry. It can be worth investing in - I’ve always been annoyed that the Lego switches are clearly for sidings and yards and not for loops.
Straight sections are mostly ignorable since you can always add them in pairs on opposite sides of the loop if they are parallel. (although there are some interesting triangle-shapes that can be made that break that pattern)
My friend even went so far as to code up a solver for it which mostly worked and generated some interesting layouts. We never got around to adding switches into it.
It eventually led us to the math behind necklace problems because it was often hard to tell if 2 track layouts were identical: https://en.wikipedia.org/wiki/Necklace_problem