Description Usage Arguments Value Examples
The function connects two points into a line segment.
1 | ray(from, to)
|
from |
A |
to |
A |
A SpatialLines
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ctr = rgeos::gCentroid(build)
angles = seq(0, 359, 20)
sun = mapply(
shadow:::.sunLocation,
sun_az = angles,
MoreArgs = list(
location = ctr,
sun_elev = 10)
)
rays = mapply(ray, MoreArgs = list(from = ctr), to = sun)
rays$makeUniqueIDs = TRUE
rays = do.call(rbind, rays)
plot(rays)
sun = do.call(rbind, sun)
text(sun, as.character(angles))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.