Skip to content
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

Implementation Of Visualization Framework #14

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Implementation Of Visualization Framework #14

wants to merge 11 commits into from

Conversation

gviga
Copy link
Collaborator

@gviga gviga commented Dec 26, 2024

Hi,
I was thinking about how we can visualize shapes and came up with a proposal.
Since there are different libraries out there to plot meshes and point clouds and it seems that a lot of people use their favorite, I was thinking of developing a structure to define some 'Primitive' class, e.g a function to plot a mesh, that can be created in different ways using different libraries.
From this idea comes the Shape/Mesh Plotter, which implements different functions depending on the selected library.

For now, I implemented a function to plot meshes using PyVista and Plotly (I still have problems with PyVista).

I'm curious about what you think about this idea and if my implementation for this kind of things makes sense.

@gviga gviga marked this pull request as draft December 26, 2024 18:16
@luisfpereira luisfpereira self-requested a review December 27, 2024 03:56
@luisfpereira
Copy link
Owner

luisfpereira commented Dec 27, 2024

Great job @gviga! I can see you get the main idea behind this package.

I've done a small git change here: this branch now starts from main, instead of scalable-fm.
This because they're independent and I believe we'll merge this before scalable-fm.
Please pull it locally again before merging any commit (you may need to delete your current visual and then do git fetch, git switch -c visual origin/visual).

Notice if you need any change available in other branch for testing purposes, you can always locally create a third branch and merge all the required branches. (Then remember to do commits only in the respective original branches.)

If you need that features for this code to work, then let's try to merge those other branches to main asap and merge main here.

I know this is annoying, but it makes things cleaner to develop/review.
When the package becomes more mature, this kind of weird development workflow will be avoided.

Copy link
Owner

@luisfpereira luisfpereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great starting point @gviga!

f1,f2,f3= faces[:,0], faces[:,1], faces[:,2]
#project the error on the lbo basis
fig = go.Figure(data=[go.Mesh3d(x=x,y=y,z=z, i=f1, j=f2, k=f3)])
fig.show()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's return fig or the plotter in all the plot functions; users may want to perform further operations on these objects.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe do not call show and expect plotter to have that method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment, I have implemented a show() function that displaying attributes instantiated by the plot function

- implementation of figure value in which to store figures
- implementation of show() function
@gviga
Copy link
Collaborator Author

gviga commented Dec 28, 2024

Hi @luisfpereira ,
I have developed your suggestions. I have implemented the two functions as functions that take as input meshes and outputs specific objects.

gviga and others added 2 commits December 31, 2024 10:45
@gviga
Copy link
Collaborator Author

gviga commented Jan 27, 2025

Hi there, I have implemented a function to select indexes of points to select landmarks for shapes. I noticed we are missing a way to differentiate between point clouds and meshes at plotting time. Let me know if you have any ideas. However, I think we can start merging this code to have some basic implementation while we work on other parts.

@gviga gviga marked this pull request as ready for review January 27, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants