-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Carpet plots #1179
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
Comments
One challenge for this plot: contour lines. We need hash lines along a contour line in order to represent inequalities, which means we need to be able to construct continuous contour lines. simplicial-complex-contour, unless I'm wrong, needs triangle geometry in 2D and returns contour segments in cell order rather than as continuous lines. Imagine a quad a-b-d-c which we need to split into triangles in order to get contours.
The first choice is a-b-c and b-d-c. When there's high frequency detail, this doesn't do so well: a-d-c and a-b-d obviously gives similar results: A switching function that minimizes the angle between the normals (imagining the data projecting into the third dimension) is better but not great: Okay, so next I tried splitting it into four triangles by taking the centroid of the coordinates and data.
This basically just adds a lot more noise to the contours since it's all based on linear interpolation. It does get the topology pretty good though. So at @alexcjohnson's suggestion, I filtered out the center points after using them to construct the geometry. Yay. This seems to work well: Nothing will get it perfect when there's heavy aliasing, but this is at least way better. The code can hopefully be extracted, cleaned up just a bit (not worth heavy cleanup since 250 x 250 grids take about 300ms to construct pretty complicated contours), and used in the svg version. 😄 Current prototype at: https://rreusser.github.io/demos/carpet/ |
done in #1595 |
References:
The text was updated successfully, but these errors were encountered: