1

I want to use an eps file in a pst-solides3d environment, e.g. like in the code below

\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d} 
\begin{document}
\psset{Decran=20}
\begin{pspicture}(-5,-5)(5,5)
\psset{solidmemory}
\psSolid[object=cube, name=OBJECT]%
\psImage[file=tiger.eps,normal=OBJECT 4 solidnormaleface, origine=OBJECT 4 solidcentreface]
\end{pspicture}
\end{document}  

The documentation says on page 168 that "the eps image must be prepared according to the method described in the documentation for ‘pst-anamorphosis’ ". Although my French is quite good, I could not find anything about it in that document. Furthermore, I have read in this answer that the eps image has to have "only basic line elements, like lineto curveto and moveto".

Can anyone tell me how to create such an eps from an existing SVG file? I would prefer to work directly with Inkscape or another freely available program.

For testing I created a simple rectangle in Inkscape and saved it as an eps-file. When compiling I don't get any error or warning. It just produces a blank page. When I use the "tiger.eps" from the author's homepage, it works just fine and produces the desired result.

2
  • does the svg you have fail if so what error do you get? an eps could for example just be a thin wrapper around an image bitmap not really scalable at all, that would be a problem for pstricks to interpret, but you wouldn't expect such a thing from svg. – David Carlisle Jan 24 '20 at 15:16
  • @DavidCarlisle Actually I don't get any error or warning. It just produces a blank page. When I use the "tiger.eps" that they provide at their homepage, it works just fine. – Nico Jan 24 '20 at 15:24
2
+50

You need a "flattened" EPS file, which can be generated using the pstoedit tool.

pstoedit -f psf rectangle.eps rectangle-flat.eps
1
  • Thank you for your answer, that helped. I figured out, that the eps file can also be created with -f ps flag, so that curves are also allowed. Furthermore the -rgb flag is helpful. In my opinion the tool "pstoedit" should definitively be mentioned in the documentation of pst-solides3d! – Nico Jan 29 '20 at 14:32

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.