How do I make tangents to ellipses and lines parallel to these?How to draw tangent line of an arbitrary point...

Why is my explanation wrong?

What is "desert glass" and what does it do to the PCs?

If nine coins are tossed, what is the probability that the number of heads is even?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

Where do you go through passport control when transiting through another Schengen airport on your way out of the Schengen area?

I can't die. Who am I?

Practical reasons to have both a large police force and bounty hunting network?

What is the oldest European royal house?

Is divide-by-zero a security vulnerability?

Why do we call complex numbers “numbers” but we don’t consider 2 vectors numbers?

Convert an array of objects to array of the objects' values

Remove object from array based on array of some property of that object

Is this nominative case or accusative case?

What's the best tool for cutting holes into duct work?

How do you make a gun that shoots melee weapons and/or swords?

Why aren't there more gauls like Obelix?

Learning to quickly identify valid fingering for piano?

Under what conditions would I NOT add my Proficiency Bonus to a Spell Attack Roll (or Saving Throw DC)?

3.5% Interest Student Loan or use all of my savings on Tuition?

Are there other characters in the Star Wars universe who had damaged bodies and needed to wear an outfit like Darth Vader?

Gemara word for QED

Using the imperfect indicative vs. subjunctive with si

How to make sure I'm assertive enough in contact with subordinates?

ESPP--any reason not to go all in?



How do I make tangents to ellipses and lines parallel to these?


How to draw tangent line of an arbitrary point on a path in TikZEasy curves in TikZRunning Sample Tikz CodeHow to draw an elliptical arc in TikZ given only opposite extreme points (vertices) of the ellipse?TikZ: normal and tangent vectors added to ellipse 2TikZ: Is drawing an arc that either curves to much or isn't long enoughCalculate the intersection between a path enclosed by a `scope` and another pathThe intersection of a sphere with planes through an axis tangent to the north poleTikZ: Drawing an arc from an intersection to an intersectiontikz/pgfplots - Plotting 3D surface with sphereDraw a tangent vector to the circumference path













10















I have specified an ellipse and three points in the following way:



defaa{2.5}
defbb{2}
draw[thick] (0,0) ellipse [x radius=aa,y radius=bb];
pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}
path coordinate (c) at (0,0)
coordinate (d) at (-focus,0)
coordinate (r) at ($(0,0)+(36:{aa} and {bb})$);
fill (c) circle (2pt)
(d) circle (2pt)
(r) circle (2pt);


Now I need




  1. a tangent vector to the ellipse through (r);

  2. a line parallel to this tangent through (c);

  3. a coordinate at the intersection of this last line with the line joining (r) and (d).


I cannot seem to find a solution to 1. that allows me to solve 2. and 3. Any suggestions, please?










share|improve this question




















  • 2





    This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

    – m0nhawk
    Apr 10 '13 at 11:32











  • possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

    – Charles Stewart
    Apr 10 '13 at 11:39











  • I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

    – Zaefox
    Apr 10 '13 at 12:07











  • Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

    – T. Verron
    Apr 10 '13 at 13:24
















10















I have specified an ellipse and three points in the following way:



defaa{2.5}
defbb{2}
draw[thick] (0,0) ellipse [x radius=aa,y radius=bb];
pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}
path coordinate (c) at (0,0)
coordinate (d) at (-focus,0)
coordinate (r) at ($(0,0)+(36:{aa} and {bb})$);
fill (c) circle (2pt)
(d) circle (2pt)
(r) circle (2pt);


Now I need




  1. a tangent vector to the ellipse through (r);

  2. a line parallel to this tangent through (c);

  3. a coordinate at the intersection of this last line with the line joining (r) and (d).


I cannot seem to find a solution to 1. that allows me to solve 2. and 3. Any suggestions, please?










share|improve this question




















  • 2





    This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

    – m0nhawk
    Apr 10 '13 at 11:32











  • possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

    – Charles Stewart
    Apr 10 '13 at 11:39











  • I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

    – Zaefox
    Apr 10 '13 at 12:07











  • Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

    – T. Verron
    Apr 10 '13 at 13:24














10












10








10


2






I have specified an ellipse and three points in the following way:



defaa{2.5}
defbb{2}
draw[thick] (0,0) ellipse [x radius=aa,y radius=bb];
pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}
path coordinate (c) at (0,0)
coordinate (d) at (-focus,0)
coordinate (r) at ($(0,0)+(36:{aa} and {bb})$);
fill (c) circle (2pt)
(d) circle (2pt)
(r) circle (2pt);


Now I need




  1. a tangent vector to the ellipse through (r);

  2. a line parallel to this tangent through (c);

  3. a coordinate at the intersection of this last line with the line joining (r) and (d).


I cannot seem to find a solution to 1. that allows me to solve 2. and 3. Any suggestions, please?










share|improve this question
















I have specified an ellipse and three points in the following way:



defaa{2.5}
defbb{2}
draw[thick] (0,0) ellipse [x radius=aa,y radius=bb];
pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}
path coordinate (c) at (0,0)
coordinate (d) at (-focus,0)
coordinate (r) at ($(0,0)+(36:{aa} and {bb})$);
fill (c) circle (2pt)
(d) circle (2pt)
(r) circle (2pt);


Now I need




  1. a tangent vector to the ellipse through (r);

  2. a line parallel to this tangent through (c);

  3. a coordinate at the intersection of this last line with the line joining (r) and (d).


I cannot seem to find a solution to 1. that allows me to solve 2. and 3. Any suggestions, please?







tikz-pgf asymptote






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 13 mins ago









g.kov

17.4k13976




17.4k13976










asked Apr 10 '13 at 10:49









ZaefoxZaefox

636




636








  • 2





    This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

    – m0nhawk
    Apr 10 '13 at 11:32











  • possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

    – Charles Stewart
    Apr 10 '13 at 11:39











  • I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

    – Zaefox
    Apr 10 '13 at 12:07











  • Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

    – T. Verron
    Apr 10 '13 at 13:24














  • 2





    This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

    – m0nhawk
    Apr 10 '13 at 11:32











  • possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

    – Charles Stewart
    Apr 10 '13 at 11:39











  • I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

    – Zaefox
    Apr 10 '13 at 12:07











  • Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

    – T. Verron
    Apr 10 '13 at 13:24








2




2





This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

– m0nhawk
Apr 10 '13 at 11:32





This question can be useful: How to draw tangent line of an arbitrary point on a path in TikZ.

– m0nhawk
Apr 10 '13 at 11:32













possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

– Charles Stewart
Apr 10 '13 at 11:39





possible duplicate of How to draw tangent line of an arbitrary point on a path in TikZ

– Charles Stewart
Apr 10 '13 at 11:39













I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

– Zaefox
Apr 10 '13 at 12:07





I did use exactly that one to solve part 1, but I am having trouble using it to solve 2. and 3.

– Zaefox
Apr 10 '13 at 12:07













Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

– T. Verron
Apr 10 '13 at 13:24





Could you please update your question, to show your current advance, and to state as clearly as possible what you need to do, and what you have tried for that? In its current form, it definitely looks like a duplicate of the above link.

– T. Verron
Apr 10 '13 at 13:24










3 Answers
3






active

oldest

votes


















12














Here's a way of accomplishing this using the approach from How to draw tangent line of an arbitrary point on a path in TikZ





