次のコードを考えてみましょう。
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\psset{viewpoint = 15 -30 11, Decran = 10}
\begin{pspicture}[solidmemory](-8.25,-1)(5.3,2.05)
\psSolid[object = point, args = 15.5 3 7.3, name = L]
\psSolid[object = point, args = -55 2 3.5, name = R]
\psSolid[object = line, linecolor = red!50, linestyle = dashed, linewidth = 2pt, args = R L]
\psSolid[object = parallelepiped, a = 6.0, b = 6.0, c = 6.5, RotZ = -15, fillcolor = blue!50, name = parallelepipedum, action = draw*](0 0 1.5)
\multido{\iA = 0+1}{8}{%
\psSolid[object = point, linecolor = black, definition = solidgetsommet, args = parallelepipedum \iA, name = C\iA]
\psset{object = line, linecolor = darkgray!50, linestyle = dotted}
\psSolid[args = L C\iA]
\psSolid[args = R C\iA]
}
\psSolid[object = parallelepiped, a = 6.0, b = 6.0, c = 6.5, RotZ = -15, name = parallelipipidum, action = draw](0 0 1.5)
\multido{\iB = 0+1}{4}{%
\psSolid[object = point, definition = solidgetsommet, args = parallelipipidum \iB, name = Top\iB, action = none]
}
\psSolid[object = line, args = Top0 Top2]
\psSolid[object = line, args = Top1 Top3]
\psSolid[object = point, definition = solidcentreface, args = parallelipipidum 0]
\end{pspicture}
\end{document}
破線の灰色の線の各ペアが互いにぴったり重なるようにパラメータを微調整するのを手伝ってくれる人はいませんか。
長い間試してきましたが、わかりません。:(
問題のパラメータはargs = 15.5 3 7.3
、、、args = -55 2 3.5
およびであることを指摘しておく必要があります。( 、、、およびa = 6.0, b = 6.0, c = 6.5, RotZ = -15
の値は、2 つのオブジェクトで同じである必要があります。)a
b
c
RotZ
答え1
- 地面と平行な線の消失点は目の高さにあるため、オブジェクト
z
の位置はの値point
と等しくする必要があります。z
viewpoint
- 水平角を指す線の消失点は
theta
にありますx=tan(theta)*yv + xv
。ここでyv
、および は のおよび成分xv
です。x
y
viewpoint
- 消失点は地平線上にあり、その位置は です
y=0
。
したがって、 の視点15 -30 11
と の直方体の回転に対して-15 degrees
、消失点は23.04 0 11
とにあります-96.96 0 11
。
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\psset{viewpoint = 15 -30 11, Decran = 6}
\begin{pspicture}[solidmemory](-8.25,-1)(5.3,2.05)
\psSolid[object = point, args = 23.04 0 11, name = L]
\psSolid[object = point, args = -96.96 0 11, name = R]
\psSolid[object = line, linecolor = red!50, linestyle = dashed, linewidth = 2pt, args = R L]
\psSolid[object = parallelepiped, a = 8.0, b = 8.0, c = 8.5, RotZ = -15, fillcolor = blue!50, name = parallelepipedum, action = draw*](0 0 1.5)
\multido{\iA = 0+1}{8}{%
\psSolid[object = point, linecolor = black, definition = solidgetsommet, args = parallelepipedum \iA, name = C\iA]
\psset{object = line, linecolor = darkgray!50, linestyle = dotted}
\psSolid[args = L C\iA]
\psSolid[args = R C\iA]
}
\psSolid[object = parallelepiped, a = 8.0, b = 8.0, c = 8.5, RotZ = -15, name = parallelipipidum, action = draw](0 0 1.5)
\multido{\iB = 0+1}{4}{%
\psSolid[object = point, definition = solidgetsommet, args = parallelipipidum \iB, name = Top\iB, action = none]
}
\psSolid[object = line, args = Top0 Top2]
\psSolid[object = line, args = Top1 Top3]
\psSolid[object = point, definition = solidcentreface, args = parallelipipidum 0]
\end{pspicture}
\end{document}