Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Neighboring triangles of each vertex

  1. Nov 9, 2012 #1
    I have a mesh with unstructured triangular grid.
    I need to find neighboring triangles of each vertex. How can I do it?
    Thanks before :D
     
  2. jcsd
  3. Nov 15, 2012 #2

    chiro

    User Avatar
    Science Advisor

    Hey ria91.

    What exactly is the data structure like? If its just a list of triangles then do a double loop (runtime O(n^2)) where you fix one triangle and get all the other triangles that have at least one similar vertex.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook