Giter Site home page Giter Site logo

urbandesign09 / ha-geometry-technical-challenge Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 110 KB

Computational Geometry Engineer Technical Challenge

Home Page: https://ha-geometry-technical-challenge.netlify.app/

License: MIT License

HTML 14.08% JavaScript 83.93% CSS 1.99%

ha-geometry-technical-challenge's Introduction

Computational Geometry Engineer Technical Challenge

Solution to the Computational Geometry Engineer Challenge

Table of Contents

General info

Given a set of vertices connected by edges, provided in a JSON data structure, write an algorithm that finds all of the interior faces (polygons) of such a data structure. The output schema should be a simple JSON format.

Demo

HA Engineering Challenge

File Structure

project
│   README.md
|   index.html (Web Page)
│
└───scripts
│   │   frontEnd.js (Front End)
│   │   index.js (Algorithm #1 Solution)
│   │   tests.js (Algorithm #1 Tests)
│   │   neighborFace.js (Algorithm #2)
│
└───images
└───styles

Usage

import ha-geometry-technical-challenge as gtc

//input
const inputJSON = {
  "vertices": [[0,0], [2,0], [2,2], [0,2]],
  "edges": [[0,1], [1,2], [0,2], [0,3], [2,3]]}

//output
const outputJSON = {
  {"name":"Face 1","vertices":[[2,0],[0,0],[2,2]],"edges":[[1,0],[0,2],[2,1]]},
  {"name":"Face 2","vertices":[[2,2],[0,0],[0,2]],"edges":[[2,0],[0,3],[3,2]]}
}

//returns output
gtc.textData(input)

Installation

Use the package manager npm to install file.

npm install ha-geometry-technical-challenge

Reference

DCEL Structure

Convex Hull Problem - Sample in Java

License

MIT

ha-geometry-technical-challenge's People

Contributors

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