2

An example in 3d-plot.pdf

\documentclass[12pt,pstricks,border=5pt]{standalone}

\usepackage{pst-3dplot}
\begin{document}

\begin{pspicture}(-5,-3)(4,6)
\psset{Beta=60}
\pstThreeDCoor[zMax=9]
\psCylinder[RotX=10,increment=5]{3}{5}
\pstThreeDLine[linecolor=red](0,0,0)(0,0,8.5)
\end{pspicture}
\end{document} 

It produces:

enter image description here

An example of Asymptote:

enter image description here

Question:

Can PStricks do it? ... !

12
  • 2
    These interactive 3D objects are Adobe PRC files that only Asymptote (as an open-source software) is able to write. They are embedded into PDF using the media9 LaTeX package under the hood. Only Acrobat (Reader) is currently able to render them as embedded objects in a PDF file.
    – AlexG
    Dec 17, 2018 at 16:10
  • @AlexG I like more PStricks than and hope in the future, these interactive 3D will be embedded into PStricks..... Because Asymptote is too difficult that I can not understand it. Sob.
    – user173875
    Dec 17, 2018 at 16:19
  • 1
    @herbert : I guess OP means interactivity.
    – AlexG
    Dec 17, 2018 at 16:32
  • 1
    Rotating as a 3d Object (as Aleander already mentioned) is not possible, but as a simple animation rotation it s no problem.
    – user2478
    Dec 17, 2018 at 16:40
  • 1
    @chishimotoji: run texdoc animate (the package from Alexander) or see tug.org/PSTricks/main.cgi?file=Animation/gif/gif
    – user2478
    Dec 17, 2018 at 17:20

1 Answer 1

3

These interactive 3D objects are Adobe PRC files that only Asymptote (as an open-source software) is able to write. They are embedded into PDF using the media9 LaTeX package under the hood. Only Acrobat (Reader) is currently able to render them as embedded objects in a PDF file.

As PRC is a binary format, it is difficult to write it from within a PostScript program. With PSTricks, it is possible to prepare frame-based animations as standalone (GIF, SVG) files or embedded into PDF.

Click on the image to load the animated SVG. Chrome, Chromium or other Blink-based browser required, as Firefox is too slow:

%\documentclass[12pt,border=5pt]{standalone}   % PDF animation in A-Reader
%\documentclass[12pt,pstricks,border=5pt,export]{standalone}  % for export to animated GIF
\documentclass[dvisvgm]{article} %animated SVG
\usepackage{animate}
\pagestyle{empty}

\usepackage{pst-3dplot}

\begin{document}
\frame{\begin{animateinline}[controls]{24}
  \multiframe{72}{iAng=0+5}{
    \begin{pspicture}(-4.9,-3.6)(4.6,6)
    \psset{Alpha=\iAng,Beta=60}
    \pstThreeDCoor[zMax=9]
    \psCylinder[RotX=10,increment=5]{3}{5}
    \pstThreeDLine[linecolor=red](0,0,0)(0,0,8.5)
    \end{pspicture}
  }
\end{animateinline}}

\end{document}
10
  • What do you mean with consecutive?
    – AlexG
    Dec 17, 2018 at 17:33
  • use the correct button!
    – user2478
    Dec 17, 2018 at 17:38
  • Sorry, I misunderstood of gif. I want it seems gif INTO PDF. How to do that?
    – user173875
    Dec 17, 2018 at 17:41
  • 1
    Uncomment 1st line, comment out the 3rd. But is not GIF, it is better ;-). But you need A-Reader to view the PDF.
    – AlexG
    Dec 17, 2018 at 17:43
  • Hi, can your answer be used \multido to replace \multiframe ? If it works , please give me its code!
    – user173875
    Dec 20, 2018 at 4:15

You must log in to answer this question.