Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to create a drawing on isometric drawing paper like the following:

isometric-paper

N.B. Forget the drawing on top of the paper; it is just something I found in order to illustrate the type of paper I would like to have.

On the blank isometric paper, I would like to draw the following simple sketch of a house:

house

Update

Thanks to Herbert's answer, I created the following (which is the house from another angle):

% latex test.tex
% dvips test.dvi
% ps2pdf test.ps

\documentclass{article}

\usepackage{pstricks-add}

\begin{document}

\begin{figure}
\SpecialCoor
\begin{pspicture*}(-0.5,-2)(11,10)
\pstVerb{gsave [0.8660254 0.5 0 1 0 -400] concat}
{\psset{linewidth=0.3pt,linecolor=black!30}
  \multido{\iA=-0+1,\iB=-10+1,\iC=-15+1}{25}{%
    \psline(\iA,-4)(\iA,20)
    \psline(-5,\iB)(20,\iB)
    \rput(0,\iC){\psline(0,0)(!\iA\space abs dup add dup)}}}
\psset{linewidth=2pt}
\pspolygon(7,2)(7,6)(10,9)(10,5)
\pspolygon(0,2)(0,6)(7,6)(7,2)
\pspolygon(0,6)(1.5,9.5)(8.5,9.5)(7,6)
\psline(10,9)(8.5,9.5)
\psset{linestyle=dashed}
\pspolygon(3,5)(3,9)(10,9)(10,5)
\pspolygon(0,6)(3,9)(3,5)(0,2)
\psline(3,9)(1.5,9.5)
\pstVerb{grestore}
\end{pspicture*}
\caption{foo}
\end{figure}

\end{document}

house

Update 2

To get better corners of the house, use linejoin = 2;

\documentclass{article}

\usepackage{pstricks-add}

\begin{document}

\begin{figure}
\centering
 \psset{linejoin = 2}
 \SpecialCoor
  \begin{pspicture*}(-0.5,-2.3)(10,8.5)
    \pstVerb{gsave [0.8660254 0.5 0 1 0 -400] concat}
   {\psset{linewidth = 0.3pt, linecolor = black!50}
     \multido{\iA = 0+1}{25}{%
       \psline(\iA,-4)(\iA,20)
       \psline(!-5 \iA\space 10 sub)(!20 \iA\space 10 sub)
       \rput(!0 \iA\space 15 sub){\psline(0,0)(!\iA\space abs dup add dup)}
     }
   }
   \psset{linewidth = 2pt}
    \pspolygon(8,2)(8,6)(11,9)(11,5)
    \pspolygon(1,2)(1,6)(8,6)(8,2)
    \pspolygon(1,6)(2.5,9.5)(9.5,9.5)(8,6)
    \psline(11,9)(9.5,9.5)
   \psset{linestyle = dashed}
    \pspolygon(4,5)(4,9)(11,9)(11,5)
    \pspolygon(1,6)(4,9)(4,5)(1,2)
    \psline(4,9)(2.5,9.5)
    \pstVerb{grestore}
  \end{pspicture*}
\end{figure}

\end{document}

house

share|improve this question
    
One can easily draw 3D objects in pstricks using pst-solides3d. However, using isometric paper like the above would not work with true 3D objects, since the projection would not coincide with the 2D guidelines. So, either fake 3D (naturally, 2D) on isometric paper, or true 3D. That's what I'm thinking. –  Werner May 14 '13 at 18:06
    
@Werner I think a fake 3D is what I'm after, but I don't know how to draw the actual isometri paper. :( The house itself should no be too difficult (I think). –  Svend Tveskæg May 14 '13 at 18:08
    
@SvendTveskæg: in your edit the roof is not symmetrical, it is 1 to 2 and not 1.5 on each side –  Herbert May 15 '13 at 13:36
    
@Herbert Good point; thank you. Is it correct after the edit? –  Svend Tveskæg May 15 '13 at 16:55
    
yes, it is ok now –  Herbert May 15 '13 at 18:05
add comment

1 Answer

up vote 15 down vote accepted
\documentclass{article}
\usepackage{pst-3dplot}
\begin{document}

\psset{coorType=1,Alpha=30}% type 1 for orhtogonal x-z-axes
\begin{pspicture}(-2,-3)(3,3)
\pstThreeDCoor[IIIDticks,zMax=6,yMax=1]
\pstThreeDLine(0,0,0)(3,0,0)(3,0,4)(0,0,4)(0,0,0)
\pstThreeDLine(3,0,4)(1.5,0,6)(0,0,4)
\end{pspicture}

\end{document}

enter image description here

the isometric lines are simple lines in the plane. However, you can use the transformation matrix and set the values so that all lines in a 2d coordinate system are isometric.

\documentclass{article}
\usepackage{pstricks,multido}\SpecialCoor
\begin{document}

\begin{figure}
\begin{pspicture*}(-0.5,-2)(11,10)
\pstVerb{ gsave [1 0.5 0 1 0 -400] concat }
{\psset{linewidth=0.3pt,linecolor=black!30}
\multido{\iA=-0+1,\iB=-10+1,\iC=-15+1}{25}{
  \psline(\iA,-4)(\iA,20)
  \psline(-5,\iB)(20,\iB)
  \rput(0,\iC){\psline(0,0)(!\iA\space abs dup add dup )}}}
\psset{linewidth=2pt}
\pspolygon(0,0)(0,4)(3,4)(3,0)
\psline(0,4)(1.5,6)(3,4)
\psline(3,0)(10,7)(10,11)(3,4)% see isometric grid for the coordinates
\psline(1.5,6)(8.5,13)(10,11)
\pstVerb{grestore }
\end{pspicture*}
\caption{foo}
\end{figure}

\end{document}

enter image description here

Look into a PostScript documentation for the meaning of the transformation matrix. It is the same as the one in PDF.

share|improve this answer
    
This is nice, Herbert. However, I would like to have the isometric paper, i.e., the 2D triangles, too. –  Svend Tveskæg May 14 '13 at 18:34
    
Thanks a lot. Two questions: (1) Can I somehow use pdflatex if loading auto-pst-pdf? (As it is now, the lines are placed wrong if I do this.) (2) The house is not 4 units high, but something like 3½ units; how do I correct this? –  Svend Tveskæg May 14 '13 at 19:25
3  
I know, it is only a way how it could be done. The distance outside of the matrix is the default unit, you can correct it. I have no idea why pdflatex fails. –  Herbert May 14 '13 at 19:28
3  
see my edited answer –  Herbert May 15 '13 at 5:39
3  
see edit. We have to save the current graphic state and restore it at the end of the pspicture environment –  Herbert May 15 '13 at 6:52
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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