An open API service indexing awesome lists of open source software.

https://github.com/cwsmith/segsegisect

2d segment segment intersection
https://github.com/cwsmith/segsegisect

Last synced: 11 days ago
JSON representation

2d segment segment intersection

Awesome Lists containing this project

README

          

# segSegIsect
2d segment segment intersection

# build

```
main.cpp
```

# run

```
./a.out
```

# check code coverage using GCC and GCOV

```
./cov.sh
```

# check for memory leaks and errors using Valgrind

```
./memcheck.sh
```

# test cases

![](tests.png)

This figure was generated by running `gnuplot plot.gp`. The input to this
script is the `points.gp` file generated by running `./a.out`.

# credit

The segment-segment intersection code heavily borrows (as in 99% of it) from
here:

http://www.geomalgorithms.com/a05-_intersect-1.html#Line-Intersections

The test cases and the plots of them were inspired by:

https://martin-thoma.com/how-to-check-if-two-line-segments-intersect

https://github.com/MartinThoma/algorithms/tree/master/crossingLineCheck/Geometry/src