documentclass[border=5mm]{standalone}
usepackage{tikz}
usetikzlibrary{calc, decorations.markings, intersections}
begin{document}
begin{tikzpicture}[
tangent/.style={
decoration={
markings,% switch on markings
mark=
at position #1
with
{
coordinate (tangent point-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
coordinate (tangent unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
coordinate (tangent orthogonal unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
}
},
postaction=decorate
},
use tangent/.style={
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
},
use tangent/.default=1
]

defaa{3.5}
defbb{2}
pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}

draw[thick, tangent=0.07] (0,0) ellipse [x radius=aa,y radius=bb];

path coordinate (c) at (0,0)
coordinate (d) at (-focus,0);
fill (c) circle (2pt)
(d) circle (2pt);

fill (tangent point-1) circle [radius=2pt];
draw [red, name path=rd] (tangent point-1) -- (d);
draw [use tangent] (2,0) -- (-2,0);
draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);

fill [red, name intersections={of={rd and parallel}}] (intersection-1) circle [radius=2pt];
end{tikzpicture}

end{document}





share|improve this answer


























  • @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

    – daleif
    Apr 10 '13 at 13:42











  • @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

    – daleif
    Apr 10 '13 at 14:04











  • @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

    – Jake
    Apr 10 '13 at 14:08











  • @jake that is it, takes a bit you get ones head twisted through that one.

    – daleif
    Apr 10 '13 at 14:10






  • 1





    Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

    – Alain Matthes
    Apr 10 '13 at 17:08



















7














enter image description here



And Asymptote version, ellipse.asy along with a translation to tikz via svg



size(300);
void Dot(... pair[] p){ // function takes a variable number of arguments
for(int i=0;i<p.length;++i){
fill(shift(p[i])*scale(0.06)*unitcircle,black);
fill(shift(p[i])*scale(0.04)*unitcircle,white);
}
}
real a=2.5, b=2, focus=sqrt(a*a-b*b);
pair c=(0,0), d=(-focus,0);
path el=ellipse(c,a,b);
path tline=rotate(36)*(c--(2a,0));
real tr=intersect(el,tline)[0];
pair r=point(el,tr);
pair tan_dir=dir(el,tr);
path tan_line=scale(b)*(-tan_dir--tan_dir);
pair w=intersectionpoint(d--r,shift(c)*tan_line);

pen linePen=darkblue+1.2pt;
pen elPen=red+1.5pt;

draw(el,elPen); draw(d--r,linePen);
draw(shift(r)*tan_line,linePen);
draw(shift(c)*tan_line,linePen);
Dot(c,d,r,w);
label("$C$",c,NE);label("$D$",d,NW);
label("$R$",r,NE);label("$W$",w,S);


run asy ellipse.asy to get ellipse.eps or asy -f pdf ellipse.asy to get ellipse.pdf.
Or put it inside the asy environment in a LaTeX document (see texdoc asymptote).



Edit: Some comments added.



A user defined function to draw a list of dots, to be used later as Dot(c,d,r,w);:



void Dot(... pair[] p){ //  function takes a variable number of arguments
for(int i=0;i<p.length;++i){
fill(shift(p[i])*scale(0.06)*unitcircle,black);
fill(shift(p[i])*scale(0.04)*unitcircle,white);
}
}


The function Dot is defined with ... pair[] p construction, that means
it is able to accept a variable number of arguments, all of them will be placed
in an array of pairs (2D coordinates) p[].



real a=2.5, b=2, focus=sqrt(a*a-b*b);


defines dimensions.



pair c=(0,0), d=(-focus,0);


defines points c and d by x,y coordinates.



path el=ellipse(c,a,b);


defines a curve (ellipse outline) to be used later;



path tline=rotate(36)*(c--(2a,0));


defines a straight line as a rotated by 36 degrees horizontal line c--(2a,0)



real tr=intersect(el,tline)[0];


defines a so-called intersection time, a parameter t for the path el, which
corresponds to the point of intersection of tline with the ellipse outline el.



pair r=point(el,tr);


define the point of intersection itself.



pair tan_dir=dir(el,tr);


defines a tangent direction at the point r (at time tr).



path tan_line=scale(b)*(-tan_dir--tan_dir);


defines a line through the origin parallel to the tangent.



pair w=intersectionpoint(d--r,shift(c)*tan_line);


defines an intersection point of interest, between the line d--r
and a line parallel to the tangent through the origin (point c).



pen linePen=darkblue+1.2pt;
pen elPen=red+1.5pt;


defined are pens (color and width) to be used for lines and ellipse



draw(el,elPen); draw(d--r,linePen);


draw the ellipse and the line d--r



draw(shift(r)*tan_line,linePen);
draw(shift(c)*tan_line,linePen);


draw two parallel lines through points r and c, using defined function Dot.



Dot(c,d,r,w);


draw fancy dots at all four points c,d,r,w.



label("$C$",c,NE);label("$D$",d,NW);
label("$R$",r,NE);label("$W$",w,S);


and finally, draw labels, formatted as a (La)TeX string (e.g. "$C$")
at specified position (e.g. ,c), oriented as specified (e.d. NE means to the North-West of the point).



Edit2: tikz translation added



Thanks to Harish Kumar for his answer [here][2], I've just installed inkscape2tikz from [source][3] and after running asy -f svg ellipse.asy svg2tikz ellipse.svg > ellipse.tex here it is a LaTeX document with tikz solution, translated from the ellipse.asy code shown above:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}

begin{document}
definecolor{cff0000}{RGB}{255,0,0}
definecolor{c000040}{RGB}{0,0,64}
definecolor{cffffff}{RGB}{255,255,255}


begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
begin{scope}[cm={{0.996,0.0,0.0,0.996,(0.0,0.0)}}]
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[draw=cff0000,line join=round,line cap=round,miter limit=10.04,line
width=1.200pt] (75.2812,0.0000) .. controls (75.2812,-33.2613) and
(41.5767,-60.2250) .. (0.0000,-60.2250) .. controls (-41.5767,-60.2250) and
(-75.2812,-33.2613) .. (-75.2812,-0.0000) .. controls (-75.2812,33.2613) and
(-41.5767,60.2250) .. (0.0000,60.2250) .. controls (41.5767,60.2250) and
(75.2812,33.2613) .. (75.2812,0.0000) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
width=0.960pt] (-45.1687,-0.0000) -- (55.7293,-40.4897);
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
width=0.960pt] (100.9330,-0.6942) -- (10.5257,-80.2853);
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
width=0.960pt] (45.2036,39.7955) -- (-45.2036,-39.7955);
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=black] (1.8068,0.0000) .. controls (1.8068,-0.9978) and
(0.9978,-1.8068) .. (0.0000,-1.8068) .. controls (-0.9978,-1.8068) and
(-1.8068,-0.9978) .. (-1.8068,-0.0000) .. controls (-1.8068,0.9978) and
(-0.9978,1.8068) .. (0.0000,1.8068) .. controls (0.9978,1.8068) and
(1.8068,0.9978) .. (1.8068,0.0000) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=cffffff] (1.2045,0.0000) .. controls (1.2045,-0.6652) and
(0.6652,-1.2045) .. (0.0000,-1.2045) .. controls (-0.6652,-1.2045) and
(-1.2045,-0.6652) .. (-1.2045,-0.0000) .. controls (-1.2045,0.6652) and
(-0.6652,1.2045) .. (0.0000,1.2045) .. controls (0.6652,1.2045) and
(1.2045,0.6652) .. (1.2045,0.0000) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=black] (-43.3620,-0.0000) .. controls (-43.3620,-0.9978) and
(-44.1709,-1.8068) .. (-45.1687,-1.8068) .. controls (-46.1666,-1.8068) and
(-46.9755,-0.9978) .. (-46.9755,-0.0000) .. controls (-46.9755,0.9978) and
(-46.1666,1.8068) .. (-45.1687,1.8068) .. controls (-44.1709,1.8068) and
(-43.3620,0.9978) .. (-43.3620,-0.0000) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=cffffff] (-43.9642,-0.0000) .. controls (-43.9642,-0.6652) and
(-44.5035,-1.2045) .. (-45.1687,-1.2045) .. controls (-45.8340,-1.2045) and
(-46.3732,-0.6652) .. (-46.3732,-0.0000) .. controls (-46.3732,0.6652) and
(-45.8340,1.2045) .. (-45.1687,1.2045) .. controls (-44.5035,1.2045) and
(-43.9642,0.6652) .. (-43.9642,-0.0000) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=black] (57.5361,-40.4897) .. controls (57.5361,-41.4876) and
(56.7272,-42.2965) .. (55.7293,-42.2965) .. controls (54.7315,-42.2965) and
(53.9226,-41.4876) .. (53.9226,-40.4897) .. controls (53.9226,-39.4919) and
(54.7315,-38.6830) .. (55.7293,-38.6830) .. controls (56.7272,-38.6830) and
(57.5361,-39.4919) .. (57.5361,-40.4897) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=cffffff] (56.9338,-40.4897) .. controls (56.9338,-41.1550) and
(56.3946,-41.6942) .. (55.7293,-41.6942) .. controls (55.0641,-41.6942) and
(54.5248,-41.1550) .. (54.5248,-40.4897) .. controls (54.5248,-39.8245) and
(55.0641,-39.2852) .. (55.7293,-39.2852) .. controls (56.3946,-39.2852) and
(56.9338,-39.8245) .. (56.9338,-40.4897) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=black] (-12.3358,-12.4506) .. controls (-12.3358,-13.4484) and
(-13.1447,-14.2573) .. (-14.1426,-14.2573) .. controls (-15.1404,-14.2573) and
(-15.9493,-13.4484) .. (-15.9493,-12.4506) .. controls (-15.9493,-11.4528) and
(-15.1404,-10.6438) .. (-14.1426,-10.6438) .. controls (-13.1447,-10.6438) and
(-12.3358,-11.4528) .. (-12.3358,-12.4506) -- cycle;
end{scope}
begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
path[fill=cffffff] (-12.9381,-12.4506) .. controls (-12.9381,-13.1158) and
(-13.4774,-13.6551) .. (-14.1426,-13.6551) .. controls (-14.8078,-13.6551) and
(-15.3471,-13.1158) .. (-15.3471,-12.4506) .. controls (-15.3471,-11.7854) and
(-14.8078,-11.2461) .. (-14.1426,-11.2461) .. controls (-13.4774,-11.2461) and
(-12.9381,-11.7854) .. (-12.9381,-12.4506) -- cycle;
end{scope}
begin{scope}[shift={(209.733,171.904)}]
path (8.9640,-8.3400) .. controls (8.9640,-8.4480) and (8.8800,-8.4480) ..
(8.8560,-8.4480) .. controls (8.8320,-8.4480) and (8.7840,-8.4480) ..
(8.6880,-8.3280) -- (7.8600,-7.3200) .. controls (7.4400,-8.0400) and
(6.7800,-8.4480) .. (5.8800,-8.4480) .. controls (3.2880,-8.4480) and
(0.6000,-5.8200) .. (0.6000,-3.0000) .. controls (0.6000,-0.9960) and
(2.0040,0.2520) .. (3.7560,0.2520) .. controls (4.7160,0.2520) and
(5.5560,-0.1560) .. (6.2520,-0.7440) .. controls (7.2960,-1.6200) and
(7.6080,-2.7840) .. (7.6080,-2.8800) .. controls (7.6080,-2.9880) and
(7.5120,-2.9880) .. (7.4760,-2.9880) .. controls (7.3680,-2.9880) and
(7.3560,-2.9160) .. (7.3320,-2.8680) .. controls (6.7800,-0.9960) and
(5.1600,-0.0960) .. (3.9600,-0.0960) .. controls (2.6880,-0.0960) and
(1.5840,-0.9120) .. (1.5840,-2.6160) .. controls (1.5840,-3.0000) and
(1.7040,-5.0880) .. (3.0600,-6.6600) .. controls (3.7200,-7.4280) and
(4.8480,-8.1000) .. (5.9880,-8.1000) .. controls (7.3080,-8.1000) and
(7.8960,-7.0080) .. (7.8960,-5.7840) .. controls (7.8960,-5.4720) and
(7.8600,-5.2080) .. (7.8600,-5.1600) .. controls (7.8600,-5.0520) and
(7.9800,-5.0520) .. (8.0160,-5.0520) .. controls (8.1480,-5.0520) and
(8.1600,-5.0640) .. (8.2080,-5.2800) -- (8.9640,-8.3400) -- cycle;
end{scope}
begin{scope}[shift={(149.391,171.904)}]
path (1.8840,-0.8880) .. controls (1.7760,-0.4680) and (1.7520,-0.3480) ..
(0.9120,-0.3480) .. controls (0.6840,-0.3480) and (0.5640,-0.3480) ..
(0.5640,-0.1320) .. controls (0.5640,0.0000) and (0.6360,0.0000) ..
(0.8760,0.0000) -- (4.6800,0.0000) .. controls (7.1040,0.0000) and
(9.4680,-2.5080) .. (9.4680,-5.1840) .. controls (9.4680,-6.9120) and
(8.4360,-8.1960) .. (6.7200,-8.1960) -- (2.8680,-8.1960) .. controls
(2.6400,-8.1960) and (2.5320,-8.1960) .. (2.5320,-7.9680) .. controls
(2.5320,-7.8480) and (2.6400,-7.8480) .. (2.8200,-7.8480) .. controls
(3.5520,-7.8480) and (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls
(3.5520,-7.5960) and (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880)
-- cycle(4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
(5.0400,-7.8480) -- (6.3600,-7.8480) .. controls (7.4880,-7.8480) and
(8.5200,-7.2360) .. (8.5200,-5.5800) .. controls (8.5200,-4.9800) and
(8.2800,-2.8920) .. (7.1160,-1.5720) .. controls (6.7800,-1.1760) and
(5.8680,-0.3480) .. (4.4880,-0.3480) -- (3.1200,-0.3480) .. controls
(2.9520,-0.3480) and (2.9280,-0.3480) .. (2.8560,-0.3600) .. controls
(2.7240,-0.3720) and (2.7120,-0.3960) .. (2.7120,-0.4920) .. controls
(2.7120,-0.5760) and (2.7360,-0.6480) .. (2.7600,-0.7560) -- (4.4160,-7.3800)
-- cycle;
end{scope}
begin{scope}[shift={(265.462,131.415)}]
path (4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
(5.0400,-7.8480) -- (5.9040,-7.8480) .. controls (6.9360,-7.8480) and
(7.7040,-7.5360) .. (7.7040,-6.6000) .. controls (7.7040,-5.9880) and
(7.3920,-4.2240) .. (4.9800,-4.2240) -- (3.6240,-4.2240) -- (4.4160,-7.3800)
-- cycle(6.0840,-4.0800) .. controls (7.5720,-4.4040) and (8.7360,-5.3640) ..
(8.7360,-6.3960) .. controls (8.7360,-7.3320) and (7.7880,-8.1960) ..
(6.1200,-8.1960) -- (2.8680,-8.1960) .. controls (2.6280,-8.1960) and
(2.5200,-8.1960) .. (2.5200,-7.9680) .. controls (2.5200,-7.8480) and
(2.6040,-7.8480) .. (2.8320,-7.8480) .. controls (3.5520,-7.8480) and
(3.5520,-7.7520) .. (3.5520,-7.6200) .. controls (3.5520,-7.5960) and
(3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880) .. controls
(1.7760,-0.4680) and (1.7520,-0.3480) .. (0.9240,-0.3480) .. controls
(0.6480,-0.3480) and (0.5640,-0.3480) .. (0.5640,-0.1200) .. controls
(0.5640,0.0000) and (0.6960,0.0000) .. (0.7320,0.0000) .. controls
(0.9480,0.0000) and (1.2000,-0.0240) .. (1.4280,-0.0240) -- (2.8440,-0.0240)
.. controls (3.0600,-0.0240) and (3.3120,0.0000) .. (3.5280,0.0000) ..
controls (3.6240,0.0000) and (3.7560,0.0000) .. (3.7560,-0.2280) .. controls
(3.7560,-0.3480) and (3.6480,-0.3480) .. (3.4680,-0.3480) .. controls
(2.7360,-0.3480) and (2.7360,-0.4440) .. (2.7360,-0.5640) .. controls
(2.7360,-0.5760) and (2.7360,-0.6600) .. (2.7600,-0.7560) -- (3.5640,-3.9840)
-- (5.0040,-3.9840) .. controls (6.1440,-3.9840) and (6.3600,-3.2640) ..
(6.3600,-2.8680) .. controls (6.3600,-2.6880) and (6.2400,-2.2200) ..
(6.1560,-1.9080) .. controls (6.0240,-1.3560) and (5.9880,-1.2240) ..
(5.9880,-0.9960) .. controls (5.9880,-0.1440) and (6.6840,0.2520) ..
(7.4880,0.2520) .. controls (8.4600,0.2520) and (8.8800,-0.9360) ..
(8.8800,-1.1040) .. controls (8.8800,-1.1880) and (8.8200,-1.2240) ..
(8.7480,-1.2240) .. controls (8.6520,-1.2240) and (8.6280,-1.1520) ..
(8.6040,-1.0560) .. controls (8.3160,-0.2040) and (7.8240,0.0120) ..
(7.5240,0.0120) .. controls (7.2240,0.0120) and (7.0320,-0.1200) ..
(7.0320,-0.6600) .. controls (7.0320,-0.9480) and (7.1760,-2.0400) ..
(7.1880,-2.1000) .. controls (7.2480,-2.5440) and (7.2480,-2.5920) ..
(7.2480,-2.6880) .. controls (7.2480,-3.5640) and (6.5400,-3.9360) ..
(6.0840,-4.0800) -- cycle;
end{scope}
begin{scope}[shift={(186.682,173.799)}]
path (10.8360,-6.8640) .. controls (11.1120,-7.3320) and (11.3760,-7.7760) ..
(12.0960,-7.8480) .. controls (12.2040,-7.8600) and (12.3120,-7.8720) ..
(12.3120,-8.0640) .. controls (12.3120,-8.1960) and (12.2040,-8.1960) ..
(12.1680,-8.1960) .. controls (12.1440,-8.1960) and (12.0600,-8.1720) ..
(11.2680,-8.1720) .. controls (10.9080,-8.1720) and (10.5360,-8.1960) ..
(10.1880,-8.1960) .. controls (10.1160,-8.1960) and (9.9720,-8.1960) ..
(9.9720,-7.9680) .. controls (9.9720,-7.8600) and (10.0680,-7.8480) ..
(10.1400,-7.8480) .. controls (10.3800,-7.8360) and (10.7640,-7.7640) ..
(10.7640,-7.3920) .. controls (10.7640,-7.2360) and (10.7160,-7.1520) ..
(10.5960,-6.9480) -- (7.3200,-1.2120) -- (6.8880,-7.4640) .. controls
(6.8880,-7.6080) and (7.0200,-7.8360) .. (7.6920,-7.8480) .. controls
(7.8480,-7.8480) and (7.9680,-7.8480) .. (7.9680,-8.0760) .. controls
(7.9680,-8.1960) and (7.8480,-8.1960) .. (7.7880,-8.1960) .. controls
(7.3680,-8.1960) and (6.9240,-8.1720) .. (6.4920,-8.1720) -- (5.8680,-8.1720)
.. controls (5.6880,-8.1720) and (5.4720,-8.1960) .. (5.2920,-8.1960) ..
controls (5.2200,-8.1960) and (5.0760,-8.1960) .. (5.0760,-7.9680) .. controls
(5.0760,-7.8480) and (5.1600,-7.8480) .. (5.3640,-7.8480) .. controls
(5.9160,-7.8480) and (5.9160,-7.8360) .. (5.9640,-7.1040) -- (6.0000,-6.6720)
-- (2.8920,-1.2120) -- (2.4480,-7.4040) .. controls (2.4480,-7.5360) and
(2.4480,-7.8360) .. (3.2640,-7.8480) .. controls (3.3960,-7.8480) and
(3.5280,-7.8480) .. (3.5280,-8.0640) .. controls (3.5280,-8.1960) and
(3.4200,-8.1960) .. (3.3480,-8.1960) .. controls (2.9280,-8.1960) and
(2.4840,-8.1720) .. (2.0520,-8.1720) -- (1.4280,-8.1720) .. controls
(1.2480,-8.1720) and (1.0320,-8.1960) .. (0.8520,-8.1960) .. controls
(0.7800,-8.1960) and (0.6360,-8.1960) .. (0.6360,-7.9680) .. controls
(0.6360,-7.8480) and (0.7320,-7.8480) .. (0.9000,-7.8480) .. controls
(1.4640,-7.8480) and (1.4760,-7.7760) .. (1.5000,-7.3920) -- (2.0280,-0.0240)
.. controls (2.0400,0.1800) and (2.0520,0.2520) .. (2.1960,0.2520) .. controls
(2.3160,0.2520) and (2.3400,0.2040) .. (2.4480,0.0240) -- (6.0240,-6.2280) --
(6.4680,-0.0240) .. controls (6.4800,0.1800) and (6.4920,0.2520) ..
(6.6360,0.2520) .. controls (6.7560,0.2520) and (6.7920,0.1920) ..
(6.8880,0.0240) -- (10.8360,-6.8640) -- cycle;
end{scope}
end{scope}

end{tikzpicture}
end{document}


The graphics looks fine, but the labels vanished somehow.






share|improve this answer

































    5














    With PSTricks and explanation.



    enter image description here



    documentclass[pstricks,border=12pt]{standalone}
    usepackage{pst-eucl,pst-plot}

    edefA{2}% semi-major
    edefB{1}% semi-minor
    edefCx{3}% center abscissa
    edefCy{3}% center ordinate

    % parametric representation of an ellipse
    edefX(#1){A*cos(#1)+Cx}
    edefY(#1){B*sin(#1)+Cy}

    % the left focus point in RPN notation
    % [-sqrt(A^2-B^2)+Cx,Cy]
    edefF{!Aspace 2 exp Bspace 2 exp sub sqrt neg Cxspace add
    Cy }

    psset{algebraic}

    begin{document}
    begin{pspicture}[showgrid](6,6)
    psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}% plot the ellipse from 0 to 2*pi
    curvepnode{Pi 4 div}{X(t)|Y(t)}{P}% define the point P through which the tangent line passes
    % curvepnode also produces a unit tangent vector named Ptang
    %----------------------------------------------------------------------------------------------
    pnode(Cx,Cy){C}% define the center
    pnode(F){F}% define the focus
    %----------------------------------------------------------------------------------------------
    nodexn{-2(Ptang)+(C)}{S}% vector S = -2 Ptang + C
    nodexn{2(Ptang)+(C)}{T}% vector T = 2 Ptang + C
    %-----------------------------------------------------------------------------------------------
    psline[linecolor=red](S)(T)% draw the line passing through C and parallel to the unit tangent vector
    psxline[linecolor=green](P){(S)-(C)}{(T)-(C)}% draw a line from vector P + S - C to P + T - C
    pcline[nodesep=-1,linecolor=blue](F)(P)% drawn a line from F to P
    pstInterLL[PointName=none]{F}{P}{S}{T}{I}% find the intersection point I between line FP and ST
    psdots(P)(C)(F)% draw the points P, C, F
    end{pspicture}
    end{document}


    Animation



    enter image description here



    documentclass[pstricks,border=12pt]{standalone}
    usepackage{pst-eucl,pst-plot}
    usepackage[nomessages]{fp}

    defX(#1){2*cos(#1)+3}
    defY(#1){sin(#1)+3}
    FPsetN{20}
    FPevalStep{round(2*pi/N:2)}

    psset{algebraic,unit=0.5}

    begin{document}
    multido{n=0.00+Step}{N}{%
    begin{pspicture*}[showgrid=false](6,6)
    psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}
    curvepnode{n}{X(t)|Y(t)}{P}
    pnode(3,3){Q}
    pnode(!3 sqrt neg 3 add 3){F}
    nodexn{-3(Ptang)+(Q)}{A}
    nodexn{3(Ptang)+(Q)}{B}
    psline[linecolor=red](A)(B)
    psxline[linecolor=green](P){(A)-(Q)}{(B)-(Q)}
    pcline[nodesep=-2,linecolor=blue](F)(P)
    pstInterLL[PointName=none]{F}{P}{A}{B}{I}
    psdots(P)(Q)(F)
    end{pspicture*}}
    end{document}





    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "85"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f107902%2fhow-do-i-make-tangents-to-ellipses-and-lines-parallel-to-these%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      12














      Here's a way of accomplishing this using the approach from How to draw tangent line of an arbitrary point on a path in TikZ





      documentclass[border=5mm]{standalone}
      usepackage{tikz}
      usetikzlibrary{calc, decorations.markings, intersections}
      begin{document}
      begin{tikzpicture}[
      tangent/.style={
      decoration={
      markings,% switch on markings
      mark=
      at position #1
      with
      {
      coordinate (tangent point-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
      coordinate (tangent unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
      coordinate (tangent orthogonal unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
      }
      },
      postaction=decorate
      },
      use tangent/.style={
      shift=(tangent point-#1),
      x=(tangent unit vector-#1),
      y=(tangent orthogonal unit vector-#1)
      },
      use tangent/.default=1
      ]

      defaa{3.5}
      defbb{2}
      pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}

      draw[thick, tangent=0.07] (0,0) ellipse [x radius=aa,y radius=bb];

      path coordinate (c) at (0,0)
      coordinate (d) at (-focus,0);
      fill (c) circle (2pt)
      (d) circle (2pt);

      fill (tangent point-1) circle [radius=2pt];
      draw [red, name path=rd] (tangent point-1) -- (d);
      draw [use tangent] (2,0) -- (-2,0);
      draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);

      fill [red, name intersections={of={rd and parallel}}] (intersection-1) circle [radius=2pt];
      end{tikzpicture}

      end{document}





      share|improve this answer


























      • @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

        – daleif
        Apr 10 '13 at 13:42











      • @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

        – daleif
        Apr 10 '13 at 14:04











      • @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

        – Jake
        Apr 10 '13 at 14:08











      • @jake that is it, takes a bit you get ones head twisted through that one.

        – daleif
        Apr 10 '13 at 14:10






      • 1





        Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

        – Alain Matthes
        Apr 10 '13 at 17:08
















      12














      Here's a way of accomplishing this using the approach from How to draw tangent line of an arbitrary point on a path in TikZ





      documentclass[border=5mm]{standalone}
      usepackage{tikz}
      usetikzlibrary{calc, decorations.markings, intersections}
      begin{document}
      begin{tikzpicture}[
      tangent/.style={
      decoration={
      markings,% switch on markings
      mark=
      at position #1
      with
      {
      coordinate (tangent point-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
      coordinate (tangent unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
      coordinate (tangent orthogonal unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
      }
      },
      postaction=decorate
      },
      use tangent/.style={
      shift=(tangent point-#1),
      x=(tangent unit vector-#1),
      y=(tangent orthogonal unit vector-#1)
      },
      use tangent/.default=1
      ]

      defaa{3.5}
      defbb{2}
      pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}

      draw[thick, tangent=0.07] (0,0) ellipse [x radius=aa,y radius=bb];

      path coordinate (c) at (0,0)
      coordinate (d) at (-focus,0);
      fill (c) circle (2pt)
      (d) circle (2pt);

      fill (tangent point-1) circle [radius=2pt];
      draw [red, name path=rd] (tangent point-1) -- (d);
      draw [use tangent] (2,0) -- (-2,0);
      draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);

      fill [red, name intersections={of={rd and parallel}}] (intersection-1) circle [radius=2pt];
      end{tikzpicture}

      end{document}





      share|improve this answer


























      • @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

        – daleif
        Apr 10 '13 at 13:42











      • @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

        – daleif
        Apr 10 '13 at 14:04











      • @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

        – Jake
        Apr 10 '13 at 14:08











      • @jake that is it, takes a bit you get ones head twisted through that one.

        – daleif
        Apr 10 '13 at 14:10






      • 1





        Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

        – Alain Matthes
        Apr 10 '13 at 17:08














      12












      12








      12







      Here's a way of accomplishing this using the approach from How to draw tangent line of an arbitrary point on a path in TikZ





      documentclass[border=5mm]{standalone}
      usepackage{tikz}
      usetikzlibrary{calc, decorations.markings, intersections}
      begin{document}
      begin{tikzpicture}[
      tangent/.style={
      decoration={
      markings,% switch on markings
      mark=
      at position #1
      with
      {
      coordinate (tangent point-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
      coordinate (tangent unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
      coordinate (tangent orthogonal unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
      }
      },
      postaction=decorate
      },
      use tangent/.style={
      shift=(tangent point-#1),
      x=(tangent unit vector-#1),
      y=(tangent orthogonal unit vector-#1)
      },
      use tangent/.default=1
      ]

      defaa{3.5}
      defbb{2}
      pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}

      draw[thick, tangent=0.07] (0,0) ellipse [x radius=aa,y radius=bb];

      path coordinate (c) at (0,0)
      coordinate (d) at (-focus,0);
      fill (c) circle (2pt)
      (d) circle (2pt);

      fill (tangent point-1) circle [radius=2pt];
      draw [red, name path=rd] (tangent point-1) -- (d);
      draw [use tangent] (2,0) -- (-2,0);
      draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);

      fill [red, name intersections={of={rd and parallel}}] (intersection-1) circle [radius=2pt];
      end{tikzpicture}

      end{document}





      share|improve this answer















      Here's a way of accomplishing this using the approach from How to draw tangent line of an arbitrary point on a path in TikZ





      documentclass[border=5mm]{standalone}
      usepackage{tikz}
      usetikzlibrary{calc, decorations.markings, intersections}
      begin{document}
      begin{tikzpicture}[
      tangent/.style={
      decoration={
      markings,% switch on markings
      mark=
      at position #1
      with
      {
      coordinate (tangent point-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
      coordinate (tangent unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
      coordinate (tangent orthogonal unit vector-pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
      }
      },
      postaction=decorate
      },
      use tangent/.style={
      shift=(tangent point-#1),
      x=(tangent unit vector-#1),
      y=(tangent orthogonal unit vector-#1)
      },
      use tangent/.default=1
      ]

      defaa{3.5}
      defbb{2}
      pgfmathsetmacro{focus}{sqrt(aa*aa-bb*bb)}

      draw[thick, tangent=0.07] (0,0) ellipse [x radius=aa,y radius=bb];

      path coordinate (c) at (0,0)
      coordinate (d) at (-focus,0);
      fill (c) circle (2pt)
      (d) circle (2pt);

      fill (tangent point-1) circle [radius=2pt];
      draw [red, name path=rd] (tangent point-1) -- (d);
      draw [use tangent] (2,0) -- (-2,0);
      draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);

      fill [red, name intersections={of={rd and parallel}}] (intersection-1) circle [radius=2pt];
      end{tikzpicture}

      end{document}






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Apr 13 '17 at 12:34









      Community

      1




      1










      answered Apr 10 '13 at 11:48









      JakeJake

      195k24653762




      195k24653762













      • @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

        – daleif
        Apr 10 '13 at 13:42











      • @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

        – daleif
        Apr 10 '13 at 14:04











      • @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

        – Jake
        Apr 10 '13 at 14:08











      • @jake that is it, takes a bit you get ones head twisted through that one.

        – daleif
        Apr 10 '13 at 14:10






      • 1





        Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

        – Alain Matthes
        Apr 10 '13 at 17:08



















      • @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

        – daleif
        Apr 10 '13 at 13:42











      • @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

        – daleif
        Apr 10 '13 at 14:04











      • @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

        – Jake
        Apr 10 '13 at 14:08











      • @jake that is it, takes a bit you get ones head twisted through that one.

        – daleif
        Apr 10 '13 at 14:10






      • 1





        Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

        – Alain Matthes
        Apr 10 '13 at 17:08

















      @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

      – daleif
      Apr 10 '13 at 13:42





      @jake: do you mind explaining the last draw command? I cannot figure out why that ends up going through (c)? Replacing (c) with (0,0) does not give the correct answer.

      – daleif
      Apr 10 '13 at 13:42













      @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

      – daleif
      Apr 10 '13 at 14:04





      @jake, I know, but I do not understand why it ends up at (c) instead of (tangent point-1)

      – daleif
      Apr 10 '13 at 14:04













      @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

      – Jake
      Apr 10 '13 at 14:08





      @daleif: We are talking about draw [use tangent, red, name path=parallel] (c) ++(2,0) -- +(-4,0);, right? The line goes through (c) because nodes do not get transformed by the coordinate transformation (so while (0,0) is at a different place if we use use tangent, (c) is still at the same place).

      – Jake
      Apr 10 '13 at 14:08













      @jake that is it, takes a bit you get ones head twisted through that one.

      – daleif
      Apr 10 '13 at 14:10





      @jake that is it, takes a bit you get ones head twisted through that one.

      – daleif
      Apr 10 '13 at 14:10




      1




      1





      Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

      – Alain Matthes
      Apr 10 '13 at 17:08





      Very interesting, I discover with your answer the /pgf/decoration/mark info/sequence number and how to use it

      – Alain Matthes
      Apr 10 '13 at 17:08











      7














      enter image description here



      And Asymptote version, ellipse.asy along with a translation to tikz via svg



      size(300);
      void Dot(... pair[] p){ // function takes a variable number of arguments
      for(int i=0;i<p.length;++i){
      fill(shift(p[i])*scale(0.06)*unitcircle,black);
      fill(shift(p[i])*scale(0.04)*unitcircle,white);
      }
      }
      real a=2.5, b=2, focus=sqrt(a*a-b*b);
      pair c=(0,0), d=(-focus,0);
      path el=ellipse(c,a,b);
      path tline=rotate(36)*(c--(2a,0));
      real tr=intersect(el,tline)[0];
      pair r=point(el,tr);
      pair tan_dir=dir(el,tr);
      path tan_line=scale(b)*(-tan_dir--tan_dir);
      pair w=intersectionpoint(d--r,shift(c)*tan_line);

      pen linePen=darkblue+1.2pt;
      pen elPen=red+1.5pt;

      draw(el,elPen); draw(d--r,linePen);
      draw(shift(r)*tan_line,linePen);
      draw(shift(c)*tan_line,linePen);
      Dot(c,d,r,w);
      label("$C$",c,NE);label("$D$",d,NW);
      label("$R$",r,NE);label("$W$",w,S);


      run asy ellipse.asy to get ellipse.eps or asy -f pdf ellipse.asy to get ellipse.pdf.
      Or put it inside the asy environment in a LaTeX document (see texdoc asymptote).



      Edit: Some comments added.



      A user defined function to draw a list of dots, to be used later as Dot(c,d,r,w);:



      void Dot(... pair[] p){ //  function takes a variable number of arguments
      for(int i=0;i<p.length;++i){
      fill(shift(p[i])*scale(0.06)*unitcircle,black);
      fill(shift(p[i])*scale(0.04)*unitcircle,white);
      }
      }


      The function Dot is defined with ... pair[] p construction, that means
      it is able to accept a variable number of arguments, all of them will be placed
      in an array of pairs (2D coordinates) p[].



      real a=2.5, b=2, focus=sqrt(a*a-b*b);


      defines dimensions.



      pair c=(0,0), d=(-focus,0);


      defines points c and d by x,y coordinates.



      path el=ellipse(c,a,b);


      defines a curve (ellipse outline) to be used later;



      path tline=rotate(36)*(c--(2a,0));


      defines a straight line as a rotated by 36 degrees horizontal line c--(2a,0)



      real tr=intersect(el,tline)[0];


      defines a so-called intersection time, a parameter t for the path el, which
      corresponds to the point of intersection of tline with the ellipse outline el.



      pair r=point(el,tr);


      define the point of intersection itself.



      pair tan_dir=dir(el,tr);


      defines a tangent direction at the point r (at time tr).



      path tan_line=scale(b)*(-tan_dir--tan_dir);


      defines a line through the origin parallel to the tangent.



      pair w=intersectionpoint(d--r,shift(c)*tan_line);


      defines an intersection point of interest, between the line d--r
      and a line parallel to the tangent through the origin (point c).



      pen linePen=darkblue+1.2pt;
      pen elPen=red+1.5pt;


      defined are pens (color and width) to be used for lines and ellipse



      draw(el,elPen); draw(d--r,linePen);


      draw the ellipse and the line d--r



      draw(shift(r)*tan_line,linePen);
      draw(shift(c)*tan_line,linePen);


      draw two parallel lines through points r and c, using defined function Dot.



      Dot(c,d,r,w);


      draw fancy dots at all four points c,d,r,w.



      label("$C$",c,NE);label("$D$",d,NW);
      label("$R$",r,NE);label("$W$",w,S);


      and finally, draw labels, formatted as a (La)TeX string (e.g. "$C$")
      at specified position (e.g. ,c), oriented as specified (e.d. NE means to the North-West of the point).



      Edit2: tikz translation added



      Thanks to Harish Kumar for his answer [here][2], I've just installed inkscape2tikz from [source][3] and after running asy -f svg ellipse.asy svg2tikz ellipse.svg > ellipse.tex here it is a LaTeX document with tikz solution, translated from the ellipse.asy code shown above:



      documentclass{article}
      usepackage[utf8]{inputenc}
      usepackage{tikz}

      begin{document}
      definecolor{cff0000}{RGB}{255,0,0}
      definecolor{c000040}{RGB}{0,0,64}
      definecolor{cffffff}{RGB}{255,255,255}


      begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
      begin{scope}[cm={{0.996,0.0,0.0,0.996,(0.0,0.0)}}]
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[draw=cff0000,line join=round,line cap=round,miter limit=10.04,line
      width=1.200pt] (75.2812,0.0000) .. controls (75.2812,-33.2613) and
      (41.5767,-60.2250) .. (0.0000,-60.2250) .. controls (-41.5767,-60.2250) and
      (-75.2812,-33.2613) .. (-75.2812,-0.0000) .. controls (-75.2812,33.2613) and
      (-41.5767,60.2250) .. (0.0000,60.2250) .. controls (41.5767,60.2250) and
      (75.2812,33.2613) .. (75.2812,0.0000) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
      width=0.960pt] (-45.1687,-0.0000) -- (55.7293,-40.4897);
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
      width=0.960pt] (100.9330,-0.6942) -- (10.5257,-80.2853);
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
      width=0.960pt] (45.2036,39.7955) -- (-45.2036,-39.7955);
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=black] (1.8068,0.0000) .. controls (1.8068,-0.9978) and
      (0.9978,-1.8068) .. (0.0000,-1.8068) .. controls (-0.9978,-1.8068) and
      (-1.8068,-0.9978) .. (-1.8068,-0.0000) .. controls (-1.8068,0.9978) and
      (-0.9978,1.8068) .. (0.0000,1.8068) .. controls (0.9978,1.8068) and
      (1.8068,0.9978) .. (1.8068,0.0000) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=cffffff] (1.2045,0.0000) .. controls (1.2045,-0.6652) and
      (0.6652,-1.2045) .. (0.0000,-1.2045) .. controls (-0.6652,-1.2045) and
      (-1.2045,-0.6652) .. (-1.2045,-0.0000) .. controls (-1.2045,0.6652) and
      (-0.6652,1.2045) .. (0.0000,1.2045) .. controls (0.6652,1.2045) and
      (1.2045,0.6652) .. (1.2045,0.0000) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=black] (-43.3620,-0.0000) .. controls (-43.3620,-0.9978) and
      (-44.1709,-1.8068) .. (-45.1687,-1.8068) .. controls (-46.1666,-1.8068) and
      (-46.9755,-0.9978) .. (-46.9755,-0.0000) .. controls (-46.9755,0.9978) and
      (-46.1666,1.8068) .. (-45.1687,1.8068) .. controls (-44.1709,1.8068) and
      (-43.3620,0.9978) .. (-43.3620,-0.0000) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=cffffff] (-43.9642,-0.0000) .. controls (-43.9642,-0.6652) and
      (-44.5035,-1.2045) .. (-45.1687,-1.2045) .. controls (-45.8340,-1.2045) and
      (-46.3732,-0.6652) .. (-46.3732,-0.0000) .. controls (-46.3732,0.6652) and
      (-45.8340,1.2045) .. (-45.1687,1.2045) .. controls (-44.5035,1.2045) and
      (-43.9642,0.6652) .. (-43.9642,-0.0000) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=black] (57.5361,-40.4897) .. controls (57.5361,-41.4876) and
      (56.7272,-42.2965) .. (55.7293,-42.2965) .. controls (54.7315,-42.2965) and
      (53.9226,-41.4876) .. (53.9226,-40.4897) .. controls (53.9226,-39.4919) and
      (54.7315,-38.6830) .. (55.7293,-38.6830) .. controls (56.7272,-38.6830) and
      (57.5361,-39.4919) .. (57.5361,-40.4897) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=cffffff] (56.9338,-40.4897) .. controls (56.9338,-41.1550) and
      (56.3946,-41.6942) .. (55.7293,-41.6942) .. controls (55.0641,-41.6942) and
      (54.5248,-41.1550) .. (54.5248,-40.4897) .. controls (54.5248,-39.8245) and
      (55.0641,-39.2852) .. (55.7293,-39.2852) .. controls (56.3946,-39.2852) and
      (56.9338,-39.8245) .. (56.9338,-40.4897) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=black] (-12.3358,-12.4506) .. controls (-12.3358,-13.4484) and
      (-13.1447,-14.2573) .. (-14.1426,-14.2573) .. controls (-15.1404,-14.2573) and
      (-15.9493,-13.4484) .. (-15.9493,-12.4506) .. controls (-15.9493,-11.4528) and
      (-15.1404,-10.6438) .. (-14.1426,-10.6438) .. controls (-13.1447,-10.6438) and
      (-12.3358,-11.4528) .. (-12.3358,-12.4506) -- cycle;
      end{scope}
      begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
      path[fill=cffffff] (-12.9381,-12.4506) .. controls (-12.9381,-13.1158) and
      (-13.4774,-13.6551) .. (-14.1426,-13.6551) .. controls (-14.8078,-13.6551) and
      (-15.3471,-13.1158) .. (-15.3471,-12.4506) .. controls (-15.3471,-11.7854) and
      (-14.8078,-11.2461) .. (-14.1426,-11.2461) .. controls (-13.4774,-11.2461) and
      (-12.9381,-11.7854) .. (-12.9381,-12.4506) -- cycle;
      end{scope}
      begin{scope}[shift={(209.733,171.904)}]
      path (8.9640,-8.3400) .. controls (8.9640,-8.4480) and (8.8800,-8.4480) ..
      (8.8560,-8.4480) .. controls (8.8320,-8.4480) and (8.7840,-8.4480) ..
      (8.6880,-8.3280) -- (7.8600,-7.3200) .. controls (7.4400,-8.0400) and
      (6.7800,-8.4480) .. (5.8800,-8.4480) .. controls (3.2880,-8.4480) and
      (0.6000,-5.8200) .. (0.6000,-3.0000) .. controls (0.6000,-0.9960) and
      (2.0040,0.2520) .. (3.7560,0.2520) .. controls (4.7160,0.2520) and
      (5.5560,-0.1560) .. (6.2520,-0.7440) .. controls (7.2960,-1.6200) and
      (7.6080,-2.7840) .. (7.6080,-2.8800) .. controls (7.6080,-2.9880) and
      (7.5120,-2.9880) .. (7.4760,-2.9880) .. controls (7.3680,-2.9880) and
      (7.3560,-2.9160) .. (7.3320,-2.8680) .. controls (6.7800,-0.9960) and
      (5.1600,-0.0960) .. (3.9600,-0.0960) .. controls (2.6880,-0.0960) and
      (1.5840,-0.9120) .. (1.5840,-2.6160) .. controls (1.5840,-3.0000) and
      (1.7040,-5.0880) .. (3.0600,-6.6600) .. controls (3.7200,-7.4280) and
      (4.8480,-8.1000) .. (5.9880,-8.1000) .. controls (7.3080,-8.1000) and
      (7.8960,-7.0080) .. (7.8960,-5.7840) .. controls (7.8960,-5.4720) and
      (7.8600,-5.2080) .. (7.8600,-5.1600) .. controls (7.8600,-5.0520) and
      (7.9800,-5.0520) .. (8.0160,-5.0520) .. controls (8.1480,-5.0520) and
      (8.1600,-5.0640) .. (8.2080,-5.2800) -- (8.9640,-8.3400) -- cycle;
      end{scope}
      begin{scope}[shift={(149.391,171.904)}]
      path (1.8840,-0.8880) .. controls (1.7760,-0.4680) and (1.7520,-0.3480) ..
      (0.9120,-0.3480) .. controls (0.6840,-0.3480) and (0.5640,-0.3480) ..
      (0.5640,-0.1320) .. controls (0.5640,0.0000) and (0.6360,0.0000) ..
      (0.8760,0.0000) -- (4.6800,0.0000) .. controls (7.1040,0.0000) and
      (9.4680,-2.5080) .. (9.4680,-5.1840) .. controls (9.4680,-6.9120) and
      (8.4360,-8.1960) .. (6.7200,-8.1960) -- (2.8680,-8.1960) .. controls
      (2.6400,-8.1960) and (2.5320,-8.1960) .. (2.5320,-7.9680) .. controls
      (2.5320,-7.8480) and (2.6400,-7.8480) .. (2.8200,-7.8480) .. controls
      (3.5520,-7.8480) and (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls
      (3.5520,-7.5960) and (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880)
      -- cycle(4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
      (5.0400,-7.8480) -- (6.3600,-7.8480) .. controls (7.4880,-7.8480) and
      (8.5200,-7.2360) .. (8.5200,-5.5800) .. controls (8.5200,-4.9800) and
      (8.2800,-2.8920) .. (7.1160,-1.5720) .. controls (6.7800,-1.1760) and
      (5.8680,-0.3480) .. (4.4880,-0.3480) -- (3.1200,-0.3480) .. controls
      (2.9520,-0.3480) and (2.9280,-0.3480) .. (2.8560,-0.3600) .. controls
      (2.7240,-0.3720) and (2.7120,-0.3960) .. (2.7120,-0.4920) .. controls
      (2.7120,-0.5760) and (2.7360,-0.6480) .. (2.7600,-0.7560) -- (4.4160,-7.3800)
      -- cycle;
      end{scope}
      begin{scope}[shift={(265.462,131.415)}]
      path (4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
      (5.0400,-7.8480) -- (5.9040,-7.8480) .. controls (6.9360,-7.8480) and
      (7.7040,-7.5360) .. (7.7040,-6.6000) .. controls (7.7040,-5.9880) and
      (7.3920,-4.2240) .. (4.9800,-4.2240) -- (3.6240,-4.2240) -- (4.4160,-7.3800)
      -- cycle(6.0840,-4.0800) .. controls (7.5720,-4.4040) and (8.7360,-5.3640) ..
      (8.7360,-6.3960) .. controls (8.7360,-7.3320) and (7.7880,-8.1960) ..
      (6.1200,-8.1960) -- (2.8680,-8.1960) .. controls (2.6280,-8.1960) and
      (2.5200,-8.1960) .. (2.5200,-7.9680) .. controls (2.5200,-7.8480) and
      (2.6040,-7.8480) .. (2.8320,-7.8480) .. controls (3.5520,-7.8480) and
      (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls (3.5520,-7.5960) and
      (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880) .. controls
      (1.7760,-0.4680) and (1.7520,-0.3480) .. (0.9240,-0.3480) .. controls
      (0.6480,-0.3480) and (0.5640,-0.3480) .. (0.5640,-0.1200) .. controls
      (0.5640,0.0000) and (0.6960,0.0000) .. (0.7320,0.0000) .. controls
      (0.9480,0.0000) and (1.2000,-0.0240) .. (1.4280,-0.0240) -- (2.8440,-0.0240)
      .. controls (3.0600,-0.0240) and (3.3120,0.0000) .. (3.5280,0.0000) ..
      controls (3.6240,0.0000) and (3.7560,0.0000) .. (3.7560,-0.2280) .. controls
      (3.7560,-0.3480) and (3.6480,-0.3480) .. (3.4680,-0.3480) .. controls
      (2.7360,-0.3480) and (2.7360,-0.4440) .. (2.7360,-0.5640) .. controls
      (2.7360,-0.5760) and (2.7360,-0.6600) .. (2.7600,-0.7560) -- (3.5640,-3.9840)
      -- (5.0040,-3.9840) .. controls (6.1440,-3.9840) and (6.3600,-3.2640) ..
      (6.3600,-2.8680) .. controls (6.3600,-2.6880) and (6.2400,-2.2200) ..
      (6.1560,-1.9080) .. controls (6.0240,-1.3560) and (5.9880,-1.2240) ..
      (5.9880,-0.9960) .. controls (5.9880,-0.1440) and (6.6840,0.2520) ..
      (7.4880,0.2520) .. controls (8.4600,0.2520) and (8.8800,-0.9360) ..
      (8.8800,-1.1040) .. controls (8.8800,-1.1880) and (8.8200,-1.2240) ..
      (8.7480,-1.2240) .. controls (8.6520,-1.2240) and (8.6280,-1.1520) ..
      (8.6040,-1.0560) .. controls (8.3160,-0.2040) and (7.8240,0.0120) ..
      (7.5240,0.0120) .. controls (7.2240,0.0120) and (7.0320,-0.1200) ..
      (7.0320,-0.6600) .. controls (7.0320,-0.9480) and (7.1760,-2.0400) ..
      (7.1880,-2.1000) .. controls (7.2480,-2.5440) and (7.2480,-2.5920) ..
      (7.2480,-2.6880) .. controls (7.2480,-3.5640) and (6.5400,-3.9360) ..
      (6.0840,-4.0800) -- cycle;
      end{scope}
      begin{scope}[shift={(186.682,173.799)}]
      path (10.8360,-6.8640) .. controls (11.1120,-7.3320) and (11.3760,-7.7760) ..
      (12.0960,-7.8480) .. controls (12.2040,-7.8600) and (12.3120,-7.8720) ..
      (12.3120,-8.0640) .. controls (12.3120,-8.1960) and (12.2040,-8.1960) ..
      (12.1680,-8.1960) .. controls (12.1440,-8.1960) and (12.0600,-8.1720) ..
      (11.2680,-8.1720) .. controls (10.9080,-8.1720) and (10.5360,-8.1960) ..
      (10.1880,-8.1960) .. controls (10.1160,-8.1960) and (9.9720,-8.1960) ..
      (9.9720,-7.9680) .. controls (9.9720,-7.8600) and (10.0680,-7.8480) ..
      (10.1400,-7.8480) .. controls (10.3800,-7.8360) and (10.7640,-7.7640) ..
      (10.7640,-7.3920) .. controls (10.7640,-7.2360) and (10.7160,-7.1520) ..
      (10.5960,-6.9480) -- (7.3200,-1.2120) -- (6.8880,-7.4640) .. controls
      (6.8880,-7.6080) and (7.0200,-7.8360) .. (7.6920,-7.8480) .. controls
      (7.8480,-7.8480) and (7.9680,-7.8480) .. (7.9680,-8.0760) .. controls
      (7.9680,-8.1960) and (7.8480,-8.1960) .. (7.7880,-8.1960) .. controls
      (7.3680,-8.1960) and (6.9240,-8.1720) .. (6.4920,-8.1720) -- (5.8680,-8.1720)
      .. controls (5.6880,-8.1720) and (5.4720,-8.1960) .. (5.2920,-8.1960) ..
      controls (5.2200,-8.1960) and (5.0760,-8.1960) .. (5.0760,-7.9680) .. controls
      (5.0760,-7.8480) and (5.1600,-7.8480) .. (5.3640,-7.8480) .. controls
      (5.9160,-7.8480) and (5.9160,-7.8360) .. (5.9640,-7.1040) -- (6.0000,-6.6720)
      -- (2.8920,-1.2120) -- (2.4480,-7.4040) .. controls (2.4480,-7.5360) and
      (2.4480,-7.8360) .. (3.2640,-7.8480) .. controls (3.3960,-7.8480) and
      (3.5280,-7.8480) .. (3.5280,-8.0640) .. controls (3.5280,-8.1960) and
      (3.4200,-8.1960) .. (3.3480,-8.1960) .. controls (2.9280,-8.1960) and
      (2.4840,-8.1720) .. (2.0520,-8.1720) -- (1.4280,-8.1720) .. controls
      (1.2480,-8.1720) and (1.0320,-8.1960) .. (0.8520,-8.1960) .. controls
      (0.7800,-8.1960) and (0.6360,-8.1960) .. (0.6360,-7.9680) .. controls
      (0.6360,-7.8480) and (0.7320,-7.8480) .. (0.9000,-7.8480) .. controls
      (1.4640,-7.8480) and (1.4760,-7.7760) .. (1.5000,-7.3920) -- (2.0280,-0.0240)
      .. controls (2.0400,0.1800) and (2.0520,0.2520) .. (2.1960,0.2520) .. controls
      (2.3160,0.2520) and (2.3400,0.2040) .. (2.4480,0.0240) -- (6.0240,-6.2280) --
      (6.4680,-0.0240) .. controls (6.4800,0.1800) and (6.4920,0.2520) ..
      (6.6360,0.2520) .. controls (6.7560,0.2520) and (6.7920,0.1920) ..
      (6.8880,0.0240) -- (10.8360,-6.8640) -- cycle;
      end{scope}
      end{scope}

      end{tikzpicture}
      end{document}


      The graphics looks fine, but the labels vanished somehow.






      share|improve this answer






























        7














        enter image description here



        And Asymptote version, ellipse.asy along with a translation to tikz via svg



        size(300);
        void Dot(... pair[] p){ // function takes a variable number of arguments
        for(int i=0;i<p.length;++i){
        fill(shift(p[i])*scale(0.06)*unitcircle,black);
        fill(shift(p[i])*scale(0.04)*unitcircle,white);
        }
        }
        real a=2.5, b=2, focus=sqrt(a*a-b*b);
        pair c=(0,0), d=(-focus,0);
        path el=ellipse(c,a,b);
        path tline=rotate(36)*(c--(2a,0));
        real tr=intersect(el,tline)[0];
        pair r=point(el,tr);
        pair tan_dir=dir(el,tr);
        path tan_line=scale(b)*(-tan_dir--tan_dir);
        pair w=intersectionpoint(d--r,shift(c)*tan_line);

        pen linePen=darkblue+1.2pt;
        pen elPen=red+1.5pt;

        draw(el,elPen); draw(d--r,linePen);
        draw(shift(r)*tan_line,linePen);
        draw(shift(c)*tan_line,linePen);
        Dot(c,d,r,w);
        label("$C$",c,NE);label("$D$",d,NW);
        label("$R$",r,NE);label("$W$",w,S);


        run asy ellipse.asy to get ellipse.eps or asy -f pdf ellipse.asy to get ellipse.pdf.
        Or put it inside the asy environment in a LaTeX document (see texdoc asymptote).



        Edit: Some comments added.



        A user defined function to draw a list of dots, to be used later as Dot(c,d,r,w);:



        void Dot(... pair[] p){ //  function takes a variable number of arguments
        for(int i=0;i<p.length;++i){
        fill(shift(p[i])*scale(0.06)*unitcircle,black);
        fill(shift(p[i])*scale(0.04)*unitcircle,white);
        }
        }


        The function Dot is defined with ... pair[] p construction, that means
        it is able to accept a variable number of arguments, all of them will be placed
        in an array of pairs (2D coordinates) p[].



        real a=2.5, b=2, focus=sqrt(a*a-b*b);


        defines dimensions.



        pair c=(0,0), d=(-focus,0);


        defines points c and d by x,y coordinates.



        path el=ellipse(c,a,b);


        defines a curve (ellipse outline) to be used later;



        path tline=rotate(36)*(c--(2a,0));


        defines a straight line as a rotated by 36 degrees horizontal line c--(2a,0)



        real tr=intersect(el,tline)[0];


        defines a so-called intersection time, a parameter t for the path el, which
        corresponds to the point of intersection of tline with the ellipse outline el.



        pair r=point(el,tr);


        define the point of intersection itself.



        pair tan_dir=dir(el,tr);


        defines a tangent direction at the point r (at time tr).



        path tan_line=scale(b)*(-tan_dir--tan_dir);


        defines a line through the origin parallel to the tangent.



        pair w=intersectionpoint(d--r,shift(c)*tan_line);


        defines an intersection point of interest, between the line d--r
        and a line parallel to the tangent through the origin (point c).



        pen linePen=darkblue+1.2pt;
        pen elPen=red+1.5pt;


        defined are pens (color and width) to be used for lines and ellipse



        draw(el,elPen); draw(d--r,linePen);


        draw the ellipse and the line d--r



        draw(shift(r)*tan_line,linePen);
        draw(shift(c)*tan_line,linePen);


        draw two parallel lines through points r and c, using defined function Dot.



        Dot(c,d,r,w);


        draw fancy dots at all four points c,d,r,w.



        label("$C$",c,NE);label("$D$",d,NW);
        label("$R$",r,NE);label("$W$",w,S);


        and finally, draw labels, formatted as a (La)TeX string (e.g. "$C$")
        at specified position (e.g. ,c), oriented as specified (e.d. NE means to the North-West of the point).



        Edit2: tikz translation added



        Thanks to Harish Kumar for his answer [here][2], I've just installed inkscape2tikz from [source][3] and after running asy -f svg ellipse.asy svg2tikz ellipse.svg > ellipse.tex here it is a LaTeX document with tikz solution, translated from the ellipse.asy code shown above:



        documentclass{article}
        usepackage[utf8]{inputenc}
        usepackage{tikz}

        begin{document}
        definecolor{cff0000}{RGB}{255,0,0}
        definecolor{c000040}{RGB}{0,0,64}
        definecolor{cffffff}{RGB}{255,255,255}


        begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
        begin{scope}[cm={{0.996,0.0,0.0,0.996,(0.0,0.0)}}]
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[draw=cff0000,line join=round,line cap=round,miter limit=10.04,line
        width=1.200pt] (75.2812,0.0000) .. controls (75.2812,-33.2613) and
        (41.5767,-60.2250) .. (0.0000,-60.2250) .. controls (-41.5767,-60.2250) and
        (-75.2812,-33.2613) .. (-75.2812,-0.0000) .. controls (-75.2812,33.2613) and
        (-41.5767,60.2250) .. (0.0000,60.2250) .. controls (41.5767,60.2250) and
        (75.2812,33.2613) .. (75.2812,0.0000) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
        width=0.960pt] (-45.1687,-0.0000) -- (55.7293,-40.4897);
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
        width=0.960pt] (100.9330,-0.6942) -- (10.5257,-80.2853);
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
        width=0.960pt] (45.2036,39.7955) -- (-45.2036,-39.7955);
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=black] (1.8068,0.0000) .. controls (1.8068,-0.9978) and
        (0.9978,-1.8068) .. (0.0000,-1.8068) .. controls (-0.9978,-1.8068) and
        (-1.8068,-0.9978) .. (-1.8068,-0.0000) .. controls (-1.8068,0.9978) and
        (-0.9978,1.8068) .. (0.0000,1.8068) .. controls (0.9978,1.8068) and
        (1.8068,0.9978) .. (1.8068,0.0000) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=cffffff] (1.2045,0.0000) .. controls (1.2045,-0.6652) and
        (0.6652,-1.2045) .. (0.0000,-1.2045) .. controls (-0.6652,-1.2045) and
        (-1.2045,-0.6652) .. (-1.2045,-0.0000) .. controls (-1.2045,0.6652) and
        (-0.6652,1.2045) .. (0.0000,1.2045) .. controls (0.6652,1.2045) and
        (1.2045,0.6652) .. (1.2045,0.0000) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=black] (-43.3620,-0.0000) .. controls (-43.3620,-0.9978) and
        (-44.1709,-1.8068) .. (-45.1687,-1.8068) .. controls (-46.1666,-1.8068) and
        (-46.9755,-0.9978) .. (-46.9755,-0.0000) .. controls (-46.9755,0.9978) and
        (-46.1666,1.8068) .. (-45.1687,1.8068) .. controls (-44.1709,1.8068) and
        (-43.3620,0.9978) .. (-43.3620,-0.0000) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=cffffff] (-43.9642,-0.0000) .. controls (-43.9642,-0.6652) and
        (-44.5035,-1.2045) .. (-45.1687,-1.2045) .. controls (-45.8340,-1.2045) and
        (-46.3732,-0.6652) .. (-46.3732,-0.0000) .. controls (-46.3732,0.6652) and
        (-45.8340,1.2045) .. (-45.1687,1.2045) .. controls (-44.5035,1.2045) and
        (-43.9642,0.6652) .. (-43.9642,-0.0000) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=black] (57.5361,-40.4897) .. controls (57.5361,-41.4876) and
        (56.7272,-42.2965) .. (55.7293,-42.2965) .. controls (54.7315,-42.2965) and
        (53.9226,-41.4876) .. (53.9226,-40.4897) .. controls (53.9226,-39.4919) and
        (54.7315,-38.6830) .. (55.7293,-38.6830) .. controls (56.7272,-38.6830) and
        (57.5361,-39.4919) .. (57.5361,-40.4897) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=cffffff] (56.9338,-40.4897) .. controls (56.9338,-41.1550) and
        (56.3946,-41.6942) .. (55.7293,-41.6942) .. controls (55.0641,-41.6942) and
        (54.5248,-41.1550) .. (54.5248,-40.4897) .. controls (54.5248,-39.8245) and
        (55.0641,-39.2852) .. (55.7293,-39.2852) .. controls (56.3946,-39.2852) and
        (56.9338,-39.8245) .. (56.9338,-40.4897) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=black] (-12.3358,-12.4506) .. controls (-12.3358,-13.4484) and
        (-13.1447,-14.2573) .. (-14.1426,-14.2573) .. controls (-15.1404,-14.2573) and
        (-15.9493,-13.4484) .. (-15.9493,-12.4506) .. controls (-15.9493,-11.4528) and
        (-15.1404,-10.6438) .. (-14.1426,-10.6438) .. controls (-13.1447,-10.6438) and
        (-12.3358,-11.4528) .. (-12.3358,-12.4506) -- cycle;
        end{scope}
        begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
        path[fill=cffffff] (-12.9381,-12.4506) .. controls (-12.9381,-13.1158) and
        (-13.4774,-13.6551) .. (-14.1426,-13.6551) .. controls (-14.8078,-13.6551) and
        (-15.3471,-13.1158) .. (-15.3471,-12.4506) .. controls (-15.3471,-11.7854) and
        (-14.8078,-11.2461) .. (-14.1426,-11.2461) .. controls (-13.4774,-11.2461) and
        (-12.9381,-11.7854) .. (-12.9381,-12.4506) -- cycle;
        end{scope}
        begin{scope}[shift={(209.733,171.904)}]
        path (8.9640,-8.3400) .. controls (8.9640,-8.4480) and (8.8800,-8.4480) ..
        (8.8560,-8.4480) .. controls (8.8320,-8.4480) and (8.7840,-8.4480) ..
        (8.6880,-8.3280) -- (7.8600,-7.3200) .. controls (7.4400,-8.0400) and
        (6.7800,-8.4480) .. (5.8800,-8.4480) .. controls (3.2880,-8.4480) and
        (0.6000,-5.8200) .. (0.6000,-3.0000) .. controls (0.6000,-0.9960) and
        (2.0040,0.2520) .. (3.7560,0.2520) .. controls (4.7160,0.2520) and
        (5.5560,-0.1560) .. (6.2520,-0.7440) .. controls (7.2960,-1.6200) and
        (7.6080,-2.7840) .. (7.6080,-2.8800) .. controls (7.6080,-2.9880) and
        (7.5120,-2.9880) .. (7.4760,-2.9880) .. controls (7.3680,-2.9880) and
        (7.3560,-2.9160) .. (7.3320,-2.8680) .. controls (6.7800,-0.9960) and
        (5.1600,-0.0960) .. (3.9600,-0.0960) .. controls (2.6880,-0.0960) and
        (1.5840,-0.9120) .. (1.5840,-2.6160) .. controls (1.5840,-3.0000) and
        (1.7040,-5.0880) .. (3.0600,-6.6600) .. controls (3.7200,-7.4280) and
        (4.8480,-8.1000) .. (5.9880,-8.1000) .. controls (7.3080,-8.1000) and
        (7.8960,-7.0080) .. (7.8960,-5.7840) .. controls (7.8960,-5.4720) and
        (7.8600,-5.2080) .. (7.8600,-5.1600) .. controls (7.8600,-5.0520) and
        (7.9800,-5.0520) .. (8.0160,-5.0520) .. controls (8.1480,-5.0520) and
        (8.1600,-5.0640) .. (8.2080,-5.2800) -- (8.9640,-8.3400) -- cycle;
        end{scope}
        begin{scope}[shift={(149.391,171.904)}]
        path (1.8840,-0.8880) .. controls (1.7760,-0.4680) and (1.7520,-0.3480) ..
        (0.9120,-0.3480) .. controls (0.6840,-0.3480) and (0.5640,-0.3480) ..
        (0.5640,-0.1320) .. controls (0.5640,0.0000) and (0.6360,0.0000) ..
        (0.8760,0.0000) -- (4.6800,0.0000) .. controls (7.1040,0.0000) and
        (9.4680,-2.5080) .. (9.4680,-5.1840) .. controls (9.4680,-6.9120) and
        (8.4360,-8.1960) .. (6.7200,-8.1960) -- (2.8680,-8.1960) .. controls
        (2.6400,-8.1960) and (2.5320,-8.1960) .. (2.5320,-7.9680) .. controls
        (2.5320,-7.8480) and (2.6400,-7.8480) .. (2.8200,-7.8480) .. controls
        (3.5520,-7.8480) and (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls
        (3.5520,-7.5960) and (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880)
        -- cycle(4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
        (5.0400,-7.8480) -- (6.3600,-7.8480) .. controls (7.4880,-7.8480) and
        (8.5200,-7.2360) .. (8.5200,-5.5800) .. controls (8.5200,-4.9800) and
        (8.2800,-2.8920) .. (7.1160,-1.5720) .. controls (6.7800,-1.1760) and
        (5.8680,-0.3480) .. (4.4880,-0.3480) -- (3.1200,-0.3480) .. controls
        (2.9520,-0.3480) and (2.9280,-0.3480) .. (2.8560,-0.3600) .. controls
        (2.7240,-0.3720) and (2.7120,-0.3960) .. (2.7120,-0.4920) .. controls
        (2.7120,-0.5760) and (2.7360,-0.6480) .. (2.7600,-0.7560) -- (4.4160,-7.3800)
        -- cycle;
        end{scope}
        begin{scope}[shift={(265.462,131.415)}]
        path (4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
        (5.0400,-7.8480) -- (5.9040,-7.8480) .. controls (6.9360,-7.8480) and
        (7.7040,-7.5360) .. (7.7040,-6.6000) .. controls (7.7040,-5.9880) and
        (7.3920,-4.2240) .. (4.9800,-4.2240) -- (3.6240,-4.2240) -- (4.4160,-7.3800)
        -- cycle(6.0840,-4.0800) .. controls (7.5720,-4.4040) and (8.7360,-5.3640) ..
        (8.7360,-6.3960) .. controls (8.7360,-7.3320) and (7.7880,-8.1960) ..
        (6.1200,-8.1960) -- (2.8680,-8.1960) .. controls (2.6280,-8.1960) and
        (2.5200,-8.1960) .. (2.5200,-7.9680) .. controls (2.5200,-7.8480) and
        (2.6040,-7.8480) .. (2.8320,-7.8480) .. controls (3.5520,-7.8480) and
        (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls (3.5520,-7.5960) and
        (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880) .. controls
        (1.7760,-0.4680) and (1.7520,-0.3480) .. (0.9240,-0.3480) .. controls
        (0.6480,-0.3480) and (0.5640,-0.3480) .. (0.5640,-0.1200) .. controls
        (0.5640,0.0000) and (0.6960,0.0000) .. (0.7320,0.0000) .. controls
        (0.9480,0.0000) and (1.2000,-0.0240) .. (1.4280,-0.0240) -- (2.8440,-0.0240)
        .. controls (3.0600,-0.0240) and (3.3120,0.0000) .. (3.5280,0.0000) ..
        controls (3.6240,0.0000) and (3.7560,0.0000) .. (3.7560,-0.2280) .. controls
        (3.7560,-0.3480) and (3.6480,-0.3480) .. (3.4680,-0.3480) .. controls
        (2.7360,-0.3480) and (2.7360,-0.4440) .. (2.7360,-0.5640) .. controls
        (2.7360,-0.5760) and (2.7360,-0.6600) .. (2.7600,-0.7560) -- (3.5640,-3.9840)
        -- (5.0040,-3.9840) .. controls (6.1440,-3.9840) and (6.3600,-3.2640) ..
        (6.3600,-2.8680) .. controls (6.3600,-2.6880) and (6.2400,-2.2200) ..
        (6.1560,-1.9080) .. controls (6.0240,-1.3560) and (5.9880,-1.2240) ..
        (5.9880,-0.9960) .. controls (5.9880,-0.1440) and (6.6840,0.2520) ..
        (7.4880,0.2520) .. controls (8.4600,0.2520) and (8.8800,-0.9360) ..
        (8.8800,-1.1040) .. controls (8.8800,-1.1880) and (8.8200,-1.2240) ..
        (8.7480,-1.2240) .. controls (8.6520,-1.2240) and (8.6280,-1.1520) ..
        (8.6040,-1.0560) .. controls (8.3160,-0.2040) and (7.8240,0.0120) ..
        (7.5240,0.0120) .. controls (7.2240,0.0120) and (7.0320,-0.1200) ..
        (7.0320,-0.6600) .. controls (7.0320,-0.9480) and (7.1760,-2.0400) ..
        (7.1880,-2.1000) .. controls (7.2480,-2.5440) and (7.2480,-2.5920) ..
        (7.2480,-2.6880) .. controls (7.2480,-3.5640) and (6.5400,-3.9360) ..
        (6.0840,-4.0800) -- cycle;
        end{scope}
        begin{scope}[shift={(186.682,173.799)}]
        path (10.8360,-6.8640) .. controls (11.1120,-7.3320) and (11.3760,-7.7760) ..
        (12.0960,-7.8480) .. controls (12.2040,-7.8600) and (12.3120,-7.8720) ..
        (12.3120,-8.0640) .. controls (12.3120,-8.1960) and (12.2040,-8.1960) ..
        (12.1680,-8.1960) .. controls (12.1440,-8.1960) and (12.0600,-8.1720) ..
        (11.2680,-8.1720) .. controls (10.9080,-8.1720) and (10.5360,-8.1960) ..
        (10.1880,-8.1960) .. controls (10.1160,-8.1960) and (9.9720,-8.1960) ..
        (9.9720,-7.9680) .. controls (9.9720,-7.8600) and (10.0680,-7.8480) ..
        (10.1400,-7.8480) .. controls (10.3800,-7.8360) and (10.7640,-7.7640) ..
        (10.7640,-7.3920) .. controls (10.7640,-7.2360) and (10.7160,-7.1520) ..
        (10.5960,-6.9480) -- (7.3200,-1.2120) -- (6.8880,-7.4640) .. controls
        (6.8880,-7.6080) and (7.0200,-7.8360) .. (7.6920,-7.8480) .. controls
        (7.8480,-7.8480) and (7.9680,-7.8480) .. (7.9680,-8.0760) .. controls
        (7.9680,-8.1960) and (7.8480,-8.1960) .. (7.7880,-8.1960) .. controls
        (7.3680,-8.1960) and (6.9240,-8.1720) .. (6.4920,-8.1720) -- (5.8680,-8.1720)
        .. controls (5.6880,-8.1720) and (5.4720,-8.1960) .. (5.2920,-8.1960) ..
        controls (5.2200,-8.1960) and (5.0760,-8.1960) .. (5.0760,-7.9680) .. controls
        (5.0760,-7.8480) and (5.1600,-7.8480) .. (5.3640,-7.8480) .. controls
        (5.9160,-7.8480) and (5.9160,-7.8360) .. (5.9640,-7.1040) -- (6.0000,-6.6720)
        -- (2.8920,-1.2120) -- (2.4480,-7.4040) .. controls (2.4480,-7.5360) and
        (2.4480,-7.8360) .. (3.2640,-7.8480) .. controls (3.3960,-7.8480) and
        (3.5280,-7.8480) .. (3.5280,-8.0640) .. controls (3.5280,-8.1960) and
        (3.4200,-8.1960) .. (3.3480,-8.1960) .. controls (2.9280,-8.1960) and
        (2.4840,-8.1720) .. (2.0520,-8.1720) -- (1.4280,-8.1720) .. controls
        (1.2480,-8.1720) and (1.0320,-8.1960) .. (0.8520,-8.1960) .. controls
        (0.7800,-8.1960) and (0.6360,-8.1960) .. (0.6360,-7.9680) .. controls
        (0.6360,-7.8480) and (0.7320,-7.8480) .. (0.9000,-7.8480) .. controls
        (1.4640,-7.8480) and (1.4760,-7.7760) .. (1.5000,-7.3920) -- (2.0280,-0.0240)
        .. controls (2.0400,0.1800) and (2.0520,0.2520) .. (2.1960,0.2520) .. controls
        (2.3160,0.2520) and (2.3400,0.2040) .. (2.4480,0.0240) -- (6.0240,-6.2280) --
        (6.4680,-0.0240) .. controls (6.4800,0.1800) and (6.4920,0.2520) ..
        (6.6360,0.2520) .. controls (6.7560,0.2520) and (6.7920,0.1920) ..
        (6.8880,0.0240) -- (10.8360,-6.8640) -- cycle;
        end{scope}
        end{scope}

        end{tikzpicture}
        end{document}


        The graphics looks fine, but the labels vanished somehow.






        share|improve this answer




























          7












          7








          7







          enter image description here



          And Asymptote version, ellipse.asy along with a translation to tikz via svg



          size(300);
          void Dot(... pair[] p){ // function takes a variable number of arguments
          for(int i=0;i<p.length;++i){
          fill(shift(p[i])*scale(0.06)*unitcircle,black);
          fill(shift(p[i])*scale(0.04)*unitcircle,white);
          }
          }
          real a=2.5, b=2, focus=sqrt(a*a-b*b);
          pair c=(0,0), d=(-focus,0);
          path el=ellipse(c,a,b);
          path tline=rotate(36)*(c--(2a,0));
          real tr=intersect(el,tline)[0];
          pair r=point(el,tr);
          pair tan_dir=dir(el,tr);
          path tan_line=scale(b)*(-tan_dir--tan_dir);
          pair w=intersectionpoint(d--r,shift(c)*tan_line);

          pen linePen=darkblue+1.2pt;
          pen elPen=red+1.5pt;

          draw(el,elPen); draw(d--r,linePen);
          draw(shift(r)*tan_line,linePen);
          draw(shift(c)*tan_line,linePen);
          Dot(c,d,r,w);
          label("$C$",c,NE);label("$D$",d,NW);
          label("$R$",r,NE);label("$W$",w,S);


          run asy ellipse.asy to get ellipse.eps or asy -f pdf ellipse.asy to get ellipse.pdf.
          Or put it inside the asy environment in a LaTeX document (see texdoc asymptote).



          Edit: Some comments added.



          A user defined function to draw a list of dots, to be used later as Dot(c,d,r,w);:



          void Dot(... pair[] p){ //  function takes a variable number of arguments
          for(int i=0;i<p.length;++i){
          fill(shift(p[i])*scale(0.06)*unitcircle,black);
          fill(shift(p[i])*scale(0.04)*unitcircle,white);
          }
          }


          The function Dot is defined with ... pair[] p construction, that means
          it is able to accept a variable number of arguments, all of them will be placed
          in an array of pairs (2D coordinates) p[].



          real a=2.5, b=2, focus=sqrt(a*a-b*b);


          defines dimensions.



          pair c=(0,0), d=(-focus,0);


          defines points c and d by x,y coordinates.



          path el=ellipse(c,a,b);


          defines a curve (ellipse outline) to be used later;



          path tline=rotate(36)*(c--(2a,0));


          defines a straight line as a rotated by 36 degrees horizontal line c--(2a,0)



          real tr=intersect(el,tline)[0];


          defines a so-called intersection time, a parameter t for the path el, which
          corresponds to the point of intersection of tline with the ellipse outline el.



          pair r=point(el,tr);


          define the point of intersection itself.



          pair tan_dir=dir(el,tr);


          defines a tangent direction at the point r (at time tr).



          path tan_line=scale(b)*(-tan_dir--tan_dir);


          defines a line through the origin parallel to the tangent.



          pair w=intersectionpoint(d--r,shift(c)*tan_line);


          defines an intersection point of interest, between the line d--r
          and a line parallel to the tangent through the origin (point c).



          pen linePen=darkblue+1.2pt;
          pen elPen=red+1.5pt;


          defined are pens (color and width) to be used for lines and ellipse



          draw(el,elPen); draw(d--r,linePen);


          draw the ellipse and the line d--r



          draw(shift(r)*tan_line,linePen);
          draw(shift(c)*tan_line,linePen);


          draw two parallel lines through points r and c, using defined function Dot.



          Dot(c,d,r,w);


          draw fancy dots at all four points c,d,r,w.



          label("$C$",c,NE);label("$D$",d,NW);
          label("$R$",r,NE);label("$W$",w,S);


          and finally, draw labels, formatted as a (La)TeX string (e.g. "$C$")
          at specified position (e.g. ,c), oriented as specified (e.d. NE means to the North-West of the point).



          Edit2: tikz translation added



          Thanks to Harish Kumar for his answer [here][2], I've just installed inkscape2tikz from [source][3] and after running asy -f svg ellipse.asy svg2tikz ellipse.svg > ellipse.tex here it is a LaTeX document with tikz solution, translated from the ellipse.asy code shown above:



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage{tikz}

          begin{document}
          definecolor{cff0000}{RGB}{255,0,0}
          definecolor{c000040}{RGB}{0,0,64}
          definecolor{cffffff}{RGB}{255,255,255}


          begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
          begin{scope}[cm={{0.996,0.0,0.0,0.996,(0.0,0.0)}}]
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=cff0000,line join=round,line cap=round,miter limit=10.04,line
          width=1.200pt] (75.2812,0.0000) .. controls (75.2812,-33.2613) and
          (41.5767,-60.2250) .. (0.0000,-60.2250) .. controls (-41.5767,-60.2250) and
          (-75.2812,-33.2613) .. (-75.2812,-0.0000) .. controls (-75.2812,33.2613) and
          (-41.5767,60.2250) .. (0.0000,60.2250) .. controls (41.5767,60.2250) and
          (75.2812,33.2613) .. (75.2812,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (-45.1687,-0.0000) -- (55.7293,-40.4897);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (100.9330,-0.6942) -- (10.5257,-80.2853);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (45.2036,39.7955) -- (-45.2036,-39.7955);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (1.8068,0.0000) .. controls (1.8068,-0.9978) and
          (0.9978,-1.8068) .. (0.0000,-1.8068) .. controls (-0.9978,-1.8068) and
          (-1.8068,-0.9978) .. (-1.8068,-0.0000) .. controls (-1.8068,0.9978) and
          (-0.9978,1.8068) .. (0.0000,1.8068) .. controls (0.9978,1.8068) and
          (1.8068,0.9978) .. (1.8068,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (1.2045,0.0000) .. controls (1.2045,-0.6652) and
          (0.6652,-1.2045) .. (0.0000,-1.2045) .. controls (-0.6652,-1.2045) and
          (-1.2045,-0.6652) .. (-1.2045,-0.0000) .. controls (-1.2045,0.6652) and
          (-0.6652,1.2045) .. (0.0000,1.2045) .. controls (0.6652,1.2045) and
          (1.2045,0.6652) .. (1.2045,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (-43.3620,-0.0000) .. controls (-43.3620,-0.9978) and
          (-44.1709,-1.8068) .. (-45.1687,-1.8068) .. controls (-46.1666,-1.8068) and
          (-46.9755,-0.9978) .. (-46.9755,-0.0000) .. controls (-46.9755,0.9978) and
          (-46.1666,1.8068) .. (-45.1687,1.8068) .. controls (-44.1709,1.8068) and
          (-43.3620,0.9978) .. (-43.3620,-0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (-43.9642,-0.0000) .. controls (-43.9642,-0.6652) and
          (-44.5035,-1.2045) .. (-45.1687,-1.2045) .. controls (-45.8340,-1.2045) and
          (-46.3732,-0.6652) .. (-46.3732,-0.0000) .. controls (-46.3732,0.6652) and
          (-45.8340,1.2045) .. (-45.1687,1.2045) .. controls (-44.5035,1.2045) and
          (-43.9642,0.6652) .. (-43.9642,-0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (57.5361,-40.4897) .. controls (57.5361,-41.4876) and
          (56.7272,-42.2965) .. (55.7293,-42.2965) .. controls (54.7315,-42.2965) and
          (53.9226,-41.4876) .. (53.9226,-40.4897) .. controls (53.9226,-39.4919) and
          (54.7315,-38.6830) .. (55.7293,-38.6830) .. controls (56.7272,-38.6830) and
          (57.5361,-39.4919) .. (57.5361,-40.4897) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (56.9338,-40.4897) .. controls (56.9338,-41.1550) and
          (56.3946,-41.6942) .. (55.7293,-41.6942) .. controls (55.0641,-41.6942) and
          (54.5248,-41.1550) .. (54.5248,-40.4897) .. controls (54.5248,-39.8245) and
          (55.0641,-39.2852) .. (55.7293,-39.2852) .. controls (56.3946,-39.2852) and
          (56.9338,-39.8245) .. (56.9338,-40.4897) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (-12.3358,-12.4506) .. controls (-12.3358,-13.4484) and
          (-13.1447,-14.2573) .. (-14.1426,-14.2573) .. controls (-15.1404,-14.2573) and
          (-15.9493,-13.4484) .. (-15.9493,-12.4506) .. controls (-15.9493,-11.4528) and
          (-15.1404,-10.6438) .. (-14.1426,-10.6438) .. controls (-13.1447,-10.6438) and
          (-12.3358,-11.4528) .. (-12.3358,-12.4506) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (-12.9381,-12.4506) .. controls (-12.9381,-13.1158) and
          (-13.4774,-13.6551) .. (-14.1426,-13.6551) .. controls (-14.8078,-13.6551) and
          (-15.3471,-13.1158) .. (-15.3471,-12.4506) .. controls (-15.3471,-11.7854) and
          (-14.8078,-11.2461) .. (-14.1426,-11.2461) .. controls (-13.4774,-11.2461) and
          (-12.9381,-11.7854) .. (-12.9381,-12.4506) -- cycle;
          end{scope}
          begin{scope}[shift={(209.733,171.904)}]
          path (8.9640,-8.3400) .. controls (8.9640,-8.4480) and (8.8800,-8.4480) ..
          (8.8560,-8.4480) .. controls (8.8320,-8.4480) and (8.7840,-8.4480) ..
          (8.6880,-8.3280) -- (7.8600,-7.3200) .. controls (7.4400,-8.0400) and
          (6.7800,-8.4480) .. (5.8800,-8.4480) .. controls (3.2880,-8.4480) and
          (0.6000,-5.8200) .. (0.6000,-3.0000) .. controls (0.6000,-0.9960) and
          (2.0040,0.2520) .. (3.7560,0.2520) .. controls (4.7160,0.2520) and
          (5.5560,-0.1560) .. (6.2520,-0.7440) .. controls (7.2960,-1.6200) and
          (7.6080,-2.7840) .. (7.6080,-2.8800) .. controls (7.6080,-2.9880) and
          (7.5120,-2.9880) .. (7.4760,-2.9880) .. controls (7.3680,-2.9880) and
          (7.3560,-2.9160) .. (7.3320,-2.8680) .. controls (6.7800,-0.9960) and
          (5.1600,-0.0960) .. (3.9600,-0.0960) .. controls (2.6880,-0.0960) and
          (1.5840,-0.9120) .. (1.5840,-2.6160) .. controls (1.5840,-3.0000) and
          (1.7040,-5.0880) .. (3.0600,-6.6600) .. controls (3.7200,-7.4280) and
          (4.8480,-8.1000) .. (5.9880,-8.1000) .. controls (7.3080,-8.1000) and
          (7.8960,-7.0080) .. (7.8960,-5.7840) .. controls (7.8960,-5.4720) and
          (7.8600,-5.2080) .. (7.8600,-5.1600) .. controls (7.8600,-5.0520) and
          (7.9800,-5.0520) .. (8.0160,-5.0520) .. controls (8.1480,-5.0520) and
          (8.1600,-5.0640) .. (8.2080,-5.2800) -- (8.9640,-8.3400) -- cycle;
          end{scope}
          begin{scope}[shift={(149.391,171.904)}]
          path (1.8840,-0.8880) .. controls (1.7760,-0.4680) and (1.7520,-0.3480) ..
          (0.9120,-0.3480) .. controls (0.6840,-0.3480) and (0.5640,-0.3480) ..
          (0.5640,-0.1320) .. controls (0.5640,0.0000) and (0.6360,0.0000) ..
          (0.8760,0.0000) -- (4.6800,0.0000) .. controls (7.1040,0.0000) and
          (9.4680,-2.5080) .. (9.4680,-5.1840) .. controls (9.4680,-6.9120) and
          (8.4360,-8.1960) .. (6.7200,-8.1960) -- (2.8680,-8.1960) .. controls
          (2.6400,-8.1960) and (2.5320,-8.1960) .. (2.5320,-7.9680) .. controls
          (2.5320,-7.8480) and (2.6400,-7.8480) .. (2.8200,-7.8480) .. controls
          (3.5520,-7.8480) and (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls
          (3.5520,-7.5960) and (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880)
          -- cycle(4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
          (5.0400,-7.8480) -- (6.3600,-7.8480) .. controls (7.4880,-7.8480) and
          (8.5200,-7.2360) .. (8.5200,-5.5800) .. controls (8.5200,-4.9800) and
          (8.2800,-2.8920) .. (7.1160,-1.5720) .. controls (6.7800,-1.1760) and
          (5.8680,-0.3480) .. (4.4880,-0.3480) -- (3.1200,-0.3480) .. controls
          (2.9520,-0.3480) and (2.9280,-0.3480) .. (2.8560,-0.3600) .. controls
          (2.7240,-0.3720) and (2.7120,-0.3960) .. (2.7120,-0.4920) .. controls
          (2.7120,-0.5760) and (2.7360,-0.6480) .. (2.7600,-0.7560) -- (4.4160,-7.3800)
          -- cycle;
          end{scope}
          begin{scope}[shift={(265.462,131.415)}]
          path (4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
          (5.0400,-7.8480) -- (5.9040,-7.8480) .. controls (6.9360,-7.8480) and
          (7.7040,-7.5360) .. (7.7040,-6.6000) .. controls (7.7040,-5.9880) and
          (7.3920,-4.2240) .. (4.9800,-4.2240) -- (3.6240,-4.2240) -- (4.4160,-7.3800)
          -- cycle(6.0840,-4.0800) .. controls (7.5720,-4.4040) and (8.7360,-5.3640) ..
          (8.7360,-6.3960) .. controls (8.7360,-7.3320) and (7.7880,-8.1960) ..
          (6.1200,-8.1960) -- (2.8680,-8.1960) .. controls (2.6280,-8.1960) and
          (2.5200,-8.1960) .. (2.5200,-7.9680) .. controls (2.5200,-7.8480) and
          (2.6040,-7.8480) .. (2.8320,-7.8480) .. controls (3.5520,-7.8480) and
          (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls (3.5520,-7.5960) and
          (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880) .. controls
          (1.7760,-0.4680) and (1.7520,-0.3480) .. (0.9240,-0.3480) .. controls
          (0.6480,-0.3480) and (0.5640,-0.3480) .. (0.5640,-0.1200) .. controls
          (0.5640,0.0000) and (0.6960,0.0000) .. (0.7320,0.0000) .. controls
          (0.9480,0.0000) and (1.2000,-0.0240) .. (1.4280,-0.0240) -- (2.8440,-0.0240)
          .. controls (3.0600,-0.0240) and (3.3120,0.0000) .. (3.5280,0.0000) ..
          controls (3.6240,0.0000) and (3.7560,0.0000) .. (3.7560,-0.2280) .. controls
          (3.7560,-0.3480) and (3.6480,-0.3480) .. (3.4680,-0.3480) .. controls
          (2.7360,-0.3480) and (2.7360,-0.4440) .. (2.7360,-0.5640) .. controls
          (2.7360,-0.5760) and (2.7360,-0.6600) .. (2.7600,-0.7560) -- (3.5640,-3.9840)
          -- (5.0040,-3.9840) .. controls (6.1440,-3.9840) and (6.3600,-3.2640) ..
          (6.3600,-2.8680) .. controls (6.3600,-2.6880) and (6.2400,-2.2200) ..
          (6.1560,-1.9080) .. controls (6.0240,-1.3560) and (5.9880,-1.2240) ..
          (5.9880,-0.9960) .. controls (5.9880,-0.1440) and (6.6840,0.2520) ..
          (7.4880,0.2520) .. controls (8.4600,0.2520) and (8.8800,-0.9360) ..
          (8.8800,-1.1040) .. controls (8.8800,-1.1880) and (8.8200,-1.2240) ..
          (8.7480,-1.2240) .. controls (8.6520,-1.2240) and (8.6280,-1.1520) ..
          (8.6040,-1.0560) .. controls (8.3160,-0.2040) and (7.8240,0.0120) ..
          (7.5240,0.0120) .. controls (7.2240,0.0120) and (7.0320,-0.1200) ..
          (7.0320,-0.6600) .. controls (7.0320,-0.9480) and (7.1760,-2.0400) ..
          (7.1880,-2.1000) .. controls (7.2480,-2.5440) and (7.2480,-2.5920) ..
          (7.2480,-2.6880) .. controls (7.2480,-3.5640) and (6.5400,-3.9360) ..
          (6.0840,-4.0800) -- cycle;
          end{scope}
          begin{scope}[shift={(186.682,173.799)}]
          path (10.8360,-6.8640) .. controls (11.1120,-7.3320) and (11.3760,-7.7760) ..
          (12.0960,-7.8480) .. controls (12.2040,-7.8600) and (12.3120,-7.8720) ..
          (12.3120,-8.0640) .. controls (12.3120,-8.1960) and (12.2040,-8.1960) ..
          (12.1680,-8.1960) .. controls (12.1440,-8.1960) and (12.0600,-8.1720) ..
          (11.2680,-8.1720) .. controls (10.9080,-8.1720) and (10.5360,-8.1960) ..
          (10.1880,-8.1960) .. controls (10.1160,-8.1960) and (9.9720,-8.1960) ..
          (9.9720,-7.9680) .. controls (9.9720,-7.8600) and (10.0680,-7.8480) ..
          (10.1400,-7.8480) .. controls (10.3800,-7.8360) and (10.7640,-7.7640) ..
          (10.7640,-7.3920) .. controls (10.7640,-7.2360) and (10.7160,-7.1520) ..
          (10.5960,-6.9480) -- (7.3200,-1.2120) -- (6.8880,-7.4640) .. controls
          (6.8880,-7.6080) and (7.0200,-7.8360) .. (7.6920,-7.8480) .. controls
          (7.8480,-7.8480) and (7.9680,-7.8480) .. (7.9680,-8.0760) .. controls
          (7.9680,-8.1960) and (7.8480,-8.1960) .. (7.7880,-8.1960) .. controls
          (7.3680,-8.1960) and (6.9240,-8.1720) .. (6.4920,-8.1720) -- (5.8680,-8.1720)
          .. controls (5.6880,-8.1720) and (5.4720,-8.1960) .. (5.2920,-8.1960) ..
          controls (5.2200,-8.1960) and (5.0760,-8.1960) .. (5.0760,-7.9680) .. controls
          (5.0760,-7.8480) and (5.1600,-7.8480) .. (5.3640,-7.8480) .. controls
          (5.9160,-7.8480) and (5.9160,-7.8360) .. (5.9640,-7.1040) -- (6.0000,-6.6720)
          -- (2.8920,-1.2120) -- (2.4480,-7.4040) .. controls (2.4480,-7.5360) and
          (2.4480,-7.8360) .. (3.2640,-7.8480) .. controls (3.3960,-7.8480) and
          (3.5280,-7.8480) .. (3.5280,-8.0640) .. controls (3.5280,-8.1960) and
          (3.4200,-8.1960) .. (3.3480,-8.1960) .. controls (2.9280,-8.1960) and
          (2.4840,-8.1720) .. (2.0520,-8.1720) -- (1.4280,-8.1720) .. controls
          (1.2480,-8.1720) and (1.0320,-8.1960) .. (0.8520,-8.1960) .. controls
          (0.7800,-8.1960) and (0.6360,-8.1960) .. (0.6360,-7.9680) .. controls
          (0.6360,-7.8480) and (0.7320,-7.8480) .. (0.9000,-7.8480) .. controls
          (1.4640,-7.8480) and (1.4760,-7.7760) .. (1.5000,-7.3920) -- (2.0280,-0.0240)
          .. controls (2.0400,0.1800) and (2.0520,0.2520) .. (2.1960,0.2520) .. controls
          (2.3160,0.2520) and (2.3400,0.2040) .. (2.4480,0.0240) -- (6.0240,-6.2280) --
          (6.4680,-0.0240) .. controls (6.4800,0.1800) and (6.4920,0.2520) ..
          (6.6360,0.2520) .. controls (6.7560,0.2520) and (6.7920,0.1920) ..
          (6.8880,0.0240) -- (10.8360,-6.8640) -- cycle;
          end{scope}
          end{scope}

          end{tikzpicture}
          end{document}


          The graphics looks fine, but the labels vanished somehow.






          share|improve this answer















          enter image description here



          And Asymptote version, ellipse.asy along with a translation to tikz via svg



          size(300);
          void Dot(... pair[] p){ // function takes a variable number of arguments
          for(int i=0;i<p.length;++i){
          fill(shift(p[i])*scale(0.06)*unitcircle,black);
          fill(shift(p[i])*scale(0.04)*unitcircle,white);
          }
          }
          real a=2.5, b=2, focus=sqrt(a*a-b*b);
          pair c=(0,0), d=(-focus,0);
          path el=ellipse(c,a,b);
          path tline=rotate(36)*(c--(2a,0));
          real tr=intersect(el,tline)[0];
          pair r=point(el,tr);
          pair tan_dir=dir(el,tr);
          path tan_line=scale(b)*(-tan_dir--tan_dir);
          pair w=intersectionpoint(d--r,shift(c)*tan_line);

          pen linePen=darkblue+1.2pt;
          pen elPen=red+1.5pt;

          draw(el,elPen); draw(d--r,linePen);
          draw(shift(r)*tan_line,linePen);
          draw(shift(c)*tan_line,linePen);
          Dot(c,d,r,w);
          label("$C$",c,NE);label("$D$",d,NW);
          label("$R$",r,NE);label("$W$",w,S);


          run asy ellipse.asy to get ellipse.eps or asy -f pdf ellipse.asy to get ellipse.pdf.
          Or put it inside the asy environment in a LaTeX document (see texdoc asymptote).



          Edit: Some comments added.



          A user defined function to draw a list of dots, to be used later as Dot(c,d,r,w);:



          void Dot(... pair[] p){ //  function takes a variable number of arguments
          for(int i=0;i<p.length;++i){
          fill(shift(p[i])*scale(0.06)*unitcircle,black);
          fill(shift(p[i])*scale(0.04)*unitcircle,white);
          }
          }


          The function Dot is defined with ... pair[] p construction, that means
          it is able to accept a variable number of arguments, all of them will be placed
          in an array of pairs (2D coordinates) p[].



          real a=2.5, b=2, focus=sqrt(a*a-b*b);


          defines dimensions.



          pair c=(0,0), d=(-focus,0);


          defines points c and d by x,y coordinates.



          path el=ellipse(c,a,b);


          defines a curve (ellipse outline) to be used later;



          path tline=rotate(36)*(c--(2a,0));


          defines a straight line as a rotated by 36 degrees horizontal line c--(2a,0)



          real tr=intersect(el,tline)[0];


          defines a so-called intersection time, a parameter t for the path el, which
          corresponds to the point of intersection of tline with the ellipse outline el.



          pair r=point(el,tr);


          define the point of intersection itself.



          pair tan_dir=dir(el,tr);


          defines a tangent direction at the point r (at time tr).



          path tan_line=scale(b)*(-tan_dir--tan_dir);


          defines a line through the origin parallel to the tangent.



          pair w=intersectionpoint(d--r,shift(c)*tan_line);


          defines an intersection point of interest, between the line d--r
          and a line parallel to the tangent through the origin (point c).



          pen linePen=darkblue+1.2pt;
          pen elPen=red+1.5pt;


          defined are pens (color and width) to be used for lines and ellipse



          draw(el,elPen); draw(d--r,linePen);


          draw the ellipse and the line d--r



          draw(shift(r)*tan_line,linePen);
          draw(shift(c)*tan_line,linePen);


          draw two parallel lines through points r and c, using defined function Dot.



          Dot(c,d,r,w);


          draw fancy dots at all four points c,d,r,w.



          label("$C$",c,NE);label("$D$",d,NW);
          label("$R$",r,NE);label("$W$",w,S);


          and finally, draw labels, formatted as a (La)TeX string (e.g. "$C$")
          at specified position (e.g. ,c), oriented as specified (e.d. NE means to the North-West of the point).



          Edit2: tikz translation added



          Thanks to Harish Kumar for his answer [here][2], I've just installed inkscape2tikz from [source][3] and after running asy -f svg ellipse.asy svg2tikz ellipse.svg > ellipse.tex here it is a LaTeX document with tikz solution, translated from the ellipse.asy code shown above:



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage{tikz}

          begin{document}
          definecolor{cff0000}{RGB}{255,0,0}
          definecolor{c000040}{RGB}{0,0,64}
          definecolor{cffffff}{RGB}{255,255,255}


          begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
          begin{scope}[cm={{0.996,0.0,0.0,0.996,(0.0,0.0)}}]
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=cff0000,line join=round,line cap=round,miter limit=10.04,line
          width=1.200pt] (75.2812,0.0000) .. controls (75.2812,-33.2613) and
          (41.5767,-60.2250) .. (0.0000,-60.2250) .. controls (-41.5767,-60.2250) and
          (-75.2812,-33.2613) .. (-75.2812,-0.0000) .. controls (-75.2812,33.2613) and
          (-41.5767,60.2250) .. (0.0000,60.2250) .. controls (41.5767,60.2250) and
          (75.2812,33.2613) .. (75.2812,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (-45.1687,-0.0000) -- (55.7293,-40.4897);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (100.9330,-0.6942) -- (10.5257,-80.2853);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[draw=c000040,line join=round,line cap=round,miter limit=10.04,line
          width=0.960pt] (45.2036,39.7955) -- (-45.2036,-39.7955);
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (1.8068,0.0000) .. controls (1.8068,-0.9978) and
          (0.9978,-1.8068) .. (0.0000,-1.8068) .. controls (-0.9978,-1.8068) and
          (-1.8068,-0.9978) .. (-1.8068,-0.0000) .. controls (-1.8068,0.9978) and
          (-0.9978,1.8068) .. (0.0000,1.8068) .. controls (0.9978,1.8068) and
          (1.8068,0.9978) .. (1.8068,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (1.2045,0.0000) .. controls (1.2045,-0.6652) and
          (0.6652,-1.2045) .. (0.0000,-1.2045) .. controls (-0.6652,-1.2045) and
          (-1.2045,-0.6652) .. (-1.2045,-0.0000) .. controls (-1.2045,0.6652) and
          (-0.6652,1.2045) .. (0.0000,1.2045) .. controls (0.6652,1.2045) and
          (1.2045,0.6652) .. (1.2045,0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (-43.3620,-0.0000) .. controls (-43.3620,-0.9978) and
          (-44.1709,-1.8068) .. (-45.1687,-1.8068) .. controls (-46.1666,-1.8068) and
          (-46.9755,-0.9978) .. (-46.9755,-0.0000) .. controls (-46.9755,0.9978) and
          (-46.1666,1.8068) .. (-45.1687,1.8068) .. controls (-44.1709,1.8068) and
          (-43.3620,0.9978) .. (-43.3620,-0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (-43.9642,-0.0000) .. controls (-43.9642,-0.6652) and
          (-44.5035,-1.2045) .. (-45.1687,-1.2045) .. controls (-45.8340,-1.2045) and
          (-46.3732,-0.6652) .. (-46.3732,-0.0000) .. controls (-46.3732,0.6652) and
          (-45.8340,1.2045) .. (-45.1687,1.2045) .. controls (-44.5035,1.2045) and
          (-43.9642,0.6652) .. (-43.9642,-0.0000) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (57.5361,-40.4897) .. controls (57.5361,-41.4876) and
          (56.7272,-42.2965) .. (55.7293,-42.2965) .. controls (54.7315,-42.2965) and
          (53.9226,-41.4876) .. (53.9226,-40.4897) .. controls (53.9226,-39.4919) and
          (54.7315,-38.6830) .. (55.7293,-38.6830) .. controls (56.7272,-38.6830) and
          (57.5361,-39.4919) .. (57.5361,-40.4897) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (56.9338,-40.4897) .. controls (56.9338,-41.1550) and
          (56.3946,-41.6942) .. (55.7293,-41.6942) .. controls (55.0641,-41.6942) and
          (54.5248,-41.1550) .. (54.5248,-40.4897) .. controls (54.5248,-39.8245) and
          (55.0641,-39.2852) .. (55.7293,-39.2852) .. controls (56.3946,-39.2852) and
          (56.9338,-39.8245) .. (56.9338,-40.4897) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=black] (-12.3358,-12.4506) .. controls (-12.3358,-13.4484) and
          (-13.1447,-14.2573) .. (-14.1426,-14.2573) .. controls (-15.1404,-14.2573) and
          (-15.9493,-13.4484) .. (-15.9493,-12.4506) .. controls (-15.9493,-11.4528) and
          (-15.1404,-10.6438) .. (-14.1426,-10.6438) .. controls (-13.1447,-10.6438) and
          (-12.3358,-11.4528) .. (-12.3358,-12.4506) -- cycle;
          end{scope}
          begin{scope}[cm={{1.0,0.0,0.0,1.0,(207.183,174.51)}}]
          path[fill=cffffff] (-12.9381,-12.4506) .. controls (-12.9381,-13.1158) and
          (-13.4774,-13.6551) .. (-14.1426,-13.6551) .. controls (-14.8078,-13.6551) and
          (-15.3471,-13.1158) .. (-15.3471,-12.4506) .. controls (-15.3471,-11.7854) and
          (-14.8078,-11.2461) .. (-14.1426,-11.2461) .. controls (-13.4774,-11.2461) and
          (-12.9381,-11.7854) .. (-12.9381,-12.4506) -- cycle;
          end{scope}
          begin{scope}[shift={(209.733,171.904)}]
          path (8.9640,-8.3400) .. controls (8.9640,-8.4480) and (8.8800,-8.4480) ..
          (8.8560,-8.4480) .. controls (8.8320,-8.4480) and (8.7840,-8.4480) ..
          (8.6880,-8.3280) -- (7.8600,-7.3200) .. controls (7.4400,-8.0400) and
          (6.7800,-8.4480) .. (5.8800,-8.4480) .. controls (3.2880,-8.4480) and
          (0.6000,-5.8200) .. (0.6000,-3.0000) .. controls (0.6000,-0.9960) and
          (2.0040,0.2520) .. (3.7560,0.2520) .. controls (4.7160,0.2520) and
          (5.5560,-0.1560) .. (6.2520,-0.7440) .. controls (7.2960,-1.6200) and
          (7.6080,-2.7840) .. (7.6080,-2.8800) .. controls (7.6080,-2.9880) and
          (7.5120,-2.9880) .. (7.4760,-2.9880) .. controls (7.3680,-2.9880) and
          (7.3560,-2.9160) .. (7.3320,-2.8680) .. controls (6.7800,-0.9960) and
          (5.1600,-0.0960) .. (3.9600,-0.0960) .. controls (2.6880,-0.0960) and
          (1.5840,-0.9120) .. (1.5840,-2.6160) .. controls (1.5840,-3.0000) and
          (1.7040,-5.0880) .. (3.0600,-6.6600) .. controls (3.7200,-7.4280) and
          (4.8480,-8.1000) .. (5.9880,-8.1000) .. controls (7.3080,-8.1000) and
          (7.8960,-7.0080) .. (7.8960,-5.7840) .. controls (7.8960,-5.4720) and
          (7.8600,-5.2080) .. (7.8600,-5.1600) .. controls (7.8600,-5.0520) and
          (7.9800,-5.0520) .. (8.0160,-5.0520) .. controls (8.1480,-5.0520) and
          (8.1600,-5.0640) .. (8.2080,-5.2800) -- (8.9640,-8.3400) -- cycle;
          end{scope}
          begin{scope}[shift={(149.391,171.904)}]
          path (1.8840,-0.8880) .. controls (1.7760,-0.4680) and (1.7520,-0.3480) ..
          (0.9120,-0.3480) .. controls (0.6840,-0.3480) and (0.5640,-0.3480) ..
          (0.5640,-0.1320) .. controls (0.5640,0.0000) and (0.6360,0.0000) ..
          (0.8760,0.0000) -- (4.6800,0.0000) .. controls (7.1040,0.0000) and
          (9.4680,-2.5080) .. (9.4680,-5.1840) .. controls (9.4680,-6.9120) and
          (8.4360,-8.1960) .. (6.7200,-8.1960) -- (2.8680,-8.1960) .. controls
          (2.6400,-8.1960) and (2.5320,-8.1960) .. (2.5320,-7.9680) .. controls
          (2.5320,-7.8480) and (2.6400,-7.8480) .. (2.8200,-7.8480) .. controls
          (3.5520,-7.8480) and (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls
          (3.5520,-7.5960) and (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880)
          -- cycle(4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
          (5.0400,-7.8480) -- (6.3600,-7.8480) .. controls (7.4880,-7.8480) and
          (8.5200,-7.2360) .. (8.5200,-5.5800) .. controls (8.5200,-4.9800) and
          (8.2800,-2.8920) .. (7.1160,-1.5720) .. controls (6.7800,-1.1760) and
          (5.8680,-0.3480) .. (4.4880,-0.3480) -- (3.1200,-0.3480) .. controls
          (2.9520,-0.3480) and (2.9280,-0.3480) .. (2.8560,-0.3600) .. controls
          (2.7240,-0.3720) and (2.7120,-0.3960) .. (2.7120,-0.4920) .. controls
          (2.7120,-0.5760) and (2.7360,-0.6480) .. (2.7600,-0.7560) -- (4.4160,-7.3800)
          -- cycle;
          end{scope}
          begin{scope}[shift={(265.462,131.415)}]
          path (4.4160,-7.3800) .. controls (4.5240,-7.8240) and (4.5720,-7.8480) ..
          (5.0400,-7.8480) -- (5.9040,-7.8480) .. controls (6.9360,-7.8480) and
          (7.7040,-7.5360) .. (7.7040,-6.6000) .. controls (7.7040,-5.9880) and
          (7.3920,-4.2240) .. (4.9800,-4.2240) -- (3.6240,-4.2240) -- (4.4160,-7.3800)
          -- cycle(6.0840,-4.0800) .. controls (7.5720,-4.4040) and (8.7360,-5.3640) ..
          (8.7360,-6.3960) .. controls (8.7360,-7.3320) and (7.7880,-8.1960) ..
          (6.1200,-8.1960) -- (2.8680,-8.1960) .. controls (2.6280,-8.1960) and
          (2.5200,-8.1960) .. (2.5200,-7.9680) .. controls (2.5200,-7.8480) and
          (2.6040,-7.8480) .. (2.8320,-7.8480) .. controls (3.5520,-7.8480) and
          (3.5520,-7.7520) .. (3.5520,-7.6200) .. controls (3.5520,-7.5960) and
          (3.5520,-7.5240) .. (3.5040,-7.3440) -- (1.8840,-0.8880) .. controls
          (1.7760,-0.4680) and (1.7520,-0.3480) .. (0.9240,-0.3480) .. controls
          (0.6480,-0.3480) and (0.5640,-0.3480) .. (0.5640,-0.1200) .. controls
          (0.5640,0.0000) and (0.6960,0.0000) .. (0.7320,0.0000) .. controls
          (0.9480,0.0000) and (1.2000,-0.0240) .. (1.4280,-0.0240) -- (2.8440,-0.0240)
          .. controls (3.0600,-0.0240) and (3.3120,0.0000) .. (3.5280,0.0000) ..
          controls (3.6240,0.0000) and (3.7560,0.0000) .. (3.7560,-0.2280) .. controls
          (3.7560,-0.3480) and (3.6480,-0.3480) .. (3.4680,-0.3480) .. controls
          (2.7360,-0.3480) and (2.7360,-0.4440) .. (2.7360,-0.5640) .. controls
          (2.7360,-0.5760) and (2.7360,-0.6600) .. (2.7600,-0.7560) -- (3.5640,-3.9840)
          -- (5.0040,-3.9840) .. controls (6.1440,-3.9840) and (6.3600,-3.2640) ..
          (6.3600,-2.8680) .. controls (6.3600,-2.6880) and (6.2400,-2.2200) ..
          (6.1560,-1.9080) .. controls (6.0240,-1.3560) and (5.9880,-1.2240) ..
          (5.9880,-0.9960) .. controls (5.9880,-0.1440) and (6.6840,0.2520) ..
          (7.4880,0.2520) .. controls (8.4600,0.2520) and (8.8800,-0.9360) ..
          (8.8800,-1.1040) .. controls (8.8800,-1.1880) and (8.8200,-1.2240) ..
          (8.7480,-1.2240) .. controls (8.6520,-1.2240) and (8.6280,-1.1520) ..
          (8.6040,-1.0560) .. controls (8.3160,-0.2040) and (7.8240,0.0120) ..
          (7.5240,0.0120) .. controls (7.2240,0.0120) and (7.0320,-0.1200) ..
          (7.0320,-0.6600) .. controls (7.0320,-0.9480) and (7.1760,-2.0400) ..
          (7.1880,-2.1000) .. controls (7.2480,-2.5440) and (7.2480,-2.5920) ..
          (7.2480,-2.6880) .. controls (7.2480,-3.5640) and (6.5400,-3.9360) ..
          (6.0840,-4.0800) -- cycle;
          end{scope}
          begin{scope}[shift={(186.682,173.799)}]
          path (10.8360,-6.8640) .. controls (11.1120,-7.3320) and (11.3760,-7.7760) ..
          (12.0960,-7.8480) .. controls (12.2040,-7.8600) and (12.3120,-7.8720) ..
          (12.3120,-8.0640) .. controls (12.3120,-8.1960) and (12.2040,-8.1960) ..
          (12.1680,-8.1960) .. controls (12.1440,-8.1960) and (12.0600,-8.1720) ..
          (11.2680,-8.1720) .. controls (10.9080,-8.1720) and (10.5360,-8.1960) ..
          (10.1880,-8.1960) .. controls (10.1160,-8.1960) and (9.9720,-8.1960) ..
          (9.9720,-7.9680) .. controls (9.9720,-7.8600) and (10.0680,-7.8480) ..
          (10.1400,-7.8480) .. controls (10.3800,-7.8360) and (10.7640,-7.7640) ..
          (10.7640,-7.3920) .. controls (10.7640,-7.2360) and (10.7160,-7.1520) ..
          (10.5960,-6.9480) -- (7.3200,-1.2120) -- (6.8880,-7.4640) .. controls
          (6.8880,-7.6080) and (7.0200,-7.8360) .. (7.6920,-7.8480) .. controls
          (7.8480,-7.8480) and (7.9680,-7.8480) .. (7.9680,-8.0760) .. controls
          (7.9680,-8.1960) and (7.8480,-8.1960) .. (7.7880,-8.1960) .. controls
          (7.3680,-8.1960) and (6.9240,-8.1720) .. (6.4920,-8.1720) -- (5.8680,-8.1720)
          .. controls (5.6880,-8.1720) and (5.4720,-8.1960) .. (5.2920,-8.1960) ..
          controls (5.2200,-8.1960) and (5.0760,-8.1960) .. (5.0760,-7.9680) .. controls
          (5.0760,-7.8480) and (5.1600,-7.8480) .. (5.3640,-7.8480) .. controls
          (5.9160,-7.8480) and (5.9160,-7.8360) .. (5.9640,-7.1040) -- (6.0000,-6.6720)
          -- (2.8920,-1.2120) -- (2.4480,-7.4040) .. controls (2.4480,-7.5360) and
          (2.4480,-7.8360) .. (3.2640,-7.8480) .. controls (3.3960,-7.8480) and
          (3.5280,-7.8480) .. (3.5280,-8.0640) .. controls (3.5280,-8.1960) and
          (3.4200,-8.1960) .. (3.3480,-8.1960) .. controls (2.9280,-8.1960) and
          (2.4840,-8.1720) .. (2.0520,-8.1720) -- (1.4280,-8.1720) .. controls
          (1.2480,-8.1720) and (1.0320,-8.1960) .. (0.8520,-8.1960) .. controls
          (0.7800,-8.1960) and (0.6360,-8.1960) .. (0.6360,-7.9680) .. controls
          (0.6360,-7.8480) and (0.7320,-7.8480) .. (0.9000,-7.8480) .. controls
          (1.4640,-7.8480) and (1.4760,-7.7760) .. (1.5000,-7.3920) -- (2.0280,-0.0240)
          .. controls (2.0400,0.1800) and (2.0520,0.2520) .. (2.1960,0.2520) .. controls
          (2.3160,0.2520) and (2.3400,0.2040) .. (2.4480,0.0240) -- (6.0240,-6.2280) --
          (6.4680,-0.0240) .. controls (6.4800,0.1800) and (6.4920,0.2520) ..
          (6.6360,0.2520) .. controls (6.7560,0.2520) and (6.7920,0.1920) ..
          (6.8880,0.0240) -- (10.8360,-6.8640) -- cycle;
          end{scope}
          end{scope}

          end{tikzpicture}
          end{document}


          The graphics looks fine, but the labels vanished somehow.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 10 '13 at 20:09

























          answered Apr 10 '13 at 15:40









          g.kovg.kov

          17.4k13976




          17.4k13976























              5














              With PSTricks and explanation.



              enter image description here



              documentclass[pstricks,border=12pt]{standalone}
              usepackage{pst-eucl,pst-plot}

              edefA{2}% semi-major
              edefB{1}% semi-minor
              edefCx{3}% center abscissa
              edefCy{3}% center ordinate

              % parametric representation of an ellipse
              edefX(#1){A*cos(#1)+Cx}
              edefY(#1){B*sin(#1)+Cy}

              % the left focus point in RPN notation
              % [-sqrt(A^2-B^2)+Cx,Cy]
              edefF{!Aspace 2 exp Bspace 2 exp sub sqrt neg Cxspace add
              Cy }

              psset{algebraic}

              begin{document}
              begin{pspicture}[showgrid](6,6)
              psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}% plot the ellipse from 0 to 2*pi
              curvepnode{Pi 4 div}{X(t)|Y(t)}{P}% define the point P through which the tangent line passes
              % curvepnode also produces a unit tangent vector named Ptang
              %----------------------------------------------------------------------------------------------
              pnode(Cx,Cy){C}% define the center
              pnode(F){F}% define the focus
              %----------------------------------------------------------------------------------------------
              nodexn{-2(Ptang)+(C)}{S}% vector S = -2 Ptang + C
              nodexn{2(Ptang)+(C)}{T}% vector T = 2 Ptang + C
              %-----------------------------------------------------------------------------------------------
              psline[linecolor=red](S)(T)% draw the line passing through C and parallel to the unit tangent vector
              psxline[linecolor=green](P){(S)-(C)}{(T)-(C)}% draw a line from vector P + S - C to P + T - C
              pcline[nodesep=-1,linecolor=blue](F)(P)% drawn a line from F to P
              pstInterLL[PointName=none]{F}{P}{S}{T}{I}% find the intersection point I between line FP and ST
              psdots(P)(C)(F)% draw the points P, C, F
              end{pspicture}
              end{document}


              Animation



              enter image description here



              documentclass[pstricks,border=12pt]{standalone}
              usepackage{pst-eucl,pst-plot}
              usepackage[nomessages]{fp}

              defX(#1){2*cos(#1)+3}
              defY(#1){sin(#1)+3}
              FPsetN{20}
              FPevalStep{round(2*pi/N:2)}

              psset{algebraic,unit=0.5}

              begin{document}
              multido{n=0.00+Step}{N}{%
              begin{pspicture*}[showgrid=false](6,6)
              psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}
              curvepnode{n}{X(t)|Y(t)}{P}
              pnode(3,3){Q}
              pnode(!3 sqrt neg 3 add 3){F}
              nodexn{-3(Ptang)+(Q)}{A}
              nodexn{3(Ptang)+(Q)}{B}
              psline[linecolor=red](A)(B)
              psxline[linecolor=green](P){(A)-(Q)}{(B)-(Q)}
              pcline[nodesep=-2,linecolor=blue](F)(P)
              pstInterLL[PointName=none]{F}{P}{A}{B}{I}
              psdots(P)(Q)(F)
              end{pspicture*}}
              end{document}





              share|improve this answer






























                5














                With PSTricks and explanation.



                enter image description here



                documentclass[pstricks,border=12pt]{standalone}
                usepackage{pst-eucl,pst-plot}

                edefA{2}% semi-major
                edefB{1}% semi-minor
                edefCx{3}% center abscissa
                edefCy{3}% center ordinate

                % parametric representation of an ellipse
                edefX(#1){A*cos(#1)+Cx}
                edefY(#1){B*sin(#1)+Cy}

                % the left focus point in RPN notation
                % [-sqrt(A^2-B^2)+Cx,Cy]
                edefF{!Aspace 2 exp Bspace 2 exp sub sqrt neg Cxspace add
                Cy }

                psset{algebraic}

                begin{document}
                begin{pspicture}[showgrid](6,6)
                psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}% plot the ellipse from 0 to 2*pi
                curvepnode{Pi 4 div}{X(t)|Y(t)}{P}% define the point P through which the tangent line passes
                % curvepnode also produces a unit tangent vector named Ptang
                %----------------------------------------------------------------------------------------------
                pnode(Cx,Cy){C}% define the center
                pnode(F){F}% define the focus
                %----------------------------------------------------------------------------------------------
                nodexn{-2(Ptang)+(C)}{S}% vector S = -2 Ptang + C
                nodexn{2(Ptang)+(C)}{T}% vector T = 2 Ptang + C
                %-----------------------------------------------------------------------------------------------
                psline[linecolor=red](S)(T)% draw the line passing through C and parallel to the unit tangent vector
                psxline[linecolor=green](P){(S)-(C)}{(T)-(C)}% draw a line from vector P + S - C to P + T - C
                pcline[nodesep=-1,linecolor=blue](F)(P)% drawn a line from F to P
                pstInterLL[PointName=none]{F}{P}{S}{T}{I}% find the intersection point I between line FP and ST
                psdots(P)(C)(F)% draw the points P, C, F
                end{pspicture}
                end{document}


                Animation



                enter image description here



                documentclass[pstricks,border=12pt]{standalone}
                usepackage{pst-eucl,pst-plot}
                usepackage[nomessages]{fp}

                defX(#1){2*cos(#1)+3}
                defY(#1){sin(#1)+3}
                FPsetN{20}
                FPevalStep{round(2*pi/N:2)}

                psset{algebraic,unit=0.5}

                begin{document}
                multido{n=0.00+Step}{N}{%
                begin{pspicture*}[showgrid=false](6,6)
                psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}
                curvepnode{n}{X(t)|Y(t)}{P}
                pnode(3,3){Q}
                pnode(!3 sqrt neg 3 add 3){F}
                nodexn{-3(Ptang)+(Q)}{A}
                nodexn{3(Ptang)+(Q)}{B}
                psline[linecolor=red](A)(B)
                psxline[linecolor=green](P){(A)-(Q)}{(B)-(Q)}
                pcline[nodesep=-2,linecolor=blue](F)(P)
                pstInterLL[PointName=none]{F}{P}{A}{B}{I}
                psdots(P)(Q)(F)
                end{pspicture*}}
                end{document}





                share|improve this answer




























                  5












                  5








                  5







                  With PSTricks and explanation.



                  enter image description here



                  documentclass[pstricks,border=12pt]{standalone}
                  usepackage{pst-eucl,pst-plot}

                  edefA{2}% semi-major
                  edefB{1}% semi-minor
                  edefCx{3}% center abscissa
                  edefCy{3}% center ordinate

                  % parametric representation of an ellipse
                  edefX(#1){A*cos(#1)+Cx}
                  edefY(#1){B*sin(#1)+Cy}

                  % the left focus point in RPN notation
                  % [-sqrt(A^2-B^2)+Cx,Cy]
                  edefF{!Aspace 2 exp Bspace 2 exp sub sqrt neg Cxspace add
                  Cy }

                  psset{algebraic}

                  begin{document}
                  begin{pspicture}[showgrid](6,6)
                  psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}% plot the ellipse from 0 to 2*pi
                  curvepnode{Pi 4 div}{X(t)|Y(t)}{P}% define the point P through which the tangent line passes
                  % curvepnode also produces a unit tangent vector named Ptang
                  %----------------------------------------------------------------------------------------------
                  pnode(Cx,Cy){C}% define the center
                  pnode(F){F}% define the focus
                  %----------------------------------------------------------------------------------------------
                  nodexn{-2(Ptang)+(C)}{S}% vector S = -2 Ptang + C
                  nodexn{2(Ptang)+(C)}{T}% vector T = 2 Ptang + C
                  %-----------------------------------------------------------------------------------------------
                  psline[linecolor=red](S)(T)% draw the line passing through C and parallel to the unit tangent vector
                  psxline[linecolor=green](P){(S)-(C)}{(T)-(C)}% draw a line from vector P + S - C to P + T - C
                  pcline[nodesep=-1,linecolor=blue](F)(P)% drawn a line from F to P
                  pstInterLL[PointName=none]{F}{P}{S}{T}{I}% find the intersection point I between line FP and ST
                  psdots(P)(C)(F)% draw the points P, C, F
                  end{pspicture}
                  end{document}


                  Animation



                  enter image description here



                  documentclass[pstricks,border=12pt]{standalone}
                  usepackage{pst-eucl,pst-plot}
                  usepackage[nomessages]{fp}

                  defX(#1){2*cos(#1)+3}
                  defY(#1){sin(#1)+3}
                  FPsetN{20}
                  FPevalStep{round(2*pi/N:2)}

                  psset{algebraic,unit=0.5}

                  begin{document}
                  multido{n=0.00+Step}{N}{%
                  begin{pspicture*}[showgrid=false](6,6)
                  psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}
                  curvepnode{n}{X(t)|Y(t)}{P}
                  pnode(3,3){Q}
                  pnode(!3 sqrt neg 3 add 3){F}
                  nodexn{-3(Ptang)+(Q)}{A}
                  nodexn{3(Ptang)+(Q)}{B}
                  psline[linecolor=red](A)(B)
                  psxline[linecolor=green](P){(A)-(Q)}{(B)-(Q)}
                  pcline[nodesep=-2,linecolor=blue](F)(P)
                  pstInterLL[PointName=none]{F}{P}{A}{B}{I}
                  psdots(P)(Q)(F)
                  end{pspicture*}}
                  end{document}





                  share|improve this answer















                  With PSTricks and explanation.



                  enter image description here



                  documentclass[pstricks,border=12pt]{standalone}
                  usepackage{pst-eucl,pst-plot}

                  edefA{2}% semi-major
                  edefB{1}% semi-minor
                  edefCx{3}% center abscissa
                  edefCy{3}% center ordinate

                  % parametric representation of an ellipse
                  edefX(#1){A*cos(#1)+Cx}
                  edefY(#1){B*sin(#1)+Cy}

                  % the left focus point in RPN notation
                  % [-sqrt(A^2-B^2)+Cx,Cy]
                  edefF{!Aspace 2 exp Bspace 2 exp sub sqrt neg Cxspace add
                  Cy }

                  psset{algebraic}

                  begin{document}
                  begin{pspicture}[showgrid](6,6)
                  psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}% plot the ellipse from 0 to 2*pi
                  curvepnode{Pi 4 div}{X(t)|Y(t)}{P}% define the point P through which the tangent line passes
                  % curvepnode also produces a unit tangent vector named Ptang
                  %----------------------------------------------------------------------------------------------
                  pnode(Cx,Cy){C}% define the center
                  pnode(F){F}% define the focus
                  %----------------------------------------------------------------------------------------------
                  nodexn{-2(Ptang)+(C)}{S}% vector S = -2 Ptang + C
                  nodexn{2(Ptang)+(C)}{T}% vector T = 2 Ptang + C
                  %-----------------------------------------------------------------------------------------------
                  psline[linecolor=red](S)(T)% draw the line passing through C and parallel to the unit tangent vector
                  psxline[linecolor=green](P){(S)-(C)}{(T)-(C)}% draw a line from vector P + S - C to P + T - C
                  pcline[nodesep=-1,linecolor=blue](F)(P)% drawn a line from F to P
                  pstInterLL[PointName=none]{F}{P}{S}{T}{I}% find the intersection point I between line FP and ST
                  psdots(P)(C)(F)% draw the points P, C, F
                  end{pspicture}
                  end{document}


                  Animation



                  enter image description here



                  documentclass[pstricks,border=12pt]{standalone}
                  usepackage{pst-eucl,pst-plot}
                  usepackage[nomessages]{fp}

                  defX(#1){2*cos(#1)+3}
                  defY(#1){sin(#1)+3}
                  FPsetN{20}
                  FPevalStep{round(2*pi/N:2)}

                  psset{algebraic,unit=0.5}

                  begin{document}
                  multido{n=0.00+Step}{N}{%
                  begin{pspicture*}[showgrid=false](6,6)
                  psparametricplot{0}{Pi 2 mul}{X(t)|Y(t)}
                  curvepnode{n}{X(t)|Y(t)}{P}
                  pnode(3,3){Q}
                  pnode(!3 sqrt neg 3 add 3){F}
                  nodexn{-3(Ptang)+(Q)}{A}
                  nodexn{3(Ptang)+(Q)}{B}
                  psline[linecolor=red](A)(B)
                  psxline[linecolor=green](P){(A)-(Q)}{(B)-(Q)}
                  pcline[nodesep=-2,linecolor=blue](F)(P)
                  pstInterLL[PointName=none]{F}{P}{A}{B}{I}
                  psdots(P)(Q)(F)
                  end{pspicture*}}
                  end{document}






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 10 '13 at 15:39

























                  answered Apr 10 '13 at 12:31









                  kiss my armpitkiss my armpit

                  13.1k20174405




                  13.1k20174405






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f107902%2fhow-do-i-make-tangents-to-ellipses-and-lines-parallel-to-these%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

                      Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

                      Castillo d'Acher Características Menú de navegación