PSTricks solides3d 视角

PSTricks solides3d 视角

图像不方形,我该如何修复?

\documentclass[pstricks,12pt]{standalone}
%\usepackage{pgf,tikz,pgfplots}
%\pgfplotsset{compat=1.15}
\usepackage{pst-solides3d,pst-3dplot}
\usepackage{xcolor}
\pagestyle{empty}
\begin{document}
\psset{arrowlength=3,arrowinset=0,viewpoint=50 30 10 rtp2xyz,Decran=50,
       lightsrc=viewpoint,solidmemory}
\begin{pspicture}(-7,-8)(7,8)
%\axesIIID[linecolor=gray](-7,-7,-7)(7,7,7)
\gridIIID[Zmin=0,Zmax=10,spotX=r](-7,7)(-7,7)
\psSolid[object=grille,base=-7 7 -7 7,
        linewidth=0.4pt,linecolor=gray!50,action=draw]%(0,0,z)
{\psset{object=courbe,r=0,linecolor=blue,resolution=360,function=Fxy}
\multido{\rA=0.0+1.0}{3}{%
  \defFunction[algebraic]{Fxy}(x){x}{7}{x^2+(\rA)^2}
  \psSolid[range=-2 2]}
\multido{\rA=0.0+1.0}{3}{%
  \defFunction[algebraic]{Fxy}(y){7}{y}{(\rA)^2+y^2}
  \psSolid[range=-2 2]}}
\psSolid[object=point,args=3 3 0]
\psSurface[ngrid=.10 .10,fillcolor=gray!30,incolor=magenta!30,
  linewidth=0.4pt,algebraic,lightintensity=8,resolution=360,
  %opacity=0.3
  ](-2,-2)(2,2){x^2+y^2}
%\defFunction[algebraic]{helice}(t){3*cos(4*t)}{3*sin(4*t)}{t}
%\psSolid[object=courbe,r=0,range=0 6,linecolor=blue,linewidth=0.1,resolution=360,function=helice]
%\defFunction{CosRad}(t){t 2 mul Cos 4 mul}{t}{0}
\defFunction[algebraic]{CosRad}(t){t}{sin(t)}{0}
\psSolid[object=courbe,linewidth=0.1,r=0,linecolor=red,resolution=360,function=CosRad,range=0 6.28]
\psPoint(3,3,0){p}
 \uput[r](p){$(3;3;0)$}
%\psPoint(3,3,0){p}
\end{pspicture}
\end{document}

在此处输入图片描述

答案1

例如使用Decran=30,...或改变距离viewpoint=...

\documentclass[pstricks,12pt]{standalone}
\usepackage{pst-solides3d,pst-3dplot}
\usepackage{xcolor}
\pagestyle{empty}
\begin{document}
\psset{arrowlength=3,arrowinset=0,viewpoint=50 30 10 rtp2xyz,Decran=30,
       lightsrc=viewpoint,solidmemory}
\begin{pspicture}(-7,-2)(7,8.5)
\psSolid[object=grille,base=-7 7 -7 7,
        linewidth=0.4pt,linecolor=gray!50,action=draw]%(0,0,z)
{\psset{object=courbe,r=0,linecolor=blue,resolution=360,function=Fxy}
\multido{\rA=0.0+1.0}{3}{%
  \defFunction[algebraic]{Fxy}(x){x}{7}{x^2+(\rA)^2}
  \psSolid[range=-2 2]}
\multido{\rA=0.0+1.0}{3}{%
  \defFunction[algebraic]{Fxy}(y){7}{y}{(\rA)^2+y^2}
  \psSolid[range=-2 2]}}
\psSolid[object=point,args=3 3 0]
\psSurface[ngrid=.10 .10,fillcolor=gray!30,incolor=magenta!30,
  linewidth=0.4pt,algebraic,lightintensity=8,resolution=360,
  ](-2,-2)(2,2){x^2+y^2}
\defFunction[algebraic]{CosRad}(t){t}{sin(t)}{0}
\psSolid[object=courbe,linewidth=0.1,r=0,linecolor=red,resolution=360,function=CosRad,range=0 6.28]
\psPoint(3,3,0){p}
\uput[r](p){$(3;3;0)$}
\gridIIID[Zmin=0,Zmax=10,spotX=r](-7,7)(-7,7)
\end{pspicture}
\end{document}

在此处输入图片描述

相关内容