Skip to main content
. 2018 Mar 28;18(4):1009. doi: 10.3390/s18041009
Algorithm 1 Searching the congruent tetrahedron
Input: Ts={s0,s1,s2,s3}: four vertexes of Ts; HT: hash table
Output: Tm={m0,m1,m2,m3}: four vertexes of Tm
  • 1:

    L01=s0s12, k01=H(L01) ▹Lij, kij: length between si and sj, and bucket number

  • 2:

    search the point pair (m0,m1) in the k01th bucket;

  • 3:

    L02=s0s22, L12=s1s22, k02=H(L02), k12=H(L12)

  • 4:

    search the point pair (m0,m2) in k02th bucket, and (m1,m2) in k12th bucket

  • 5:

    if there is no point m2 was found in step 4 then

  • 6:

      goto step 2 to find another pair

  • 7:

    end if

  • 8:

    L03=s0s32, L13=s1s32, L23=s2s32, k03=H(L03), k13=H(L13), k23=H(L23)

  • 9:

    search the point pair (m0,m3) in k03th bucket, the point pair (m1,m3) in k13th bucket, and (m2,m3) in k23th bucket

  • 10:

    if there is no point m3 was found in step 9 then

  • 11:

      goto step 4 to find another pair

  • 12:

    else

  • 13:

      return the four points m0, m1, m2 and m3

  • 14:

    end if