### Generating the data
myCld <- gald(c(5,5,5))
kml3d(myCld,3:4,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