How lestathriverad/interactive-convex-hull-visualizer works
This is a browser-based convex-hull visualizer. A user adds points to the Graham-scan canvas, starts the algorithm, and steps through its recorded hull-building history or stops to edit the points. The React app routes to the Graham-scan page and provides sidebar navigation; the playground handles point input, drawing, simulation state, and playback controls, while the geometry module computes the hull and history. The sampled files show this main workflow; no separate storage or external services are present.
Main entry points: GrahamScanPlayground.jsx Canvas playground · GrahamScan.jsx Graham-scan page · App.jsx React app and routes · convexHull.js Hull and step history
Components 7
Application shell
- React app and routes
visualizer-frontend/src/App.jsx
Graham scan
- Graham-scan page
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx - Canvas playground
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx - Hull and step history
core-logic/convexHull.js
Interface components
- Sidebar navigation
visualizer-frontend/src/components/Sidebar.jsx - Playback icons
visualizer-frontend/src/components/PlaybackIcon.jsx
Other components
- User
Connections 9
- User → Canvas playground: adds points
README.md - User → Canvas playground: controls playback
README.md - React app and routes → Graham-scan page: routes to
visualizer-frontend/src/App.jsx - React app and routes → Sidebar navigation: renders
visualizer-frontend/src/App.jsx - Sidebar navigation → Graham-scan page: links to
visualizer-frontend/src/components/Sidebar.jsx - Graham-scan page → Canvas playground: renders
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScan.jsx - Canvas playground → Hull and step history: computes hull
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx - Hull and step history → Canvas playground: returns hull history
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx - Canvas playground → Playback icons: renders controls
visualizer-frontend/src/algorithm-pages/convex-hull/graham-scan/GrahamScanPlayground.jsx