SortScope 排序算法可视化
✨ SortScope 排序星河 | SortScope Sorting Studio
SortScope is an interactive sorting-algorithm studio that lets you generate datasets, step through animations, and compare ten classic algorithms with real-time metrics.
星光与数据同在,排序算法也能闪闪发亮。
Sorting can be beautiful—watch every comparison bloom in color.

展示中文版界面:从生成随机数据到逐步播放排序过程,全流程操作均以中文界面呈现。

Showcases the English UI: highlights generating random data, stepping through animations, and reviewing live statistics in English.
🌟 亮点 Highlights
- 🎯 全算法可视化 | Algorithms Galore
覆盖 10 种经典排序算法,完整呈现每一步的交换与比较。
Visualize 10 quintessential algorithms with frame-by-frame comparisons and swaps. - 🎛️ 多段控制 | Playback Mastery
播放、暂停、单步与 1x-50x 变速,课堂演示与自学都稳稳拿捏。
Play, pause, step through, and speed up to 50× for lessons or deep dives. - 📊 实时统计 | Live Analytics
自动跟踪比较次数、交换次数与耗时,让复杂度肉眼可见。
Keep track of comparisons, swaps, and elapsed time as the animation progresses. - 🧾 数据友好 | Data Friendly
随机生成、自定义输入、TXT/CSV 导入导出,轻松复刻任何测试。
Randomize, handcraft, import, and export sequences with TXT/CSV support. - 🌈 沉浸界面 | Polished UI
磨砂玻璃质感、渐变配色与柔和动画,学习也要有审美仪式感。
Frosted glass panels, gradient palettes, and subtle animations make learning delightful.
🧠 支持算法 | Algorithm Lineup
| 类型 Type | 算法 Algorithms |
|---|---|
| 🫧 基础排序 Basics | 冒泡 · 选择 · 插入 Bubble · Selection · Insertion |
| ⚡ 分治策略 Divide & Conquer | 快速 · 归并 Quick · Merge |
| 🏔️ 高级策略 Advanced | 堆 · 希尔 Heap · Shell |
| 🧮 线性时间 Linear-Time | 计数 · 基数 · 桶 Counting · Radix · Bucket |
所有实现均由 SortRecorder 捕获完整步骤,确保可视化与统计完美同步。
Every implementation streams its steps through SortRecorder, synchronizing visuals and metrics.
🛠️ 快速上手 | Quick Start
- 📦 准备环境 | Set Up
安装 Qt 6 与支持 C++17 的编译器(Windows 推荐 MinGW 8.1+,macOS/Linux 可用 Clang 或 GCC)。
Install Qt 6 and a C++17-capable toolchain (MinGW 8.1+ on Windows, Clang/GCC on macOS/Linux). - ⬇️ 克隆仓库 | Clone the Repo
git clone https://github.com/your-account/SortScope.git cd SortScope - ▶️ 构建运行 | Build & Run
通过 Qt Creator 打开SortScope.pro并点击运行,或使用命令行:
Launch in Qt Creator withSortScope.pro, or run from the terminal:qmake SortScope.pro make # Windows 请使用 mingw32-make ./SortScope
📦 体验版本 | Windows Trial Builds
asset/SortScope_chinese.rar
打包好的 Windows 可执行文件(中文界面体验版),解压即可直接运行。
Pre-built Windows executable with the Chinese UI—extract and launch to explore instantly.asset/SortScope_english.rar
打包好的 Windows 可执行文件(英文界面体验版),适合英文环境试用。
Pre-built Windows executable with the English UI—perfect for quick evaluation.
🎮 使用指南 | How to Explore
- 🧭 选择算法与数据规模,或直接粘贴逗号分隔的自定义序列。
Pick an algorithm and data size, or paste your own comma-separated list. - 🎲 点击“生成随机数据”或导入 TXT/CSV,让测试数据随心换。
Use the random generator or import TXT/CSV files to swap scenarios instantly. - ▶️ 通过播放、单步、速度滑块体验算法节奏。
Drive the playback, single-step, and adjust the tempo slider to suit your flow. - 📈 观察实时比较/交换计数与进度条,感知复杂度爬升。
Watch comparisons, swaps, and progress update live to feel the complexity curve. - 🪟 拖动窗口尺寸,自适应可视化布局始终保持清晰。
Resize the window—bars auto-scale to stay crisp at any resolution.
🧩 技术亮点 | Technical Highlights
SortingAlgorithms+SortRecorder记录每一步数据状态、比较与交换。
SortingAlgorithms+SortRecordercapture every state change, comparison, and swap.MainWindow::updateVisualization自适应绘制渐变柱状图并高亮参与元素。
MainWindow::updateVisualizationdraws adaptive gradient bars with dynamic highlights.DataGenerator提供随机生成、文件解析与安全导出,兼容 UTF-8。
DataGeneratorhandles randomization, parsing, and safe UTF-8 exports.QTimer与QElapsedTimer组合实现精准播放与耗时统计。
QTimer+QElapsedTimercombine for accurate playback timing and duration metrics.
🗂️ 目录结构 | Project Map
├── asset/ # 动图与素材 | GIFs & media
├── datagenerator.* # 数据生成/导入导出 | Data IO helpers
├── sortingalgorithms.*# 算法与步骤录制 | Algorithms & recorder
├── mainwindow.* # 界面与交互 | UI & interactions
├── main.cpp # 程序入口 | Application entry
├── SortScope.pro # Qt 项目配置 | qmake project
└── resources.qrc # 资源清单 | Resource manifest
🤝 贡献 | Contributing
欢迎提出 Issue 与 Pull Request,增添更多算法、主题或教学模式;提交前请确保通过 Qt Creator 或命令行完成构建与验证。
Issues and PRs are welcome—bring new algorithms, skins, or teaching modes. Please build and verify before submitting.
📄 许可证 | License
当前尚未添加许可证,如需授权使用请先在 Issue 中沟通。
No license yet—open an issue to discuss usage or licensing needs.
⭐ 支持项目 | Support
如果 SortScope 让你眼前一亮,请点亮 ⭐ 并分享给正在探索算法世界的同学与伙伴。
If SortScope sparks joy, star the repo and share it with fellow algorithm adventurers.
链接:排序算法可视化工具
