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.

Displaying spheres inside mesh

See original GitHub issue

Hey marco

I have a 3d array which i have converted into a mesh. I also have the coordinates of some spheres i would like to place inside this mesh. Right now i am doing something like this.

sp_list = []
for (c1, c2, c3) in coords_list:
   #print (c1, c2, c3)
   s = Sphere(pos=(c1, c2, c3), r=10, c='r', alpha=1, res=24, quads=False)
   sp_list .append(s)
show(mesh_list, sp_list)

but the mesh structure and the spheres appear separately when what i want is for the spheres to be displayed inside the structure is there any way to do this with vtkplotter.

Screenshot 2020-07-01 at 17 51 31 current output

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anorak94commented, Jul 1, 2020

ah thanks i saw it my coordinates were getting switched in the spheres the show axes part helped me get it

0reactions
marcomusycommented, Jul 1, 2020

I make the mesh from 724x403x398 volumetric data

so, probably this mesh lives in the box range x=[0,724], y=[0,403] and z=[0,398] use show(axes=1) to see the reference frame

show(mesh, spheres) separately maybe thats why i am getting this error

no… i don’t see any error in that…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Voronoi Sphere in MeshLab - Matt's Hub
This can be generated right within the software under Filters > Create New Mesh Layer > Sphere. When prompted, keep the radius setting...
Read more >
Meshing in the space between two spheres - COMSOL
If you have this cylinder in your geometry then there must be a domain. It is just not straightforward to visualize a mesh...
Read more >
RandomPoint inside mesh for walk-on-spheres Monte Carlo ...
Once I've got x0,r0 I can do RandomPoint on the sphere to generate x1 and Nest this process until the sphere radius is...
Read more >
Python 3d analysis (vedo): find largest spheres that can fit ...
I was wondering - can those points be made into Spheres of a given volume, then I can count how many spheres 'fit...
Read more >
UV Sphere - Catlike Coding
To show vertices ProceduralMesh needs to access them. We do this via the simple Mesh API, retrieving them via the mesh's vertices property, ......
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