Giter VIP home page Giter VIP logo

cgproj's Introduction

CGProj

开题报告和论文原文见./doc/下的pdf。

运行

> make

接口

solver.hpp

  • AnnulusSolver
    • pstd::vector<Point>,是需要求解的点集
    • Annulus solve() 用于求解最大空环
    • SquareAnnulusSolver : AnnulusSolver
    • RectAnnulusSolver : AnnulusSolver

utils.hpp

  • Rect
    • 矩形,其有四个参数x1, y1, x2, y2,分别代表最小x,最小y,最大x,最大y。(x1, y1)就是矩形的左下角点,(x2, y2)是矩形的右上角点。
  • Annulus
    • 空环,SolutionType type参数代表这个空环的形状。其有几种特殊情况需要处理
      • 长条形(STRIPE_XXXXX),此时其元素Point a, b分别在这个长条的两条平行线上
      • L形(L_SHAPED_X),此时元素Point a, b分别是这个L形区域的两个顶点,type: L_SHAPED_1,2,3,4分别表示这个L形区域是朝向第一象限,第二象限...
      • 普通环形(NORMAL),此时元素Rect inner, outer分别是内矩形和外矩形。保证inner矩形是在outer矩形的内部

注意事项

为了计算时不出现小数,所有输入的点的坐标需要是偶数,但最后输出的正方形、矩形的中心位置坐标可能是奇数。输入输出时需要注意。

UI设计细节

最好需要实现以下功能,如果难以实现也可以略去一些不带星号的部分。

  • [*]调用随机生成器,随机生成若干个点。不允许重复的点,且点的坐标需要都是偶数。随机生成器也有一定的pattern,比如说限定某个区域没有点等。这些pattern可以之后手动进行添加等,目前需要预留一些接口。
  • [*]界面按钮需要反映所有功能,如求解、随机生成、框选、删除点等。
  • [*]手工单个添加/选中点。比如给某个位置点一下可以新增一个点,再点一下这个点就可以选中它。如果可以的话可以考虑磁吸:即鼠标指针离某个点距离小于一个阈值,则这个点会变大一点点,方便手工选中。
  • 手工批量删除点。可以搞一个框选功能,框住一部分点全部选中然后批量删除。
  • 可以通过鼠标滚轮滑动zoom整个画面,便于更精细地控制点。
  • [*]显示鼠标指针当前位置坐标值的功能。

分工

  • 算法实现 王宣润
  • UI实现 李哲
  • 文献综述和报告撰写 李玮祺

cgproj's People

Contributors

wxr1998 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.