Code Monkey home page Code Monkey logo

swisscheese's Introduction

swisscheese

Computes the union, intersection, and subtraction areas for sets of circles.

I created this project to rapidly compute the area of masked apertures in astronomy for many different arbitrary arrangments of the masked areas. (A masked aperture, as I define it, is a circular area over which to sum the light accumulated on a detector, but with smaller circular areas masking out contaminating features removed.) However, this algorithm could have broader applications than astronomy, so I tried to make it as general as possible. As such, one can use it to take two arbitrary sets of circles, the union of each defnining its own shape, and compute the area of the intersection or difference of these sets, or the area of one with the other subtracted. (The area of the union may be computed by treating all of the circles as a single set, and this capability is available.)

----This is not optimized for speed with large numbers of circles.---- For my application, it was not necessary to create code that could handle large numbers of circles quickly. Rather, I needed accuracy and speed when dealing with lots of different configurations of just a few circles. The code meets those goals. For large numbers of circles, consider learning enough abstract geometry to implement the O(n log(n)) algorithm presented in http://www.sciencedirect.com/science/article/pii/0196677488900351#

swisscheese's People

Contributors

parkus avatar

Watchers

Chase Million avatar  avatar

swisscheese's Issues

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.