Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add voronoi #2

Merged
merged 11 commits into from
Nov 10, 2023
Merged

Add voronoi #2

merged 11 commits into from
Nov 10, 2023

Conversation

doc-E-brown
Copy link

Add voronoi diagram functionality. This is a big PR and will require a walk-through and explanation.

Still TODO:

Prep for upstream PR: docs, changelog etc
Add returning of voronoi cells from voronoi components.

doc-E-brown and others added 4 commits November 2, 2023 16:55
Signed-off-by: Ben Johnston <[email protected]>
Signed-off-by: Ben Johnston <[email protected]>
Signed-off-by: Ben Johnston <[email protected]>
Signed-off-by: Ben Johnston <[email protected]>
geo/Cargo.toml Outdated Show resolved Hide resolved
geo/CHANGES.md Outdated Show resolved Hide resolved
geo/Cargo.toml Outdated Show resolved Hide resolved
// The centres of the delaunay circumcircles form the vertices of the
// voronoi diagram
let mut vertices: Vec<Coord<T>> = Vec::new();
for tri in delaunay_triangles.iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.iter() looks redundant here


// Create the lines joining the vertices
let mut voronoi_lines: Vec<Line<T>> = Vec::new();
for neighbour in shared.neighbours.iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again .iter() probably not needed

