BEGIN { n = (no = 0) -1 }

/^[^#]/ {

  gsub(/\r/,"")

  split($0, arr, "/")

  if(! (0 in max)) {
    k = split(arr[4], pos, " ")  # number of neighbours
    max[0] = 0
    max[1] = k
    for(i = 2; i < 25; i++) max[i]=(k-4)*max[i-1]-max[i-2]
    max[0] = 1
  }

  posnr = split(arr[6], pos, " ")

  if(posnr != 2) {
    print "Incompatible physical position! 'depth nr'"
    exit
  }

  if(pos[2] == 0) pos[1] = 0

  pos[1] += 0
  pos[2] += 0

  posarr[pos[1],pos[2]] = arr[1] + 0
}


END {

  delete ind[-1]

  N = ind[0]  # root neuron should exist

  pi2 = 2. * 4. * atan2(1,1)

  for(elem in posarr) {
    split(elem, separate, SUBSEP)
 # print separate[1], separate[2], max[separate[1]]
    t = pi2 * separate[2]/max[separate[1]]

    x = cos(t) * separate[1]
    y = sin(t) * separate[1]

    print x, y, posarr[elem]
  }
}


