Learn R Programming

vrmlgen (version 1.4.9)

vrmlgen-package: Create 3D data plots, charts and graphs as VRML files

Description

vrmlgen translates 3D data, i.e. 3D point clouds, meshes or surfaces, into a visual representation in the Virtual Reality Markup Language (VRML, file type .wrl) or alternatively, in the LiveGraphics3D format. Apart from providing access to low-level plotting functions (points, lines, text, etc.) through a unified interface, several higher-level visualization methods are supported, including 3D scatter plots, meshes, bar charts, graphs and density estimation contour surfaces.

Arguments

Details

Package:
vrmlgen
Type:
Package
Version:
1.4.7
Date:
Date: 2011-02-09
License:
GPL (>= 2)
LazyLoad:
yes
URL:
http://www.cs.nott.ac.uk/~egg/vrmlgen

References

Enrico Glaab, Jonathan M. Garibaldi, Natalio Krasnogor (2010). vrmlgen: An R Package for 3D Data Visualization on the Web. Journal of Statistical Software, 36(8), p. 1-18. URL: http://www.jstatsoft.org/v36/i08/

Examples

Run this code

curdir <- getwd()
outdir <- tempdir()
setwd(outdir)

# create 33x3 matrix with random 3D input data
mat <- matrix(runif(99, 0, 3), ncol = 3)

# create random class assignment vector with three classes
y <- round(runif(33, 0, 2))
y <- ifelse(y == 0, "class 1", ifelse(y == 1, "class 2", "class 3"))

# create ouput using numbers from 1 to length(y) as metalabels
cloud3d(mat, labels = y, metalabels = 1:length(y), col.axis = "black", col.lab = "blue",
col.bg = "white")

setwd(curdir)

Run the code above in your browser using DataLab