yt-project / yt_idv

Interactive volume rendering for yt
Other
9 stars 6 forks source link

Curve plotting #26

Closed chrishavlin closed 2 years ago

chrishavlin commented 2 years ago

This PR adds a new Curve object so the user can plot arbitrary curves along with other rendering. Here's the output from the new example that plots a circle in the x-y plane:

Screenshot from 2021-08-06 13-43-40

chrishavlin commented 2 years ago

still a few things to do:

chrishavlin commented 2 years ago

latest commits added a curve collection object to add multiple curves at once that are will all have the same width and color. I also changed the new example, amr_volume_rendering_with_curves.py, to calculate and add streamlines: Screenshot from 2021-08-26 17-21-15

chrishavlin commented 2 years ago

@matthewturk this is ready for review I think! One part I wasn't sure about -- for the CurveCollection, I ended up using GL_LINES for plotting, which necessitates doubling the vertex data. I chose that over multiple opengl calls to draw multiple lines, but maybe there's a better approach here. Maybe OK for now, but certainly could be improved I think.