Concave polygon fill and the plot widget
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
From what I can tell by reading the docs/playing with the code currently only convex polygon filling is supported. Is supporting concave (or possibly even complex polygons) a future goal for egui or is that outside the scope of the project? I think something like [Lyon](https://github.com/nical/lyon) could be used for tessellation, and I saw the [Mesh](https://docs.rs/epaint/0.13.0/epaint/struct.Mesh.html) type so I can probably combine the two, but I didn't see support for the mesh type with the plot widget.
I really like the egui API in general and the recent improvements to the plot widget are very nice. I would like to be able to add concave polygons to plots. I am currently using wasm + html/js to create the [cavalier contours](https://github.com/jbuckmccready/cavalier_contours) web demo (web demo link [here](https://jbuckmccready.github.io/cavalier_contours_web_demo_page/)), but the egui API looks very nice and keeps everything in Rust.
I looked briefly at the code and I see the plot widget structs use the shape types/rendering under the hood. One option I see is just adding generic mesh object support to the plot widget (kind of a low level interface for the widget), another possibility is building out support for concave polygons in general, any thoughts/plans already around this?
Contributor guide
Research direction
Read the plot widget structs and the shape/rendering types mentioned in the issue, then compare the existing convex polygon path with epaint::Mesh and the proposed Lyon tessellation approach. Done means the project has resolved whether to support generic meshes or concave polygons and has a defined plot-widget API and rendering behavior for the chosen scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100