let mut voronoi_lines: Vec<Line<T>> = Vec::new();
for neighbour in shared.neighbours.iter() {
if let (Some(first_vertex), Some(second_vertex)) = (neighbour.0, neighbour.1) {
voronoi_lines.push(Line::new(vertices[first_vertex], vertices[second_vertex]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this indexing of vertices makes me squeamish, but meh ... looks safe

f64: From<T>,
{
let mut pts: Vec<Point<T>> = Vec::new();
for tri in triangles.iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.iter() needed?

// These connections to infinity will be bounded later
// Add the connections from infinity
let mut num_neighbours: Vec<usize> = triangles.iter().map(|_| 0).collect();
neighbours.iter().for_each(|x| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for x in neighbours.iter() { .. } or for x in neighbours { .. }

};
let m = -1. / slope;
// y = mx + b
let b = midpoint.y - m * midpoint.x;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let b = m.mul_add(-midpoint.x, midpoint.y)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this tip! TIL!

// y = mx + b
let b = midpoint.y - m * midpoint.x;
let x = midpoint.x + f64::from(line.dx());
let y = m * x + b;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let y = m.mul_add(x, b)


impl GuidingDirection {
// The common point is the end co-ordinate of both lines
fn from_midpoints<T: GeoFloat>(line_a: &Line<T>, line_b: &Line<T>) -> GuidingDirection {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GuidingDirection here can be Self

// to the left or right of the other midpoints, or
// above of below the other midpoints
if (dx_a == dx_b) && dx_a {
GuidingDirection::Right
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self here and one following lines

_ => return Err(VoronoiDiagramError::UnexpectedDirectionForInfinityVertex),
}
} else {
let b = circumcenter.y - line.slope() * circumcenter.x;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give b a better name?


// Get the vertices with connections to infinity
let mut inf_lines: Vec<Line<T>> = Vec::new();
for neighbour in neighbours.iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.iter() ?


#[cfg(test)]
mod test {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary blank line

None
}

fn add_point<T: GeoFloat>(triangles: &mut Vec<DelaunayTriangle<T>>, c: &Coord<T>) -> Result<()>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result<()> unnecessary? I dont see any return or ? inside

Copy link
Member

@jayvdb jayvdb Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c -> coord or point

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c -> coord or point

I renamed add_point to add_coordinate

bad_triangle_edge_count.push(1);
}
}
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add trailing ;

let flipped_y = Line::new(y.end, y.start);
let idx =
find_line(y, &bad_triangle_edges).or(find_line(&flipped_y, &bad_triangle_edges));
match idx {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if let Some(idx) = idx { .. } else { ... } is less nesting


let mut bad_triangle_edges: Vec<Line<T>> = Vec::new();
let mut bad_triangle_edge_count: Vec<u128> = Vec::new();
bad_triangles.iter().for_each(|x| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for_each not needed here.
im less sure about the inner for_each

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean replace the for_each for a std for loop?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, this is more readable

    for x in &bad_triangles {
        for y in x.0.to_lines() {
        ...

there are a few changes needed inside to make it work.


// Replace the triangles
triangles.clear();
new_triangles.iter().for_each(|x| triangles.push(x.clone()));
Copy link
Member

@jayvdb jayvdb Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be more efficient to return new_triangles, and then this fn doesnt need a mut input

@doc-E-brown doc-E-brown changed the base branch from main to franklin-enhancements November 8, 2023 05:33
@doc-E-brown doc-E-brown merged commit 8bae552 into franklin-enhancements Nov 10, 2023
doc-E-brown added a commit that referenced this pull request Nov 13, 2023
* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>
doc-E-brown added a commit that referenced this pull request Nov 14, 2023
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
doc-E-brown added a commit that referenced this pull request Nov 15, 2023
* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>
doc-E-brown added a commit that referenced this pull request Nov 15, 2023
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
@doc-E-brown doc-E-brown mentioned this pull request Nov 15, 2023
2 tasks
doc-E-brown added a commit that referenced this pull request Nov 15, 2023
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add len to MultiPoint.

* Add is_empty to MultiPoint.

* Add entry to geo/CHANGES.md for len and is_empty on MultiPoint.

* prepare for geo-types 0.7.12 release

* Prepare for 0.27.0 release

* Update Cargo.toml

* geo now requires at least geo-types 0.7.12 for the wkt macro and the
`use-rstar_0_11` feature flag.

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

* Upstream rebase (#3)

* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
Co-authored-by: andriyDev <[email protected]>
Co-authored-by: Michael Kirk <[email protected]>
Co-authored-by: Corey Farwell <[email protected]>
doc-E-brown added a commit that referenced this pull request Jan 24, 2024
* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>
doc-E-brown added a commit that referenced this pull request Jan 24, 2024
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
doc-E-brown added a commit that referenced this pull request Jan 24, 2024
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add len to MultiPoint.

* Add is_empty to MultiPoint.

* Add entry to geo/CHANGES.md for len and is_empty on MultiPoint.

* prepare for geo-types 0.7.12 release

* Prepare for 0.27.0 release

* Update Cargo.toml

* geo now requires at least geo-types 0.7.12 for the wkt macro and the
`use-rstar_0_11` feature flag.

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

* Upstream rebase (#3)

* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
Co-authored-by: andriyDev <[email protected]>
Co-authored-by: Michael Kirk <[email protected]>
Co-authored-by: Corey Farwell <[email protected]>
doc-E-brown added a commit that referenced this pull request Jan 25, 2024
* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

* Upstream rebase (#3)

* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>

* Upstream rebase (#3) (#6)

* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add len to MultiPoint.

* Add is_empty to MultiPoint.

* Add entry to geo/CHANGES.md for len and is_empty on MultiPoint.

* prepare for geo-types 0.7.12 release

* Prepare for 0.27.0 release

* Update Cargo.toml

* geo now requires at least geo-types 0.7.12 for the wkt macro and the
`use-rstar_0_11` feature flag.

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

* Upstream rebase (#3)

* chore: add spade as a dependency

although spade is a optional dependency, it looks like a good fit for
the default features. Including it has the effect of bringing in 3 new
dependencies:

- robust 0.2 (we already use this)
- optional 0.5
- spade 2.2

I'll try to speak to the spade maintainers. Maybe we can bump the robust
version in their crate to reduce dependencies further. Also it might
make sense to ask them if the optional crate provides any real value.

* feat: initial implementation of TriangulateSpade trait

* fix: ignore example pictures in doc tests

* chore: add changelog entry

* chore: fix comment

* chore: apply review suggestion for doc comments

* chore: capitalize Delaunay

* chore: fix typo: convertes -> converts

* chore: fix typo: achives -> achieves

* feat: put required methods into a sealed trait so we don't leak them

* feat: add tests for the shapes in the doc comments

* chore: add doc tests and move cleanup function to sealed trait

* chore: fix typo

* chore: apply review suggestion for naming

* chore: improve description, worsen english

* chore: fix weird line wrap

* fix: pass epsilon as parameter + rename points -> coords

* chore: add test for different snap radius values

* chore: add link that explains constrained Delaunay triangulations

* Add voronoi (#2)

* Add Delaunay triangulation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Delaunay documentation

Signed-off-by: Ben Johnston <[email protected]>

* feat: Add Voronoi diagram

Signed-off-by: Ben Johnston <[email protected]>

* feat: Voronoi testing

Signed-off-by: Ben Johnston <[email protected]>

* feat: Remove ndarray crates

* chore: Remove unwanted Result

* feat: Remove Circle struct

* feat: Remove nested loop

* feat: Add test to trim intersection to None

* chore: Update CHANGES.md

* feat: Address review comments

---------

Signed-off-by: Ben Johnston <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>

---------

Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
Co-authored-by: andriyDev <[email protected]>
Co-authored-by: Michael Kirk <[email protected]>
Co-authored-by: Corey Farwell <[email protected]>

* Add package to cloudsmith for testing and internal use (#5)

* feat: Prepare for cloudsmith

* chore: Add cloudsmith registry

* feat: Bump version to alpha

* feat: Remove need for cloudsmith geo-types

* feat: Improve infinity line construction (#7)

* fix: Remove duplicate points (#8)

* feat: Remove duplicate points from delaunay

* feat: Flag invalid delaunay triangulation

* chore: Bump cloudsmith version

* Fix: Infinity line construction (#9)

* feat: Voronoi working

Signed-off-by: Ben Johnston <[email protected]>

* feat: Some refactoring

* feat: Improve clipping mask operation

---------

Signed-off-by: Ben Johnston <[email protected]>

* chore: Correct changelog entry

---------

Signed-off-by: Ben Johnston <[email protected]>
Signed-off-by: Ben Johnston <[email protected]>
Co-authored-by: aviac <[email protected]>
Co-authored-by: RobWalt <[email protected]>
Co-authored-by: Stephan Hügel <[email protected]>
Co-authored-by: andriyDev <[email protected]>
Co-authored-by: Michael Kirk <[email protected]>
Co-authored-by: Corey Farwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants