ruby-geometry icon indicating copy to clipboard operation
ruby-geometry copied to clipboard

Simple geometry classes and algorithms in Ruby

Results 5 ruby-geometry issues
Sort by recently updated
recently updated
newest added

I search function to count distance 2 polygons. Simple outline as distance ![bitmap](https://user-images.githubusercontent.com/17579697/37453239-699620e6-2837-11e8-89cb-5eceeb62704b.png)

I haven't gotten a chance to spend much time with this, but I've dropped in the algorithm I'm using in my application to replace `Polygon.contains?`. There's one failing test, which...

arr = [Geometry::Point.new(1.6, 1.0), Geometry::Point.new(1.6, 2.0), Geometry::Point.new(1.2, 2.0), Geometry::Point.new(1.2, 1.0)] point = Geometry::Point.new(1.5, 1.5) result = Geometry::Polygon.new(arr).contains?(point) Result = true. It's ok. But: arr = [Geometry::Point.new(1.6, 1.0), Geometry::Point.new(1.6, 2.0), Geometry::Point.new(1.2,...

Hi Daniel, You may find here a pull request removing the full randomness to determine a _good_ray_. I've added missing test for closed polygons. The test is based on the...

I have modified `PointInPolygon#point_location` to use `random_ray` directly instead Then it becomes very fast for me And the result is acceptable too (observed on a map with markers and polygons)...