108我的作品中有这段代码,用来形象化莫比乌斯带。
\begin{pspicture}(-4.2,-3.7)(5.1,3)
\psset{unit=1.5}
\psset[pst-solides3d]{viewpoint=20 10 10, Decran=40, lightsrc=20 10 35}
\defFunction{mobius}(u,v)
{2 u v Cos mul add 2 v mul Cos mul}
{2 u v Cos mul add 2 v mul Sin mul}
{u v Sin mul}
\psSolid[object=surfaceparametree,linewidth=0.1\pslinewidth,
base=-0.5 0.5 0 pi,fillcolor=white!50,incolor=white!50,
function=mobius,
ngrid=3 30, show = 15 108]%
\psSolid[object=line, linecolor=red, linewidth=0.5\pslinewidth, args=-0.62 0.62 -0.05 -0.62 0.62 1.3]
\end{pspicture}
我喜欢改变一条垂直网格线(条带宽度的网格线)的颜色和粗细,并用符号标记它。我做了一些基本的努力,找到了其中一条(show = 15 108),并在其上画了一条红线,方法是
\psSolid[object=line, linecolor=red, linewidth=0.5\pslinewidth, args=-0.62 0.62 -0.05 -0.62 0.62 1.3]
虽然该线与网格线重合,但其粗细完全不会改变。我也无法在上面放置任何文字(希腊语、数学等)或标签。
我学习了整个 pst-solides3d:文档 - 基础知识。感谢任何提示。
答案1
[show = all] 标识所有顶点。我猜您使用 [action = writesolid] 选项获取文件“mobius-sommets.dat”中两个顶点 15 和 108 的坐标,然后您计算出这条线上 2 个点的坐标?
这是划清界限的方法。这并不容易!
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psset{unit=1.5,solidmemory}
\psset[pst-solides3d]{viewpoint=20 10 10, Decran=40, lightsrc=20 10 35}
\defFunction{mobius}(u,v)
{2 u v Cos mul add 2 v mul Cos mul}
{2 u v Cos mul add 2 v mul Sin mul}
{u v Sin mul}
\psSolid[object=surfaceparametree,linewidth=0.1\pslinewidth,
base=-0.5 0.5 0 pi,fillcolor=white!50,incolor=white!50,
function=mobius,name=Mobius,% action=writesolid,file=mobius,
ngrid=3 30] % , show = 15 108]%
\codejps{Mobius 15 solidgetsommet /point1 defpoint3d
Mobius 108 solidgetsommet /point2 defpoint3d
3 setlinewidth}% line width
\psSolid[object=line,linecolor=red,args=point1 point2]%
\pstVerb{%
% point1 point2
-2.0 0.0 -0.5 -2.0 0.0 0.5 -1 mulv3d addv3d normalize3d /u1 defpoint3d
/K 0.5 def
-2.0 0.0 -0.5 u1 K mulv3d addv3d /AA1 defpoint3d
/xyA1 {AA1 3dto2d} def
-2.0 0.0 0.5 u1 K neg mulv3d addv3d /AA2 defpoint3d
/xyA2 {AA2 3dto2d} def}%
\psPoint(-2.0,0.0,-0.5){A1}
\psPoint(-2.0,0.0,0.5){A2}
\uput[dr](A1){\red$A_1$}
\uput[ur](A2){\red$A_2$}
\uput[d](!xyA1){\red$A'_1$}
\psdot(!xyA1)
\uput[u](!xyA2){\red$A'_2$}
\psdot(!xyA2)
\psline[linecolor=red](!xyA2)(A2)
\psline[linecolor=red](!xyA1)(A1)
\end{pspicture}
\end{center}
\end{document}