-
Notifications
You must be signed in to change notification settings - Fork 60
mesh with graphic features #954
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
Conversation
|
made some examples with animations too, including ones that change the data. Positions and indices are just recomputed. Not sure if there's a better way. ripple-2025-11-30_06.24.34.mp4got the earth to rotate on it's tilted axis 😄 earth-2025-11-30_06.25.07.mp4ellipsoid-2025-11-30_07.10.03.mp4 |
kushalkolar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with the additions and also added PolygonGraphic, let me know what you think :D
| if data.shape == (3,): | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a single triangle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also confused by this, I interpreted it from here in the polygon selector:
fastplotlib/fastplotlib/graphics/features/_selection_features.py
Lines 412 to 415 in 2a430f8
| if len(value) >= 3: | |
| indices = triangulate(value) | |
| else: | |
| indices = np.zeros((0, 3), np.int32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that shape is still (0, 3), not (3, ), right?
| _features = { | ||
| "positions": VertexPositions, | ||
| "indices": BufferManager, | ||
| "mapcoords": (BufferManager, None), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the mapcoords feature removed intentionally? I can see it being useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I don't properly understand features vs normal properties.
* Add support for mesh and surface * restore line example * Implement image-surface example * Fix 3D camera for mesh examples * Just remove selector logic for now * new examples in gallery * mesh with graphic features (#954) * mesh with gfeatures * surface graphic works * update, add PolygonGraphic, works * black * for docs and test screenshots * black * polygon data updating works * update * black * more examples * update add_graphic mixin * code review changes * fix * better polygon example * remove unused import * update graphics mixin * docs * black * don't need to set limit for docs gen * add missing comma * dont run terrain example * new screenshots * remove (i expect) unnecessary check * lights as properties * just use VertexPositions * update PolyData * I need to use precommit * update api docs --------- Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>

@almarklein wanted to get your thoughts on this before I add it to #953
It adds to your implementation by adding properties and graphic features