Giter VIP home page Giter VIP logo

voronoidiagram's People

Contributors

zigui-ps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

voronoidiagram's Issues

Question about VoronoiDiagram

Hello, zigui !
I am a new learner to computational geometry from China and I am trying to realize of VoronoiDiagram in C++.
I was quite interested at the first time when I found your code because you just coded with 150 lines and used splay tree instead of AVL. But I had a bit confused about some details of your code. Here are my question:
(1) the underlying principle of function line_intersection(a, b, u, v) in VoronoiDiagram.cpp : Is this function used to calculate the intersection point of two line (one is defined by point a and point b while the other is defined by point u and point v) ? I tested line_intersection({1,0}, {0,1}, {0,0}, {1,1}) and got a result point{1,1}. It obvious that the intersection should be {0.5,0.5}. Could you please explain the meaning of each argument and the principle of this function ?
(2) the principle of dealing with the false alarm in Fortune 's algorithm : As mentioned in the original Fortune 's algorithm, it exists 2 situation of false alarm. But I couldn't find the obvious dealing process of these false alarms in your code. I guessed you dealt with them in function get_event() with two if-return lines, but I couldn't understand these two lines well. By the way, I am not sure whether my supposal is correct . Could you please tell me how and where you deal with these false alarms ?
(3) the meaning of "end" field of node structure : I couldn't understand the end field here and why it is set as "size of edge * 2". Could you please explain it specifically ?

Thank you!

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.