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.

How to rotate the label counter clockwise such that its base line is parallel to the bisector?

enter image description here

\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-eucl}
\psset{PointName=none,PointSymbol=none}
\begin{document}

\begin{pspicture}[showgrid=false](6,6)
    \pstGeonode[CurveType=polyline](1,1){A}(5,5){B}(4,1){C}
    \pstBissectBAC[linestyle=dotted,linecolor=red]{A}{B}{C}{C'}
    \pstMarkAngle[MarkAngleRadius=1.5,LabelSep=0.75]{A}{B}{C}{\tiny$180^\circ-\theta$}
\end{pspicture}

\end{document}
share|improve this question

2 Answers 2

up vote 4 down vote accepted
+50
\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-eucl}
\psset{PointName=none,PointSymbol=none}
\begin{document}

\begin{pspicture}[showgrid=false](6,6)
    \pstGeonode[CurveType=polyline](1,1){A}(5,5){B}(4,1){C}
    \pstBissectBAC[linestyle=dotted,linecolor=red]{A}{B}{C}{B'}
    \pstMarkAngle[MarkAngleRadius=1.6,LabelSep=1]{A}{B}{C}{}
    \pcline[linestyle=none](B')(B)\ncput[nrot=:U,npos=0.84]{\tiny$180^\circ-\theta$}
\end{pspicture}

\end{document}

a solution without knowing B'

\documentclass{article}
\usepackage{pst-eucl}
\begin{document}    
\begin{pspicture}[showgrid=false](6,6)
    \pstGeonode[CurveType=polyline](1,1){A}(5,5){B}(4,1){C}
    \pstMarkAngle[MarkAngleRadius=1.6,LabelSep=1]{A}{B}{C}{}
  \pcline[linestyle=none](!
    \psGetNodeCenter{A} \psGetNodeCenter{B} \psGetNodeCenter{C} 
    
    /LengthBA B.x A.x sub dup mul B.y A.y sub dup mul add sqrt def
    
    /LengthBC C.x A.x sub dup mul C.y A.y sub dup mul add sqrt def
    
    /Factor LengthBC LengthBA div def
    
    A.x B.x sub Factor mul B.x add /A.x ED
    
    A.y B.y sub Factor mul B.y add /A.y ED
    
    A.x C.x add 2 div A.y C.y add 2 div )(B)\ncput[nrot=:U,npos=0.84]{\tiny$180^\circ-\theta$}

\end{pspicture}

\end{document}
share|improve this answer
    
It becomes more complicated :-) –  In PSTricks we trust Aug 10 '12 at 14:27
    
no, because you do not need any coodinate –  Herbert Aug 10 '12 at 14:30
    
I meant that your solution depends on B' while my solution does not. However, I cannot rotate the label clockwise. –  In PSTricks we trust Aug 10 '12 at 14:35
    
no I do not need the B'. I used it only while it was defined. See edit for another solution –  Herbert Aug 10 '12 at 15:15
    
The calculation in the second example will put the label on the median rather than on the angle bisector. –  In PSTricks we trust Aug 10 '12 at 17:49

I got the solution even though it is not elegant enough.

enter image description here

\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-eucl}
\psset{PointName=none,PointSymbol=none}
\begin{document}

\begin{pspicture}[showgrid=false](6,6)
    \pstGeonode[CurveType=polyline](1,1){A}(5,5){B}(4,1){C}
    \pstMarkAngle[MarkAngleRadius=1.6,LabelSep=1]{A}{B}{C}{\rput{(B)}(0,0){\tiny$180^\circ-\theta$}}
\end{pspicture}

\end{document}

Clockwise rotation:

enter image description here

\documentclass[border=0pt,pstricks]{standalone}
\usepackage{pst-eucl}
\psset{PointName=none,PointSymbol=none}
\begin{document}

\begin{pspicture}[showgrid=false](6,6)
    \pstGeonode[CurveType=polyline](1,1){A}(5,5){B}(4,1){C}
    \pstMarkAngle[MarkAngleRadius=1.6,LabelSep=1]{A}{B}{C}{\rput{!\psGetNodeCenter{B} B.y B.x atan 180 sub}(0,0){\tiny$180^\circ-\theta$}}
\end{pspicture}

\end{document}
share|improve this answer

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.