Explore a comet with R’s "rgl" package
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Last month, the Philae lander touched down on comet Churyumov–Gerasimenko. In the process, the lander and the orbiting Rosetta probe captured detailed data on the geometry of the comet, which the ESA published as a shape file. You can use the rgl package to visualize and explore such shape files quite simply as follows:
Then you can manipulate the comet in 3-D with a mouse in an X11 window. (Note, if you’re on a Mac you will need to install XQuartz.) Also try running play3d(spin3d()) to see it rotate automatically.
Package maintainer Duncan Murdoch has made things even easier if you have the very latest version of rgl (currently only available in source form), where you can simply run:
example(readOBJ)
Thanks to Duncan for this very cool example!
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.