the first one is quite simple and I suppose you can get the secong yourself with the help from the code of the first example:svend_tveskaeg wrote:Hi again, Herbert.
I am starting to confuse myself.![]()
Is there any chance that I can get you to
(1) create the to figures in the attached pictures for me, and
(2) take a look at my attempt to understand your example and comment on it?
Ad (1): I tend to learn something like this better by studying examples.
Ad (2): I would really like to understand your example.
A mixture of examples, explanations, and my own attemps often seem to be the best approach for me.
P.S. The two figures are created using the same ugly approach as in the initial approach to creating the triangle with the hexagon on top.
Code: Select all
\documentclass{article}
\usepackage{pst-eucl}
\begin{document}
\def\valA{4 }% space at the end!
\def\valK{1.75 }% space at the end!
\psset{unit=1.5,offset=-12pt}
\begin{pspicture}(-0.2,0)(\valA,\valA)
\pstGeonode[CurveType=polygon,PointName=,
PointSymbol=none](0,0){A}(\valA,0){B}(\valA,\valA){C}(0,\valA){D}
\pnode(!\valA % horizontal distance value
dup \valK sub % a-k = 2x
2 div % a-k/2=x
){b1}
\pnode(!\psGetNodeCenter{b1} b1.x b1.y \valK add){b2}
\psdots(b1)(b2)\uput[180](b1){b1}\uput[180](b2){b2}
\pcline{|-|}(A)(B)\ncput*[nrot=:U]{$a$}
\pcline{|-|}(B)(b1)\ncput*[nrot=:U]{$x$}
\pcline{|-|}(b1)(b2)\ncput*[nrot=:U]{$k$}
\pcline{|-|}(b2)(C)\ncput*[nrot=:U]{$x$}
\psset{linestyle=dashed}
\psline(b1)(! \psGetNodeCenter{b2}
b2.y % as x value
0)
\psline(b2)(! \psGetNodeCenter{b2} b2.y \valA)
\psline(!\psGetNodeCenter{b1} b1.y 0)(! \psGetNodeCenter{b1} 0 b1.y )
\psline(!\psGetNodeCenter{b2} 0 b2.y )(! \psGetNodeCenter{b1} b1.y \valA)
\end{pspicture}
\end{document}