<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Myriad Pro">Dear Patrick,<br>
<br>
here a more PS-tricky solution<br>
<br>
\documentclass{article}<br>
\usepackage{pstricks,pst-plot,pstricks-add}<br>
\begin{document}<br>
\begin{pspicture}(-4.5,-4.5)(4.5,4.5)<br>
\psaxes{->}(0,0)(-4.5,-4.5)(4.5,4.5)<br>
\psplot[algebraic,plotpoints=500]{-4}{4}{(16-x^2)^(0.5)}<br>
\psplot[algebraic,plotpoints=500]{-4}{4}{-(16-x^2)^(0.5)}<br>
\psplotTangent[algebraic,linecolor=blue]{3}{1}{(16-x^2)^(0.5)}<br>
\end{pspicture} <br>
<br>
alternative<br>
<br>
\begin{pspicture}(-4.5,-4.5)(4.5,4.5)<br>
\psaxes{->}(0,0)(-4.5,-4.5)(4.5,4.5)<br>
\psplot[polarplot,algebraic,plotpoints=500]{0}{TwoPi}{4}<br>
\psplotTangent[polarplot,algebraic,linecolor=blue]{Pi}{1}{4}<br>
\end{pspicture}<br>
\end{document}<br>
<br>
Regards,<br>
<br>
Juergen<br>
</font><br>
Patrick Drechsler wrote:
<blockquote cite="mid:87fxztgyg2.fsf@pdrechsler.de" type="cite">
<pre wrap="">Patrick Drechsler <a class="moz-txt-link-rfc2396E" href="mailto:patrick@pdrechsler.de"><patrick@pdrechsler.de></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">what is the best way to draw a tangent to \psellipse or \pscircle at
certain coordinates? And how does one retreive these coordinates?
</pre>
</blockquote>
<pre wrap=""><!---->
Using pst-eucl solved the problem at hand.
For the record:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-eucl}
\usepackage{pstricks-add}% needed for \psRelLine
\SpecialCoor%
\begin{document}
\begin{pspicture}[showgrid=true](-3,-3)(2.5,2)
%% Circle:
\pstGeonode(0,0){O}%
\pstGeonode(2,0){A}%
\pstCircleOA{O}{A}% draw circle
%% Line:
\pstGeonode[PosAngle=135](-2,-1.5){W1}%
\pstGeonode[PosAngle=135](3,-1.5){W2}%
\psline[linewidth=0.5pt,linecolor=gray](W1)(W2)% draw line
%% Intersection between line and circle:
\pstInterLC[PosAngleA=-90,PosAngleB=-45]{W1}{W2}{O}{A}{SP1}{SP2}
%% Secant between the above intersection points SP1 and SP2:
\psline[linecolor=blue](SP1)(SP2)
%% Draw radius:
\psline[linecolor=cyan](O)(SP1)
%% Tangent:
\psRelLine[linecolor=red,angle=90](SP1)(O){0.5}{EndnodeA}
\psRelLine[linecolor=red,angle=-90](SP1)(O){0.5}{EndnodeB}
\rput([offset=-.3]EndnodeB){{\color{red}tangent}}
\end{pspicture}
\end{document}
--8<---------------cut here---------------end--------------->8---
There are probably more elegant ways of doing this.
Cheers,
Patrick
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="65">--
jürgen gilg
austr. 59
70376 stuttgart
tel 0711-59 27 88
e-mail <a class="moz-txt-link-abbreviated" href="mailto:gilg@acrotex.net">gilg@acrotex.net</a>
website <a class="moz-txt-link-abbreviated" href="http://www.acrotex.net">www.acrotex.net</a>
<a class="moz-txt-link-abbreviated" href="http://www.gilligan-online.de">www.gilligan-online.de</a>
<a class="moz-txt-link-abbreviated" href="http://www.brueckenkurs-physik.de">www.brueckenkurs-physik.de</a></pre>
</body>
</html>