Graphics, Figures & Tablespst-eucl | Perpendicular bisectors of line segments

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

pst-eucl | Perpendicular bisectors of line segments

Post by svend_tveskaeg »

Hi all.

Consider the following MWE:

Code: Select all

\documentclass{article}

\usepackage{pst-eucl}

\begin{document}

\begin{figure}
 \centering
  \begin{pspicture}(10.5,9.8)
   \pnode(0,2.3){A}
   \pnode(3.7,7.8){B}
   \pnode(10.5,9.8){C}
   \psdot(A)
   \psdot(B)
   \psdot(C)
   \psline(A)(B)(C)
  \psset{
   PointSymbol=none,
   PointNameB=none,
   CodeFig=true,
   CodeFigColor=black
  }
   \pstMediatorAB{B}{A}{M}{M''}
   \pstMediatorAB{C}{B}{M'}{M'''}
  \end{pspicture}
\end{figure}

\end{document}
Is it possible to

(1) remove M and M' from the figure and
(2) extend the lines in order to make them intersect?

Ad (1): I tried to make the third argument blank but that is not legal.

Thank you in advance!

Update
It is possible to do like this but it is much easier if I can get the other attemp to work:

Code: Select all

\documentclass{article}

\usepackage{pst-eucl,pstricks-add}

\begin{document}

\begin{figure}
 \centering
  \begin{pspicture}(10.5,9.8)
   \pnode(0,2.3){A}
   \pnode(3.7,7.8){B}
   \pnode(10.5,9.8){C}
   \psdot(A)
   \psdot(B)
   \psdot(C)
   \psline(A)(B)(C)
  \psset{
   PointSymbol=none,
   PointNameB=none,
   CodeFig=true,
   CodeFigColor=black
  }
%   \pstMediatorAB[CodeFig=true]{B}{A}{M}{M''}
%   \pstMediatorAB[CodeFig=true]{C}{B}{M'}{M'''}
   \psRelLine(A)(B){1 2 div}{I'}
   \psRelLine[angle=90](I')(A){3}{I''}
   \psRelLine(B)(C){1 2 div}{J'}
   \psRelLine[angle=90](J')(B){2.8}{J''}
   \psIntersectionPoint(I')(I'')(J')(J''){X}
   \pcline(I')(X)
   \pcline(J')(X)
   \pstRightAngle{A}{I'}{I''}
   \pstRightAngle{B}{J'}{J''}
  \end{pspicture}
\end{figure}

\end{document}
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

pst-eucl | Perpendicular bisectors of line segments

Post by svend_tveskaeg »

Question crossposted to {TeX} SE.

Update
Herbert (of course) has given an elegant answer:

Code: Select all

\documentclass{article}
\usepackage{pst-eucl}    
\begin{document}

\begin{pspicture}(10.5,9.8)
  \pstGeonode[PointName=none](0,2.3){A}(3.7,7.8){B}(10.5,9.8){C}
  \psline(A)(B)(C)
\psset{
   PointSymbol=none,
   PointName=none,
   CodeFig=true,
   CodeFigColor=black}
   \pstMediatorAB[nodesepB=-6.5cm]{B}{A}{M}{M''}
   \pstMediatorAB[nodesepB=-6.5cm]{C}{B}{M'}{M'''}
\end{pspicture}

\end{document}
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply