Giter Site home page Giter Site logo

acproject / embedded-graph-drawing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j-zink-wuerzburg/embedded-graph-drawing

0.0 2.0 0.0 114 KB

Small extension to Java Jung to work on embedded graphs. Containing an implementation for drawing graphs NIC-planar 1-bend RAC in quadratic area.

License: MIT License

Java 100.00%

embedded-graph-drawing's Introduction

Embedded Graph Drawing

Small extension to Java Jung to work on embedded graphs. This contains an implementation for drawing graphs NIC-planar 1-bend RAC in quadratic area. This implementation is based on the article "Compact Drawings of 1-Planar Graphs with Right-Angle Crossings and Few Bends", which can be found at https://arxiv.org/abs/1806.10044 โ€“ see also https://doi.org/10.1016/j.comgeo.2019.07.006 for the journal version.


Setup and Run the Program

Navigate to the top-level directory of this project (where the pom.xml is). Beside a sufficiently new Java version you need maven to be installed. Build via maven:

mvn package

Execute the sample main method:

mvn exec:java -Dexec.mainClass="de.uniwue.informatik.main.DrawGraphs"

This will open a window showing some stages of the algorithm for creating a NIC-planar drawing with right-angle crossings on a quadratic size grid of a sample NIC-planar graph. The stages are as follows (the next stage appears by pressing the "Step" button).

  1. The drawing is the one produced by the shift algorithm of Harel and Sardas, where the crossing edges have been removed and there is a divided kite for each crossing (containing dummy edges).
  2. The drawing of the previous stage scaled up by a facator of 2.
  3. The drawing after inserting the 1-bend edges that cross in a right angle inside the kites. There are three cases with one case appearing per kite (for a description see the article).
  4. The drawing after removing the dummy edges. This is the final NIC-planar 1-bend RAC drawing of the input sample graph.

For the displayed graph drawings, there is also an output as ipe files at:

target/drawings/

The source code is available. You may modify it to try different graphs and things.


Contact

For any question regarding this project send an email to: [email protected]

embedded-graph-drawing's People

Contributors

j-zink-wuerzburg avatar

Watchers

 avatar  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.