Learn R Programming

kml3d (version 0.6)

saveTrianglesAsASY: ~ Function: saveTrianglesAsASY ~

Description

Export a Triangle object to an '.azy' file.

Usage

saveTrianglesAsASY(scene, filename = "scene.asy")

Arguments

scene
[Triangle]: Object representing the graph to plot.
filename
[character]: Name of exported file.

Value

  • An '.asy' file, in the current directory.

Author(s)

Luke Tierney Chair, Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa

Details

Export a Triangle object to an '.asy' file.

References

http://www.stat.uiowa.edu/~luke/R/misc3d/misc3d-pdf/

Examples

Run this code
### Generating the data
  myCld <- gald(c(5,5,5))
  kml(myCld,3,1)

  ### Creation of the scene
  scene <- plot3dPdf(myCld)
  drawScene.rgl(scene)

  ### Export in '.azy' file
  saveTrianglesAsASY(scene)

  ### Creation of a '.prc' file
  # Open a console window, then run
  # asy -inlineimage -tex pdflatex scene.azy

  ### Creation of the LaTeX main document
  makeLatexFile()

  ### Creation of the '.pdf'
  # Open a console window, then run
  # pdfLatex main.tex

Run the code above in your browser using DataLab