I want to draw three dimensional figures and diagrams for my physics classes. Some examples of drawing can be various crystal structures in various orientations, various planes in them, three dimensional structure of molecules, marking the distances and the angles etc. I use tikz for 2D figures. I am extremely happy with it for 2D figures. But as far as 3D figures are concerned, it feels like I am drawing a 2D figure and changing/tweaking it to get an appearance of 3D figure. For the three dimensional figures so far I have been using Asymptote. I have used it to make crystal structures and they look almost as good as i want them to. I want the figures to have following qualities:

  • They should be mathematically accurate.

  • The program should know which surface is on top of which all surfaces.

  • It should recognize the inside and the outside of the surface.

  • There should be possibility of shadowing and lighting effects.

  • Once I draw the figure, it should be easier to rotate the figure just by changing the parameters. The lighting, shadow etc. effects should be taken care of by the program.

Tikz satisfies only the first of these requirements due to which I don't use it. Asymptote and (presumably) pst-solides3d satisfy all these conditions. I recently had a look at the pst-solides3d documentation and the examples suggest me that this is the package I should invest my time in. What are your suggestions in this regard? May be you can compare these two on following lines:

  • Which one is well documented. To me the answer seems to be pst-solides3d.

  • Once I know Asymptote, there is no need to learn pst-solides3d. I actually don't know Asymptote well and can make a switch if required.

  • Which one better suits my needs. This one is obviously the crux of the whole question.

  • Please feel free to add other considerations.

Following are some details about me which I hope will help in giving a focused reply.

  • I have made some crystal structure figures using Asymptote.
  • I am not a programmer but don't consider myself stupid also.
  • I don't know C or C++ languages.
  • It is not critical that number crunching needs to be done by the program itself (it will be very convenient, like in tikz, if it does). I am ready to generate those numbers using others tools I am comfortable with.
  • I use pdflatex (if that is a consideration at all).
  • I am looking for an easy to learn program, but being able to make figures of my choice is of utmost importance.

I hope the question is not duplicate and has merit. Thanks in advance.

  • 1
    As far as documentation goes, I think all the use cases you describe are covered for Asymptote in my tutorial, which is designed to be accessible to non-programmers. And from what I understand, pst-solides3d has to be used very carefully to get hidden surface removal: see the section "Fusing solids" in the pst-solides3d manual. – Charles Staats Jun 21 '16 at 15:32
  • @CharlesStaats Thanks for the reply and thanks for the awesome tutorial. Whatever I have been able to draw in Asymptote is because of your tutorial. – Abhinav Pratap Singh Jun 21 '16 at 22:46
  • @CharleStaats: Can Asymptote creat shadowing and lightning effects? from OP: "There should be possibility of shadowing and lighting effects" – Black Mild Sep 23 '18 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.