Skip to content

Commit

Permalink
Disable feathering to prevent artifacts in visualizer (#26)
Browse files Browse the repository at this point in the history
Fixes artifacts in the visualizations of some of the IPA polygons by
disabling feathering in the tesselation which seemed to be the root
cause. Previously you would see long lines shooting out from some of the
triangles in the triangulations, particularly very thin obtuse ones,
those artifacts are gone with this change.
  • Loading branch information
adamconkey authored Jan 2, 2025
1 parent 44e5875 commit d19772c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions visualizer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ impl eframe::App for TemplateApp {
}
});

// This was needed to workaround some artifacts in the plot for
// highly obtuse triangles in triangulations. It's possible it
// causes other problems down the road, so can try setting to
// true if other things look strange.
// https://github.com/adamconkey/computational_geometry/issues/17
ctx.tessellation_options_mut(|to| {
to.feathering = false;
});

egui::CentralPanel::default().show(ctx, |ui| {
self.visualizer.ui(ui, &self.selected_polygon);
});
Expand Down

0 comments on commit d19772c

Please sign in to comment.