# [pstricks] question about pst-solides3d: projection on a plane

Herbert Voss Herbert.Voss at FU-Berlin.DE
Mon May 28 20:01:54 CEST 2012

Am 28.05.2012 11:30, schrieb Clemens Schäfermeier:
> i can't see why it is possible to project the xsin function to the first
> plane "monplane1" but it isn't to do this projection with ysin on
> "monplane2". any hint is greatly appreciated!
>
> %%%%
> \documentclass[a4paper]{article}
> \usepackage{pstricks,pst-solides3d}

you also need package pst-math . However, a better choice is

\defFunction[algebraic]{ysin}(y){}{sin(x)}{}

There is nothing to project on the plane [0 1 0 0]. Use
another plane or change the viewpoint:

\documentclass[a4paper]{article}
\usepackage{pst-solides3d,pst-math}
\begin{document}

\psset{unit=1cm,viewpoint=20 60 20 rtp2xyz,lightsrc=28 55 25
rtp2xyz,Decran=20}

\begin{pspicture}[showgrid=false,solidmemory](-5,-5)(5,4)
\defFunction[]{ysin}(y){}{y SIN}{}

\psSolid[object=plan,definition=equation,
args={[1 1 1 0] -22.5},name=monplane2]
\psProjection[object=courbe,plan=monplane2,linecolor=green,range=-3 3,
resolution=720,function=ysin]

\end{pspicture}

\end{document}

Herbert