Further numerical robustness issue in path rendering
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.3k
- Forks
- 300
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
Hello, I've quietly followed this project for quite some time, and thank you for this great work!
I am aware the path rendering algorithm is numerically tricky, and many numeric issues have already been resolved in the past. But unfortunately I still run into one issue here. The following incorrectly rendered image is produced by latest vello on the main branch (8a84a4abf7aaabdb7de82e3d9d86ed427ad21638); the correct image should be a white filled square.

To reproduce, replace the function `add_shapes_to_scene` in `examples/simple/src/main.rs` with the following code:
```
fn add_shapes_to_scene(scene: &mut Scene) {
use vello::kurbo::PathEl::*;
let path = [
MoveTo((0.0, 0.0).into()),
LineTo((1000., 0.).into()),
LineTo((1000., 1000.).into()),
LineTo((0., 1000.).into()),
LineTo((-1.87016292e-06, 923.848633).into()),
LineTo((1.87016292e-06, 156.151367).into()),
ClosePath,
];
scene.fill(
vello::peniko::Fill::NonZero,
Affine::IDENTITY,
Color::new([1.,1.,1.,1.]),
None,
&path,
);
}
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by replacing add_shapes_to_scene in examples/simple/src/main.rs with the supplied path and run the simple example to reproduce the incorrect rendering. Trace the numerical path-rendering behavior responsible for the result; done means this path renders as the expected white filled square.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100