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.

Let us consider the simpler one which is a triangle. According to the pst-eucl,

enter image description here

the point names will be placed on the bisector lines.

The below example is contradictory to the above statement.

enter image description here

enter image description here

enter image description here

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}

\pstVerb
{
    /rv {rand 36000 mod 100 div} def % random number from 0.00 to 359.99
}

\begin{document}

\psLoop{30}{%
\begin{pspicture}[showgrid=false](-2,-2)(2,2)
    \pscircle[linestyle=dashed,linecolor=lightgray]{2}
    \pstTriangle[linejoin=2](!2 rv PtoC){A}(!2 rv PtoC){B}(!2 rv PtoC){C}%
\end{pspicture}}

\end{document}

Now let us consider any polygon. How to automatically place points names of a polygon on the bisector lines?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

needs the current pst-eucl.tex|pro from http://texnik.dante.de/

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}

\begin{document}

\psforeach{\Angle}{0,10,..,360}{%
\begin{pspicture}[showgrid=false](-2,-2)(2,2)
\pscircle[linestyle=dashed,linecolor=lightgray]{2}
\pstTriangle[fillstyle=solid,fillcolor=red!30!white,
             opacity=0.4,linejoin=2](2;145){A}(2;195){B}(2;\Angle){C}%
\end{pspicture}}

\end{document}

enter image description here

share|improve this answer
    
It only works for \pstTriangle or it also works for any polygon generated by \pstGeonode[CurveType=polygon](){}...(){}? –  cyanide-based food Sep 12 '12 at 8:04
    
at the moment only for the triangle ... –  Herbert Sep 12 '12 at 8:09

Not a reliable solution because the labels are sometimes inside the polygon.

enter image description here

\documentclass[pstricks,border=15pt]{standalone}
\usepackage{pst-eucl}

\pstVerb
{
    /rv {rand 36000 mod 100 div} def % random number from 0.00 to 359.99
}

\begin{document}

\psLoop{30}{%
\begin{pspicture}[showgrid=false](-2,-2)(2,2)
    \pscircle[linestyle=dashed,linecolor=lightgray]{2}
    \pstGeonode[CurveType=polygon,PointName=none,linejoin=2]
    (!0 0){A}
    (!2 rv PtoC){B}
    (!2 rv PtoC){C}
    (!2 rv PtoC){D}
    \psset{MarkAngleRadius=0,LabelSep=0.25}
    \pstMarkAngle{D}{A}{B}{\tiny$A$}
    \pstMarkAngle{A}{B}{C}{\tiny$B$}
    \pstMarkAngle{B}{C}{D}{\tiny$C$}
    \pstMarkAngle{C}{D}{A}{\tiny$D$}
\end{pspicture}}

\end{document}

Please edit if you want to make it reliable.

share|improve this answer
    
When the labels are placed inside the polygon, you can manually put them outside the polygon by reversing the order, for example from {D}{A}{B} to {B}{A}{D}. –  cyanide-based food Sep 12 '12 at 3:22

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.