Explore a comet with R’s "rgl" package

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
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.

Comet

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!

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)