Git Product home page Git Product logo

rapdop's Introduction

RApDoP: Repulsively Approaching p-Dispersion on Polygons

Authors: Zhengguan Dai (Gary), Kathleen Xu, Melkior Ornik

Environment Requirements

MATLAB2018b or later;

Required toolboxes:

Image Processing Toolbox, Mapping Toolbox

Recommended toolboxes:

Parallel Computing Toolbox

Test Scripts toolboxes:

Curve Fitting Toolbox

Overview

The p-dispersion problem seeks to place a fixed number of equally sized non-overlapping circles of maximal possible radius into a subset of the two-dimensional plane. This code is the implementation of a repulsion-based p-dispersion algorithm, also able to handle hard bounds on distances between particular circles.

Functionality

Given a convex or non-convex simple polygon, number of circles p, and distance bounds on circle centers, the code will produce a suboptimal solution to the p-dispersal problem, where all circles are entirely within the polygon and given constraints are satisfied.

Instructions

After downloading the code, run RApDop.m. You will be prompted to configure your dispersion problem: please the number of circles, the number of random initial sets of circle centers you would like to attempt, and the vertices of the polygon. If you previously ran the tool, you will have the option to rerun the previous configuration without making new inputs. You will also be able to place hard bounds on circle distances.

After completing the algorithm, the x and y coordinates of the best circle centers will be given in max.xc and max.yc variables of max.mat. A figure will show the best dispersion found, and the resulting radius will be printed in the command line and on the figure.

Acknowledgment

Utility function /util/lineSegmentIntersect.m which calculates line-segments intersections was adapted from U. Murat Erdem's code published at MathWorks File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/27205-fast-line-segment-intersection. All other files in this directory were created by the authors.

rapdop's People

Contributors

melkiorornik avatar xinyuel7 avatar zd6 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

wuyou33

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.