[R] Points on a Sphere -- How to visualize them?

Krzysztof Mitko kmitko at mm.st
Mon Oct 1 20:08:03 CEST 2012


W dniu 01.10.2012 19:21, Lorenzo Isella pisze:
> Dear All,
> I need to do something simple: I have a set of points which are located on  
> the surface of a sphere (let's say the centre of the sphere is in (0,0,0)  
> and the sphere has radius R=1).
> How can I visualize them?
> I am looking for something like this
> 
> http://bit.ly/PnSerU
> 
> with the addition of some spots that represent some points I want to plot  
> on the sphere surface.
> Any suggestion (and in particular example) is really useful here.
> Many thanks.

Try sphereplot:
<http://cran.r-project.org/web/packages/sphereplot/index.html>

library("rgl")
library("sphereplot")
rgl.sphgrid(radius=1)
rgl.sphpoints(long=1:50,lat=1:50,radius=1)

-- 
Best regards,
Krzysztof Mitko




More information about the R-help mailing list