Find the triangle on a sphere

Hi! I want to find the triangle that contains a certain point on a sphere in vtk. How should I do that? I knew that spheres in vtk are by default approximated by triangles. Thanks in advance!

Is the question related to vtk.js or ParaViewWeb as you are posting in the Web topic?

Also what do you mean by “you want to find a triangle that is based on a point”. Are you thinking of picking? If not, you can iterate over the cells and if you find a cell that use the index of the point you care about, you would have the answer to your question.

Sorry I am new here and am not familiar with the Web topic. So yes I am coding in Paraview. I want to calculate the location of a particle inside a cell after bouncing to the inner surface of the cell. I heard that “triangles” are used to approximate the surface of the cell, so I am thinking about finding that specific triangle the particle collides.

@cory.quammen how do we move topic?

Moderators can edit the original post and change the category. I have done so.