Take the 2-minute tour ×

I have a .stl file from which I have extracted the data. Now I want to draw / render the image of the object in that .stl file. Please guide me how I draw / render 3D image in php.

As I have seen that the same can be achieved easily from Java 3D but my application is in php.

share|improve this question
Jeez, you don't want much do you? –  Gareth Mar 3 '12 at 9:34
PHP doesn't come with any 3D libraries although you could probably implement something like OpenGL via C or use GD to generate a 2D image based on the file but it would be a lot of work. –  Programming Thomas Mar 3 '12 at 9:50
You could try putting your vertex data into WebGL. –  Smamatti Mar 3 '12 at 9:59
How is this not a real question? Huh! –  Flavius Mar 3 '12 at 10:03
add comment

2 Answers

Just found a 3D library for PHP here http://kore-nordmann.de/projects/image_3d/index.html

share|improve this answer
add comment

It is not impossible... although it is a little odd.

You can use GD library and render your stl into a png. You will have to implement all the 3D drawing stuff by hand (polygons, textures, lights, removal of unseen polygons).

Not an easy job.

share|improve this answer
add comment

Your Answer


