GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - albertsun/JavaScript-Geometry: Computational geometry algorithm(s) in JavaScript

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
barycentric
barycentric
 
 
datastructures
datastructures
 
 
findintersections
findintersections
 
 
test
test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.markdown
README.markdown
 
 

Repository files navigation

JavaScript-Geometry

JavaScript-Geometry is (the start) of a collection of computation geometry algorithms implemented in JavaScript and designed to run in any modern browser. To use it, include the javascript files in the datastructures folder, and the javascript file of the algorithm you want to use. Licensed under the Apache License, Version 2.0

For now it only implements one algorithm to find all intersections in a set of line segments in 2D.

  • findintersections.js

    Find all intersections in a set of lines in O(n logn) time using a plane sweep algorithm as described in Computational Geometry - Algorithms and Applications Third Edition, by Mark de Berg, Otfried Cheong, Marc van Kreveld and Mark Overmars. This file implements just one method, findIntersections( segments ) which takes as input an array of segments and returns an array of the intersection points, along with lines which intersect at that point.

      >>> findIntersections([ [[1,0], [1,2]], [[0,1], [2,1]] ])
      [ { "loc": [1, 1], "segments": [ [[1,0],[1,2]], [[0,1],[2,1]] ] } ]
    

As I work through the book, more will hopefully come.

The implementations of the Red Black Tree used as a data structure is a modified version of code from the js_cols library by Thomas Stjernegaard Jeppesen http://code.google.com/p/jscols/

About

Computational geometry algorithm(s) in JavaScript

albertsun.info/

Resources

Readme
Apache-2.0 license
Activity

Stars

29 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.