Skip to content

forsythe/color-sort-tsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

Instead of trying to find the shortest path through a set of points (x, y), this program does it in 3 dimensions, (x, y, z). Furthermore, I visualize each city with (Red=x, Blue=y, Green=z). The values of x, y, and z are between 0 and 255. I use 2-opt to find a good solution to this TSP problem.

Demo (500 colors, 2opt)

click to watch
Sorting 500 colors: traveling salesman visualized demo

Customizable options under defs.h

NUM_COLORS: Number of colors ("cities" to find a path through)
ANIMATE: Whether or not to animated the sorting process

Requires SDL2 for graphics. I included all the necessary files along with the .exe to avoid the hassle of installing SDL.

About

visualizes a 3d travelling salesman problem by representing (x, y, z) as color (r, g, b)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published