question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animating vedo.shapes.Spheres

See original GitHub issue

I am trying to visualise a particle system using the vedo.shapes.Spheres class. This is the main loop:

    def run(self):
        print("Run simulation...")

        reset_cam = True

        while True:
            #particle_driver.collision_check()
            
            particle_driver.boundary_check()
            particle_driver.update()
            particle_driver.get_positions(self.positions)
            
            #self.points.points(self.positions)
            self.spheres.points(self.positions)

            plt.show(resetcam=reset_cam, axes=1)
            if reset_cam:
                reset_cam = False
            if plt.escaped:
                break  # if ESC is hit during the loop

Running this will display a single set of points and then crash without an exception.

particle_driver is a fortran extension module. Using vedo.mesh.Points class works.

It also works when you recreate a Spheres instance every loop iteration, but that is really slow…

Any ideas?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jonaslindemanncommented, Nov 1, 2021

Yes. Black window appears and then disappears. No drawing from what I can see.

that’s pretty weird! But the small standalone script I sent is also failing ? Yes

Ok, I was a bit confused by the API that looked a lot like the Points API. So the spheres in Spheres are a single mesh?

Yes. And - you are right - the API similarity can be misleading… I need to clarify it in the docs.

Thanks, looks like a very impressive library. Evaluating right now for a project assignment in a Scientific Programming course.

Jonas

0reactions
jonaslindemanncommented, Nov 1, 2021

Perhaps a bug, but on Windows you can’t type vedo in the command line. For all the other scripts in this folder there are .exe equivalents. I had to do:

python vedo --info in the Scripts directory 
_________________________________________________________________
vedo version      : 2021.0.6   https://vedo.embl.es
vtk version       : 9.0.1
python version    : 3.7.11 (default, Jul 27 2021, 09:42:29) [MSC v.1916 64 bit (AMD64)]
python interpreter: C:\Anaconda3\envs\sciprog-project\python.exe
vedo installation : C:\Anaconda3\envs\sciprog-project\lib\site-packages\vedo
system            : Windows 10 nt AMD64
Read more comments on GitHub >

github_iconTop Results From Across the Web

3D shapes - Sphere - YouTube
PowToon is a free tool that allows you to develop cool animated clips and ... or anything else you could use an animated...
Read more >
Create spheres using shapes in After Effects - YouTube
Templates: http://easyaftereffects.net/ shapes - spheres -in-after-effects/Hi. In this after effects tutorial i teach you how you can create ...
Read more >
Easy 3D Sphere Animation. After Effects Tutorial - YouTube
... Tutorial we are going to learn how to create an Easy 3D Sphere Animation in a coolest way ever! ... Your browser...
Read more >
vedo.shapes API documentation
Integrate a vector field on a domain (a Points/Mesh or other vtk datasets types) to generate streamlines. The integration is performed using a...
Read more >
After Effects + FreeForm Pro - Reveal Animation with Spheres
Charles Yeager shows how to create a shape reveal animation with FreeForm Pro in After Effects. The animated spheres are easily created with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found