[pstricks] Nodes at the ends of a tangent line
Akos Valentinyi
A.Valentinyi at soton.ac.uk
Mon Jan 23 16:59:03 CET 2006
Hi,
I do regularly a type of graph (see below) where the
tangent line to a curve extends to both the Y and the
X axis.
Right now I am doing in a complicated way. However,
if \plotTangent would give me two nodes, one
at each end of the tangent line, this could
be simplified. This is basically having
the slope of the tangent line in terms of two
nodes.
Any chance for that?
Thanks
Akos
\documentclass[12pt]{article}
\usepackage{pst-all,pstricks-add,pst-eucl}
\usepackage{amsmath,amsbsy}
\begin{document}
\setlength{\pslinewidth}{2pt}
\psset{plotpoints=200,xunit=0.5in,yunit=0.5in}
\psset{PointName=none,PointSymbol=none}
\Large
\begin{pspicture}(-1.5,-1.5)(11.5,10)
\psaxes[linewidth=0.5\pslinewidth,labels=none,ticks=none]{->}(0,0)(11,10)
\pnode(0,0){O}\pnode(11,0){X}\pnode(0,10){Y}
\def\F{8.5 x 0.75 exp div}
\def\Slope{-8.5 0.75 mul x 1.75 exp div}
\psplot{1}{10}{\F}
\def\xA{3.25}
\pstGeonode(!\xA\space /x \xA\space def \F){T}
\pstGeonode(!1 /x 1 def \F){A}
\pstGeonode(!4 /x 1 def \F\space /x \xA\space def \Slope\space -1 mul 4 1 sub mul sub){B}
\pstTranslation{A}{B}{T}[B'']
\pstInterLL{T}{B''}{O}{X}{B'}
\pstInterLL{T}{B''}{O}{Y}{A'}
\pstLineAB{A'}{B'}
\qdisk(T){2\pslinewidth}
\nput{45}{T}{\Large $O$}
\pstGeonode(!0 /x \xA\space def \F){C_2}
\pstGeonode(\xA,0){C_1}
\psline[linewidth=0.5\pslinewidth,linestyle=dashed](C_1)(T)(C_2)
\nput[nodesep=2ex]{270}{C_1}{$c_1$}
\nput[nodesep=2ex]{180}{C_2}{$c_2$}
\end{pspicture}
\endTeXtoEPS
\end{document}
******************************************************************
Akos Valentinyi
Economics Division
School of Social Sciences
University of Southampton
Highfield Phone: +44 23 80592536
Southampton SO17 1BJ Fax: +44 23 80593858
United Kingdom http://www.soton.ac.uk/~av2
******************************************************************
More information about the PSTricks
mailing list