[pstricks] radius of a circle

Hensh, Richard hensh at math.msu.edu
Thu Apr 15 18:26:02 CEST 2010


You can also try something like this. 

\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\pstVerb{%
%%%%%% Place in your custom PSTricks.pro file %%%%%%%%%%%%%%%%
/polar@ {dup cos 3 1 roll sin 3 1 roll dup 4 1 roll mul 3 1 roll mul} def % (r,theta) -> (x,y)
}
\pscircle(0,0){4}
\cnode*(0,0){0pt}{A}
\cnode*(!4 dup 62 cos mul exch 62 sin mul ){0pt}{B}
\ncline[nodesep=3pt]{<->}{A}{B}
\psdots[linecolor=red](!4 62 polar@)
\mput*{$R$}
\end{pspicture}
\end{document}

regards
rick

________________________________________
From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] On Behalf Of mathias legrand [legrand.mathias at gmail.com]
Sent: Thursday, April 15, 2010 11:02 AM
To: pstricks at tug.org
Subject: [pstricks] radius of a circle

Hi all,

what is your technique to indicate the radius of a circle with pstricks?

I have something like:

\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\pscircle(0,0){4}
\cnode*(0,0){0pt}{A}
\cnode*(4,2){0pt}{B}
\ncline[nodesep=3pt]{<->}{A}{B}
\mput*{$R$}
\end{pspicture}
\end{document}

but I would like to be able to parametrize the B node position with some
postscript command
such as:

\cnode*(4*cos(62),4*sin(62)){0pt}{B} (for instance)

Thanks for your lights.

Mathias


_______________________________________________
PSTricks mailing list
PSTricks at tug.org
http://tug.org/mailman/listinfo/pstricks
archive: http://www.tug.org/pipermail/pstricks/


More information about the PSTricks mailing list