Nothing

```
get.sph = function(x, z, egg) {
# Get the spherical coordinate of a given point
r = NaN
theta = NaN
phi = NaN
pp = t(egg$R%*%cbind(c(x-egg$blunt.end[1], z-egg$blunt.end[2])) + egg$t)
z.hat = normalise(pp[2], -egg$length/2, egg$length/2, 0, 1)
tryCatch({
d = get.d(z.hat, egg)
phi = acos(dot(norm(c(d, pp[2])), c(0,1)))
d.prime = sqrt(d^2 - pp[1]^2)
theta = acos(dot(norm(c(d.prime, pp[1])), c(0,1)))
r = sqrt(d^2 + pp[2]^2)
}, warning = function(w) {
#
}, error = function(e) {
#
}, finally = {
return (c(r, theta, phi))
})
}
```

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.