Learn R Programming

rgl (version 0.70)

r3d: Generic 3D interface

Description

Generic 3D interface for 3D rendering and computational geometry.

Arguments

code

rgl.*

enumerate

  1. Geometry Objects:

item

  • Transformation:
  • Visualization:
  • Computation:

Details

R3d is a design for an interface for 3d rendering and computation without dependency on a specific rendering implementation. R3d includes a collection of 3D objects and geometry algorithms. All r3d interface functions are named *3d. They represent generic functions that delegate to implementation functions. The interface can be grouped into 8 categories: Scene Management, Primitive Shapes, High-level Shapes, Geometry Objects, Visualization, Interaction, Transformation, Subdivision. The rendering interface gives an abstraction to the underlying rendering model. It can be grouped into four categories:
  1. Scene Management:
{A 3D scene consists of shapes, lights and background environment.} Primitive Shapes:{Generic primitive 3D graphics shapes such as points, lines, triangles, quadrangles and texts.} High-level Shapes:{Generic high-level 3D graphics shapes such as spheres, sprites and terrain.} Interaction:{Generic interface to select points in 3D space using the pointer device.}

See Also

points3d lines3d segments3d triangles3d quads3d text3d spheres3d sprites3d terrain3d select3d dot3d wire3d shade3d transform3d rotate3d subdivision3d qmesh3d cube3d rgl

Examples

Run this code
x <- c(0,1,0,0)
     y <- c(0,0,1,0)
     z <- c(0,0,0,1)
     labels <- c("Origin", "X", "Y", "Z")
     i <- c(1,2,1,3,1,4)

     rgl.open()
     rgl.texts(x,y,z,labels)
     rgl.texts(1,1,1,"rgl.* coordinates")
     rgl.lines(x[i],y[i],z[i])

     open3d()
     text3d(x,y,z,labels)
     text3d(1,1,1,"*3d coordinates")
     segments3d(x[i],y[i],z[i])

Run the code above in your browser using DataLab