Description Usage Arguments Details Value Author(s) Examples
r2stl
takes numeric input exactly as with R's normal persp()
function. The output is a STL (stereolithography) file.
1 |
x |
|
y |
|
z |
|
filename |
|
object.name |
|
z.expand |
|
min.height |
|
show.persp |
|
strict.stl |
|
To view and test the STL files before printing them can be done with many programs, for example an open-source option is Meshlab http://meshlab.sourceforge.net/.
none
Ian Walker
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Let's do the classic persp() demo plot
x <- seq(-10, 10, length= 100)
y <- x
f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
z[is.na(z)] <- 1
r2stl(x, y, z, filename="lovelyfunction.stl", show.persp=TRUE)
# Now let's look at R's Volcano data
z <- volcano
x <- 1:dim(volcano)[1]
y <- 1:dim(volcano)[2]
r2stl(x, y, z, filename="volcano.stl", show.persp=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.