Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 844 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 844 Bytes

stl-package

Show 3D objects in STL file format in R.

STL file format

The STL file format is a simple format to store 3D data. An STL file describes a raw, unstructured triangulated surface by the unit normal and vertices (ordered by the right-hand) of the triangles using a three-dimensional Cartesian coordinate system (https://en.wikipedia.org/wiki/STL_(file_format){.uri}).

Together with the RGL package function 'triangles3d()' it is possible to plot STL files very easy, see example below.

Usage

library(stl)
library(rgl)
options(rgl.printRglwidget = TRUE)
boat <- stl::read_stl("inst/extdata/Boat.stl")
open3d()
rgl::triangles3d(boat, col = "green")
close3d()