The core idea was initially described here: #15 (comment)
Currently the convex hull algorithm visualizations rely on ConvexHullTracer struct to separately track low-level steps in the algorithm. This was simple to implement but has the downside that you need to muddy the core algorithm code with tracing logic that isn't even relevant unless you are actively running the algorithm visualization. To me it's a distraction in the code. I have additionally added trace-level logging (#75 and #81) so now there are effectively two sources of tracing which is redundant.
The idea here is to remove the tracing-specific code, have only trace-level logs, and create a log parser that can reconstruct the information needed to generate visualizations directly from the logs.
One cool feature of this that I think would be possible is to support different fidelity visualizations, so if you enable say debug-level logs, it will show the high-level steps in the algorithm which might be most suitable for understanding and debugging the main steps in the algorithm. But if you enable trace level, then it would show truly every step that was done and could also show what's the state of the data structures and such, which would be helpful for debugging the finer details and for digging deep on understanding the code.
Need to figure out how to create parse-able versions of the logs, I assume there's a cool way to aggregate them into a code-readable form but worst case scenario I bet you could redirect to a file and just parse the file.
The core idea was initially described here: #15 (comment)
Currently the convex hull algorithm visualizations rely on
ConvexHullTracerstruct to separately track low-level steps in the algorithm. This was simple to implement but has the downside that you need to muddy the core algorithm code with tracing logic that isn't even relevant unless you are actively running the algorithm visualization. To me it's a distraction in the code. I have additionally added trace-level logging (#75 and #81) so now there are effectively two sources of tracing which is redundant.The idea here is to remove the tracing-specific code, have only
trace-level logs, and create a log parser that can reconstruct the information needed to generate visualizations directly from the logs.One cool feature of this that I think would be possible is to support different fidelity visualizations, so if you enable say
debug-level logs, it will show the high-level steps in the algorithm which might be most suitable for understanding and debugging the main steps in the algorithm. But if you enabletracelevel, then it would show truly every step that was done and could also show what's the state of the data structures and such, which would be helpful for debugging the finer details and for digging deep on understanding the code.Need to figure out how to create parse-able versions of the logs, I assume there's a cool way to aggregate them into a code-readable form but worst case scenario I bet you could redirect to a file and just parse the file.