4

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.

2
  • Are you sure stretching "circle-point tangency system" equals to "ellipse-point one"? Jan 16, 2011 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, 2011 at 17:50

3 Answers 3

4

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

3
  • I am waiting for the algebraic option for all tangents to conic curves. :-) Jan 17, 2011 at 15:32
  • there will be a macro \psEllipseTangents which defines two nodes.
    – user2478
    Jan 18, 2011 at 7:57
  • This is very nice. It's just what I was looking for. Thanks. Jan 18, 2011 at 23:19
1

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

3
  • the PSTricks export of geogebra is lousy ...
    – user2478
    Jan 17, 2011 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, 2011 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 ...
    – user2478
    Jan 18, 2011 at 7:56
1

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

2
  • 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, 2011 at 17:09
  • It should be submitted as a comment as it is too short as an answer. Dec 16, 2017 at 3:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .