I cannot work out how to render a 3D drawing to a PDF file in the python mode of Processing. Here's an example of a drawing:
size(400, 400, P3D)
noStroke()
background(0)
directionalLight(100, 100, 100, 100, 100, -100)
translate(width / 2, height / 2, 0)
sphere(100)
I have included add_library("pdf")
at the beginning of the script, and have experimented with createGraphics
, but I have not been able to get it to render a 3D image. Drawing 2D images to PDF works fine.