Code Monkey home page Code Monkey logo

acosa's People

Contributors

mjziebarth avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

acosa's Issues

Add merging of Voronoi nodes closer than tolerance.

For certain regular lattices, north and south pole are surrounded with a circle of equally distanced nodes*. For them, multiple Delaunay triangulations exist. For all of them, all Delaunay triangles belong to the same Voronoi node at the respective pole.

In this implementation, a new Voronoi node is created for each of the triangles of said triangulations. They might coincide or be slightly (within tolerance) different. Most likely this is the cause for the algorithm used for Voronoi cell area calculation to return NANs.

Merging duplicate Voronoi nodes would likely solve this issue.

Also, it looks nicer to have just one Voronoi node where it should be only one.

(*) This is also the case for nodes at other places of some regular lattices.

In ConvexHull, make sure that all nodes are in the same hemisphere.

In the case that the set of nodes cannot be confined to one hemisphere, it's not as intuitive to define what would be a convex hull. Perhaps any set of triangles? It might not even be possible to define it.

Either way, clarify mathematical background on this issue. The current implementation fails in any case, so add a check to the code to make sure that all nodes are inside a hemisphere before returning a hull.

Handle case of concyclic nodes in VDTesselation

For concyclic nodes (N>4), the Voronoi tesselation consists of only two nodes but N Voronoi-edges. This cannot be displayed in the used network data structures but Voronoi cell areas can be calculated.

Crashes / fails on isolatitude network

Code fails for cocircular nodes generated as follows:

lon=360.0*np.linspace(0, 1.0,num=10)[:-1]
lat=80.0*np.ones(len(lon))

(proper conversion to radians excluded)

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.