R/sph2image.R

sph2image = function(egg, sph) {
  n = nrow(sph)
  image = matrix(0, nrow=n, ncol=2)
  colnames(image) = c("x", "z")
  for(i in 1:n) {
    cart = sph2cart(sph[i,])
    x = cart[1] + egg$mid.point[1]
    z = cart[3] + egg$mid.point[2]
    image[i,] = c(x, z)
  }
  return (image)
}

Try the eggs package in your browser

Any scripts or data that you put into this service are public.

eggs documentation built on May 2, 2019, 5:23 p.m.