[pstricks] Re : Fwd: PSTricks tip about 3D Rotation

Manuel Luque mluque5130 at aol.com
Thu Jun 9 12:55:52 CEST 2011


 I propose another method:

1) create an object in. obj or off.

\documentclass{article}
\usepackage{pst-solides3d}

\begin{document}
 \begin{pspicture}(-6,-8)(7,8)
 \psset{RotZ=60,viewpoint=70 40 30,Decran=50}
 \psSurface[ngrid=.25 .25,incolor=yellow,
     linewidth=0.5\pslinewidth,
     algebraic,hue=0 1,
     file=selle,
     action=writeobj](-4,-4)(4,4){%
    ((y^2)-(x^2))/4 }
 \end{pspicture}
\end{document}

2) Create a file. u3d with MeshLab :

http://meshlab.sourceforge.net/

Export Mesh As (u3d)


3) Create a pdf file with pdflatex

\documentclass{article}
\usepackage[3D]{movie15}
\usepackage{hyperref}
\begin{document}
\includemovie[
    poster,
    toolbar, %same as `controls'
    label=selle.u3d,
    text=(selle.u3d),
    3Daac=60.000000, 
        3Droll=0.000000, 
        3Dc2c=0.000000 -17.400000 0.000000, 
        3Droo=17.400000, 
        3Dcoo=-0.000000 0.000000 0.000000,
        3Dlights=CAD]{\linewidth}{\linewidth}{selle.u3d}
\end{document}

4) Use Acrobat Reader version 10

 


 

 Manuel


-----E-mail d'origine-----
De : Herbert Voss <Herbert.Voss at FU-Berlin.DE>
A : Graphics with PSTricks <pstricks at tug.org>
Envoyé le : Mercredi, 8 Juin 2011 8:32
Sujet : [pstricks] Fwd: PSTricks tip about 3D Rotation


-------- Original-Nachricht --------
Betreff: PSTricks tip about 3D Rotation
Datum: Tue, 7 Jun 2011 09:34:28 -0300
Von: Pedro Sacramento <pedro.sacramento at gmail.com>
An: pedro sacramento <pedro.sacramento at gmail.com>

Hello,

I'm a new *pst-solides3d* user and I've been trying to use it to make an
interactive 3D geometry like the sample above (the attached zip has the
complete set of images too, if you want to see):
http://www.yofla.com/flash/3d-rotate/classic/examples.php?exampleId=1

I'll be really thankfull if you can help me with a tip about manipulating
the geometry in 3D space, I still wasn't able to figure it out, even though
I'm making many tests with the manual.

And my question is:  *I already know how to rotate the 3D object around Z.
But how can I move the camera from the top to the bottom of the image,
always looking to the origin of the graph and keeping constant distance from
the origin? I believe that a multido procedure can easily tackle it, to
generate all the 272 images.*

  \begin{pspicture}[RotX=*0*,RotY=*0*,RotZ=*$z*](-6,-8)(7,8)
  \psSurface[ngrid=.25 .25,incolor=yellow,
  linewidth=0.5\pslinewidth,
  algebraic,hue=0 1](-4,-4)(4,4){%
  ((y^2)-(x^2))/4 }
  \end{pspicture}

Best regards and thaks a lot,

*P.S.: As far as I can see, It's basically a 16x17 matrix of images where Z
rotation increases 22,5º (360º/16 steps) degrees as j increases. Also the
camera moves downwards as i increases (always looking to the origin of the
graph). It must start looking the object from the top and then move down
until looking to the bottom of it. The camera keeps in constant distance
from origin while moving from top to bottom))*

-- 
Pedro Sacramento
Mestrando em Ciência da Computação - UFV
--
# Arquiteto e urbanista
# Técnico em Informática Industrial
# CREA - MG 123885LP
--
# ETEV - Escola Técnica de Viçosa
# www.etev.com.br | (31) 3891-0404
--
Respondeu-lhe Jesus: Eu sou o caminho, e a verdade, e a vida; ninguém vem ao
Pai, senão por mim. (João 14:6)


 
_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20110609/8803cf42/attachment.html>


More information about the PSTricks mailing list