{"id":17117173,"url":"https://github.com/z4yx/visualmst","last_synced_at":"2025-03-24T01:34:44.944Z","repository":{"id":20416144,"uuid":"23692488","full_name":"z4yx/VisualMST","owner":"z4yx","description":"Delaunay triangulation algorithm visualization implemented in Qt","archived":false,"fork":false,"pushed_at":"2014-09-11T15:53:23.000Z","size":400,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T07:47:34.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/z4yx.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-05T06:17:39.000Z","updated_at":"2019-09-08T02:50:51.000Z","dependencies_parsed_at":"2022-07-31T19:08:08.221Z","dependency_job_id":null,"html_url":"https://github.com/z4yx/VisualMST","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z4yx%2FVisualMST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z4yx%2FVisualMST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z4yx%2FVisualMST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/z4yx%2FVisualMST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/z4yx","download_url":"https://codeload.github.com/z4yx/VisualMST/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195455,"owners_count":20575888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T17:50:49.571Z","updated_at":"2025-03-24T01:34:44.906Z","avatar_url":"https://github.com/z4yx.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"###Visual MST 设计说明\n\n\n####程序功能\nVisual MST 是一个求解欧几里得最小生成树, 并可视化展示的工具. 目前支持从文件读入点集, 可视化编辑点集, 用三角剖分或朴素的Prim求解问题等功能. 使用三角剖分算法计算时还能够显示Delaunay三角剖分和Voronoi图.\n\n####编译方法\n本程序无额外依赖项目, 使用Qt标准的qmake-\u003emake流程编译即可.\n\n####实现原理\n\n#####GUI\n\n程序的GUI使用Qt创建, 核心部分采用Qt的Graphics组件, 使得在大数据情况下保持较好的性能. GraphicsItem本身支持选中, 拖拽等功能, 简化了用户交互的处理逻辑. 对于需要特殊事件处理的图形对象, 继承相应的GraphicsItem, 重载xxxEvent函数获取事件.\n\n在没有直接依赖关系的组件之间, 事件的传递均采用Qt的\"信号和槽\"机制, 解除组件耦合, 使得设计更加灵活.\n\n#####算法\n\n程序共实现两种算法, 基于Prim直接计算的MST朴素算法, 以及先三角剖分再计算MST的高效算法.\n\n朴素的Prim算法直接把问题转换为完全图求解MST, 时间复杂度为O(n\u003csup\u003e2\u003c/sup\u003e).\n\n高效算法在Delaunay三角剖分的基础上采用Kruscal算法求解, 三角剖分算法由[Triangle](http://www.cs.cmu.edu/~quake/triangle.html)库提供.\n\n#####性能优化\n\n程序设计时对于数据量较大的情况作了优化. 首先是所有算法均在独立的线程中运行, 避免阻塞UI线程. 把某些需要消耗时间较长, 且只能在UI线程进行的操作, 分解为几个部分, 插入全局的消息队列中分多次运行, 使得其他UI事件能够获得处理.\n\n另外, Graphics组件本身也需要设定一些优化选项. 例如, 设定itemIndexMethod为NoIndex避免Bsp树索引产生的额外开销, 在点数较多时关闭抗锯齿选项等.\n\n####感谢\n\n本程序使用了[Triangle](http://www.cs.cmu.edu/~quake/triangle.html)提供的Delaunay三角剖分算法, 以及[GeoGebra](http://www.geogebra.org/)项目的图标库.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz4yx%2Fvisualmst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fz4yx%2Fvisualmst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fz4yx%2Fvisualmst/lists"}