ralucado / TinySubway

This is totally not a Mini Metro clone.
MIT License
3 stars 0 forks source link

Avoid line crossings #1

Open ralucado opened 4 years ago

ralucado commented 4 years ago

Make line segments avoid each other instead of crossing each other. Once a crossing between three consecutive stations has been found, it can easily be removed by regenerating the inflexion points in between each pair of stations in the reverse order so that the diagonal segments of each path generate from the other station.

Some material: how to check if two segments cross and also a proposed algorithm for making the checks.

ralucado commented 3 years ago

What should the behaviour be between segments of different line? (i.e. should an inflexion point's generation take into account other lines' crossings?) Need to define an appropiate behaviour before implementing anything.