Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to create an ellipse (using psellipse, say). Call it E. And I'd like to specify a point P outside E. And then I'd like to construct, using PSTricks, the two rays starting at P and tangent to E.

Is there an easy way to do this?

I know I could do this by doing it for a circle and then "stretching" the picture to make it an ellipse, but that complicates other things I'd like to do. And of course one could figure this all out using explicit computations. But I'd like to know if there is some simple straightforward way.

share|improve this question
    
Are you sure stretching "circle-point tangency system" equals to "ellipse-point one"? –  xport Jan 16 '11 at 16:13
    
@xport: linear transformations don't change tangency (you can't get a second point of intersection by some stretching). –  Caramdir Jan 16 '11 at 17:50

3 Answers 3

up vote 4 down vote accepted

This is now in pstricks-add:

\documentclass{article}

\usepackage{pstricks-add}

\begin{document}

\begin{pspicture}[showgrid](-4,-2)(4,3)
 \psEllipseTangents(0,0)(3,2)(4,3)\psdot(4,3)
  \pcline[linecolor=red,nodesepB=-15mm](4,3)(EllipseT1)
  \pcline[linecolor=red,nodesepB=-15mm](4,3)(EllipseT2)
  \psdots(EllipseT1)(EllipseT2)
 \psellipse[fillcolor=cyan!30,fillstyle=solid](0,0)(3,2)
\end{pspicture}

\end{document}

alt text

share|improve this answer
    
I am waiting for the algebraic option for all tangents to conic curves. :-) –  xport Jan 17 '11 at 15:32
    
there will be a macro \psEllipseTangents which defines two nodes. –  Herbert Jan 18 '11 at 7:57
    
This is very nice. It's just what I was looking for. Thanks. –  Carl Offner Jan 18 '11 at 23:19

I advise you to use GeoGebra to draw such Euclidean Geometry graphs. It has a friendly GUI and can export PSTricks code easily.

http://www.geogebra.org/cms/

alt text

share|improve this answer
    
the PSTricks export of geogebra is lousy ... –  Herbert Jan 17 '11 at 10:22
    
@Herbert: I agree. Usually the code exported by GeoGebra needs to be modified manually. But it's easy to use, no complex caculations are needed. –  Leo Liu Jan 18 '11 at 5:36
    
this is not my point. With PSTricks you also do not need complex calculations, because every macro which is useful will be part of the package, just like \psEllipseTangents. However, with a gui one should export the image to PDF and not to tikz or PSTricks ... –  Herbert Jan 18 '11 at 7:56

You may want to have a look at the pst-eucl package.

share|improve this answer
    
It seems that pst-eucl can only draw tangents of circle. I'm not sure if there are some other subpackages. –  Leo Liu Jan 16 '11 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.