-
Notifications
You must be signed in to change notification settings - Fork 267
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
Set camera perspective so that projected ellipses on image plane fit on ellipsoids #1202
Comments
hi @ttsesm |
@marcomusy what python version are you using? maybe you could try with v3.10 (I think I had similar issues installing the lib with a newer python version) The |
..it still fails compiling.. |
Hhhmmm... interesting... How I can save the ellipsoids and ellipses points... 🤔 I've tried also with pickle, based on the recent support of the Also can I use somehow the |
thanks for the link! if you have many such ellipsoids you can merge and save them normally with my_list_of_ellis
...
ellis = vedo.merge(my_list_of_ellis, flag=1)
ellis.write("merged_ellis.vtk") another option is to save an Assembly, see |
The The I am saving the |
I just pushed a fix.. try: from vedo import *
# test write
ellis = []
for i in range(200):
elli = Ellipsoid().pos(5*np.random.randn(3)).rotate_z(i)
elli.c(i).alpha(0.1)
elli.metadata['my_name'] = f'ellipsoid_{i}'
ellis.append(elli)
asse = Assembly(ellis).shift([100,0,0])
asse.write("ellipses.npy")
# test read
asse2 = Assembly("ellipses.npy")
meshes = asse2.unpack()
meshes[0].alpha(1).print()
show(asse2, axes=1) |
Thanks Marco, indeed now everything seems to work fine.
So, now the initial question is how I can set the camera (if possible) position in 3D so that I look from behind and overlay the projected ellipses on the image plane to the ellipsoids 🤔 btw, the projected ellipsoids that are outside the plane are obviously not visible that's why you also have some ellipses being cut out fully or partially on the image plane since not all of them fit on the image. |
Hi @marcomusy,
I am trying to set the camera perspective so that the projected ellipses on image plane fit on ellipsoids that I am manually creating. For example I have the following set of ellipsoids and ellipses (projected on a random image plane):
The image plane:
and now I want to set my camera perspective to a fixed position so that I can get the contours of the projected ellipses
to fit the silhouettes of the ellipsoids as you can see bellow (tried to set it manually with the mouse, without great success):
I have the camera settings, check the code snippet bellow:
The text was updated successfully, but these errors were encountered: