[pstricks] A little help please . . .

Scott, Randy Scott_Randy at sccollege.edu
Sat Dec 26 17:42:10 CET 2015


Good Day-After-Christmas Morning!


I'm working on some examples to help my students visualize the relationship between the 2D coordinates they are familiar with and 3D coordinates. This is my first try with PSTricks 3D macros.


In the example I've attached, the first diagram shows a region S in the xy-plane. The second diagram shows this region in the standard 3D view. I want the S and its arrow from the first diagram to maintain their spatial relationship with the region in the second diagram. In the second diagram, I've got the S doing what I want, but cannot seem to get the \nccurve to lie in the xy-plane.


I apologize if my description is not clear, and thank you for any help that you can offer.


Sincerely,


Randy Scott

Professor, Mathematics

Santiago Canyon College


\documentclass[pstricks]{article}

\usepackage{pstricks, pst-plot, pst-3d, pst-3dplot} % everything pstricks


\begin{document}


\fbox{%

\psset{xunit=1.5cm, yunit=1.5cm}

        \begin{pspicture}(-0.5,-0.5)(1.5, 1.5)

                \renewcommand\pshlabel[1]{\scriptsize #1}

                \renewcommand\psvlabel[1]{\scriptsize #1}

                \psset{algebraic, plotpoints=200}

                \pscustom[fillstyle=solid,fillcolor=lightgray,opacity=0.2]{%

                                \psplot{0}{1}{1-x}

                                \psplot{1}{0}{0}

                                \psline(0,0)(0,1)

                        }

                \psplot{0}{1}{1-x}

                \psaxes[ticksize=2pt, labelsep=2pt]{->}(0,0)(-0.25,-0.25)(1.25,1.25)[\footnotesize $x$,0][\footnotesize $y$,0]

                \rput(0.9,0.4){\rnode{A1}{$S$}}

                \rput(0.5,0.2){\rnode{A2}{\null}}

                \nccurve[angleA=-110, nodesep=2pt]{->}{A1}{A2}

                \pspolygon[linewidth=0.75pt, linecolor=red, fillstyle=solid, fillcolor=red, opacity=0.2](0,0.6)(0.35,0.6)(0.35,0.7)(0,0.7)

                \psdot[dotsize=2pt](0,0.65)

                \rput[r](-0.05,.65){\small $y$}

        \end{pspicture}

}



\fbox{%

        \begin{pspicture}(-3,-1.5)(3,2.5)

                \psset{xunit=2cm, yunit=2cm}

                \psset{xMin=0, xMax=1.5, yMin=0, yMax=1.5, zMin=0, zMax=1}

                \pscustom[fillstyle=solid,fillcolor=lightgray,opacity=0.2]{%

                                \pstThreeDLine(0,0,0)(1,0,0)

                                \pstThreeDLine(1,0,0)(0,1,0)

                                \pstThreeDLine(0,1,0)(0,0,0)

                        }

                \pstThreeDCoor[linecolor=black]

                \pstThreeDSquare[linecolor=red, fillstyle=solid, fillcolor=red, opacity=0.2](0,0.6,0)(0.35,0,0)(0,0.1,0)

                \pstPlanePut[plane=xy](0.9,0.4,0){\pstThreeDNode(0.9,0.4,0){A1}{$S$}}

                \pstPlanePut[plane=xy](0.5,0.2,0){\pstThreeDNode(0.5,0.2,0){A2}{\null}}

                \nccurve[nodesep=2pt]{->}{A1}{A2}

                \pstThreeDDot[linecolor=red](0.5,0.2,0)

                \end{pspicture}

}


\end{document}




More information about the PSTricks mailing list