Graphics, Figures & TablesCircles in PSTricks

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Circles in PSTricks

Post by Mini »

Hello, I have two questions:

1) Is there an easy way to draw a circle inscribed inside a triangle (I'm currently doing this by trial and error)

2) Is there an easy to way to draw a circle through three given points?

Thanks

Recommended reading 2024:

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

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

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Circles in PSTricks

Post by CrazyHorse »

Mini wrote:Hello, I have two questions:

1) Is there an easy way to draw a circle inscribed inside a triangle (I'm currently doing this by trial and error)

2) Is there an easy to way to draw a circle through three given points?
have a look at package pst-eucl.

Herbert
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Circles in PSTricks

Post by Mini »

Hi,

Thanks for that. I'm having a play around now.

But I have a question about the PointName feature.

How would I use it to label specific points? What am I doing wrong for labelling the triangles? They're all labelled as 'A' even though that's not what I've put.

Thanks

Code: Select all

\documentclass[12pt, fleqn, leqno]{article}
\pagestyle{empty}
\linespread{1.5}
\usepackage{polynom}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pst-eucl}
\usepackage[lmargin=1cm, rmargin=1cm, tmargin=1cm, bmargin=1cm]{geometry}
\newcommand{\cosec}{\operatorname{cosec}}

\begin{document}

\begin{figure}[!htb]
    \begin{center}
        \begin{pspicture}(-5,-1)(5,5)
          \psaxes[linewidth=1.2pt, labels=none, ticks=none]{->}(0,0)(-5,-1)(5,5)[$x$,-90][$y$,180]
          \pstTriangle[PointSymbol=none, PointName={A,B,A}](4,1){A}(1,3){B}(5,5){C}
          \pstCircleABC[CodeFig=true, CodeFigColor=blue,linecolor=red, PointSymbol=none, PointName={}]{A}{B}{C}{O}
        \end{pspicture}
    \end{center}
\end{figure}

\end{document} 
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Circles in PSTricks

Post by CrazyHorse »

Mini wrote: But I have a question about the PointName feature.

How would I use it to label specific points? What am I doing wrong for labelling the triangles? They're all labelled as 'A' even though that's not what I've put.

Code: Select all

          \pstTriangle[PointSymbol=none, PointName={A,B,A}](4,1){A}(1,3){B}(5,5){C}
looks a bit buggy, you should use PointNameC=A until it
will be recoded in the package

Herbert
Post Reply