6

I would like to reproduce the following image, but in addition labelled with "Wheelbase $w$" and "Track $t$".

enter image description here

(Wikipedia image source)

I've tried my best with pst-solides3d, but the result is much worse (and I didn't even try to write text by now):

enter image description here

(source is here)

There seems not to be any possibility to get this with TikZ (see e.g. this question - I don't want to have to think about how a 3D model can be created by only using 2d graphics).

I would like to know a convenient way to create 3D images that describe geometric situations. So I need basic geometric objects (cylinders, cuboids, spheres, cones), an easy way to change the viewpoint, arrows, text that can be placed in 3d (like in the first image) and - if possible - a way to write variables like in LaTeX.

I thought about using Blender or POV-Ray, but both seem to be quite complicated to use and I do not know where to start / ask questions when I'm stuck with one of them. I also don't know how to write variables like in LaTeX.

My Question

Do you know either a way to get a similar result with pst-solides3d or any other LaTeX package to the first image?

If not, do you know if Blender / POV-Ray or any other software is

  • able to create 3d models (are they called wire-frame models?),
  • free (not necessarily open source, but I would prefer it),
  • available for Linux,
  • able to create PDF / SVG / TEX files,
  • has a good documentation and
  • a forum (preferably a StackExchange site) where I can ask questions when I don't know how to continue?
  • The vector requirement is a killer. If you'd forego that, I would recommend OpenSCAD: openscad.org --- there was a recent bit on the mailing list/forum about text being added. Asymptote does have a CAD module, and may be workable though: artofproblemsolving.com/Wiki/index.php/… – WillAdams Nov 4 '13 at 13:13
  • As long as you don't need to hide surfaces, Tikz can do it fairly easily, but you will probably need to create your own library of 3d shapes (unless someone else has already done a few). Start on page 571 of the Tikz manual so set up a 3D coordinates system. – John Kormylo Nov 4 '13 at 21:55
  • See Draw an aircraft with Tikz. – Werner Nov 4 '13 at 22:25
10

Have a look at Asymptote. It's very powerful for 3D graphics and can be embedded into Latex.

\documentclass{standalone}
\usepackage{asymptote}

\begin{document}

\begin{asy}[width=10cm,height=10cm]

import solids;
import labelpath3;

// Set page size
size(0,150);

// Lighting
currentlight=Viewport;

real wi = 4;
real le = 4;

material m = material(grey, yellow, black, orange);

triple[] wheels = {(-le/2,-wi/2,0),
           (-le/2,wi/2,0),
           (le/2,-wi/2,0),
           (le/2,wi/2,0) };

// lines
draw((-le/2,wi/2,0)--(-le/2,wi,0));
draw((le/2,wi/2,0)--(le/2,wi,0));

// wheels
for(triple p : wheels) {
  draw(shift(p)*rotate(90,(1,0,0))*
       scale(1,1,0.2)*shift((0,0,-0.5))*unitcylinder,m);
  draw(shift(p)*rotate(90,(1,0,0))*
       shift((0,0,-0.1))*unitdisk,m);
  draw(shift(p)*rotate(90,(1,0,0))*
       shift((0,0,0.1))*unitdisk,m);

}

// axes
draw(shift(-le/2,0,0)*rotate(90,(1,0,0))*
     scale(0.1,0.1,wi)*shift((0,0,-0.5))*unitcylinder,m);
draw(shift(le/2,0,0)*rotate(90,(1,0,0))*
     scale(0.1,0.1,wi)*shift((0,0,-0.5))*unitcylinder,m);

// box
draw(scale(5,1,1)*shift(-0.5,-0.5,-0.5)*unitcube,m);

draw((-le/2,0.9*wi,0)--(le/2,0.9*wi,0),Arrows3);
draw(scale(0.8,1,1)*labelpath("wheelbase $w$",(le/2,wi,0)--(-le/2,wi,0)));

\end{asy}


\end{document}

Here's the result:

enter image description here

  • Why you don't try pov-ray ? – Haouam Jun 4 '15 at 21:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.