Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to find a variant for the following,

enter image description here

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-eucl}
\addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(2,2)
    \pstGeonode[PosAngle={180,45,-90}]
        (-1.5,-1){A}
        (1.5,1){B}
        (1.5,-1){C}
    \pstRightAngle[RightAngleSize=0.2,fillstyle=solid,fillcolor=green!50]{A}{C}{B}
    \pstArcOAB[arcsepB=-1,arcsepA=-2.5]{A}{B}{B}
    \pstCurvAbsNode[CurvAbsNeg=true,PointName=none]{A}{B}{D}{\pstDistVal{.75}}
    \psline[linestyle=dashed](A)(D)(D|C)(C)
    \psset{shortput=nab,labelsep=-3pt}
    \ncline{A}{B}^{$g$}
    \ncline{B}{C}^{$a$}
    \ncline{C}{A}^{$b$}
\end{pspicture}
\end{document}

by calculating the distance with Pyth2 operator.

The following is my attempt.

\documentclass[pstricks,border={12pt 12pt 2cm 12pt}]{standalone}
\usepackage{pst-eucl}
\addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}
\psset{saveNodeCoors}
\begin{document}
\begin{pspicture}[showgrid](-2,-2)(2,2)
    \pstGeonode[PosAngle={180,45,-90}]
        (-1.5,-1){A}
        (1.5,1){B}
        (1.5,-1){C}
    \pstRightAngle[RightAngleSize=0.2,fillstyle=solid,fillcolor=green!50]{A}{C}{B}
        \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def}%
        \pnode(!Dist 10 PtoC){D}
    \psarc[arcsepB=-1,arcsepA=-2.5](A){!Dist}{(D)}{(B)}
    \psline[linestyle=dashed](A)(D)(D|C)(C)
    \psset{shortput=nab,labelsep=-3pt}
    \ncline{A}{B}^{$g$}
    \ncline{B}{C}^{$a$}
    \ncline{C}{A}^{$b$}
\end{pspicture}
\end{document}

And its output below is different from the first version shown above.

enter image description here

Could you find the glitch?

share|improve this question
    
I tried with \pnode[!N-A.x N-A.y](!Dist 20 PtoC){D} but it still produces a wrong output. –  stalking is prohibited Mar 12 '13 at 15:11

1 Answer 1

up vote 7 down vote accepted

A is not the origin of the coordinate system!

\pnode[A](!Dist 10 PtoC ){D}

sets the node relative to A

share|improve this answer
    
But why does \pnode[!N-A.x N-A.y](!Dist 20 PtoC){D} not work while \pnode[!\psGetNodeCenter{A} A.x A.y](!Dist 20 PtoC){D} works? It is really confusing. :D –  stalking is prohibited Mar 12 '13 at 15:26
2  
while (true) {Nodes of pst-eucl and pst-node are different! } –  Herbert Mar 12 '13 at 15:32
    
I canceled my comment above. Apparently both are identical. They became different because of the presence of a trailing space at the end of \pstRightAngle. –  stalking is prohibited Mar 15 '13 at 0:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.