13

I would like to use a few simple 3d diagrams in my LaTeX document. They primarily consist of polyline segments in 3d, along with an occasional simple surface (e.g. paraboloid). There are two questions:

1) Is there a good way to draw polylines in 3d that conveys the depth? I thought about fading based on distance from the eye, and also of shadows of the drawing on the coordinate planes, but I am not sure how well it'd work in practice. I'd love hear how others solved this/see some examples that I can imitate.

2) What are the drawing packages that are compatible with LaTeX that would make the task of drawing easier. I know of asymptote which can draw parametric 3d surfaces, but are there others?

6
  • Is there a picture somewhere showing what you want to achieve? I'm afraid that I don't understand what a "polyline segment" is (my lamentable ignorance, I know). Commented Oct 30, 2010 at 11:20
  • 1
    I mention a 3d extension to Metapost in an answer to another question. Commented Oct 30, 2010 at 11:31
  • @Andrew: I mean a sequence of line segments so that beginning of one is joined to the end of the other. Alternatively: a sequence of points joined by line segments
    – Boris Bukh
    Commented Oct 30, 2010 at 11:44
  • I'd still like to see a picture of what you would consider a "true" depiction of a 3D line drawing ... Commented Oct 30, 2010 at 16:36
  • A surface made of sequences of points joined by line segments is also known as a mesh surface. Commented Dec 7, 2010 at 0:57

5 Answers 5

13

Asymptote is definitely a tool to look at, it can do nut just parametric surfaces, but graphs of functions, and I believe even isosurfaces, although I am not sure.

Take a look at sketch. It does not seem to be great at surfaces, though.

Metapost can do pretty interesting things, take a look at these examples.

7

Maybe this doesn't answer your specific question, but nowadays, the standard answer concerning graphics seems to be: Use TikZ. See TeXample.net for some 3d examples.

3
  • Thanks. I do know of TikZ, and do use it occasionally. However, it is a 2D package: it cannot render surfaces other than balls, one needs to calcule all the projections by hand, etc.
    – Boris Bukh
    Commented Oct 30, 2010 at 10:48
  • 1
    @Boris: whilst I agree that TikZ has some severe limitations for drawing 3D pictures, calculating the projections by hand is not one of them. You can specify coordinates in 3D and draw some very obviously 3D pictures - take a look at my contributions on texample.net to see some, or look at the "how to draw a torus" question on this site. Commented Oct 30, 2010 at 11:05
  • @Andrew: Your example of "smooth map" at texample.net is really cool!
    – Boris Bukh
    Commented Oct 30, 2010 at 11:44
7

Please, consider also the more elaborated package for 3D called pst-solides3d offering perspective features. I also recommand to visit syracuse for more examples [website in French]

7

the task to draw "a sequence of points joined by line segments" or occasionally a surface (rendered with a colormap or a shading) can be realized by means of pgfplots. Perhaps the examples in the manual (available on the sourceforge link below) or directly on the webpage http://pgfplots.sourceforge.net/ can be used to decide if it does what you want, it is quite powerful.

Best regards

Christian

2
  • Very nice package! I'll put that high up on my "to look at" list. Commented Oct 30, 2010 at 17:35
  • This looks very good!
    – Boris Bukh
    Commented Oct 30, 2010 at 19:01
6

I wonder why nobody has mentioned pst-3dplot or tikZ-3dplot so far. The tikZ Example Gallery for 3D objects contains some interesting examples (e. g. »Seismic focal mechanism«, »Spherical polar plots«, …).

2
  • Thanks, a lot. Since I already know TikZ, learning tikz-3dplot would be relatively easy.
    – Boris Bukh
    Commented Oct 30, 2010 at 12:23
  • I did post the link to the 3d example gallery in my answer ... Commented Oct 30, 2010 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .