Q:

How to calculate intersections of a line defined by a segment and an ellipse in tikz

EDIT Here's what I intended to ask, but didn't clearly formulate initially. The Tikz package intersections allows one to calculate and manipulate the intersection point of two non-parallel lines defined by (non intersecting) line segments. The link in my original question shows how to do this, it is how the point (F) is defined. In the example below, the point (0) is defined as the intersection of the lines extending the line segments vertline and horline. What I want to do is calculate and manipulate intersection points of an ellipse with the line extending a given line segment, without having to rely on extending the line segment ''by hand'' as it were, to ensure it actually intersects the ellipse. When  I copy the syntax used in the code from the link, and naively adapt it,
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\usetikzlibrary{intersections}
\path[name path=ellipse] (0,0) ellipse (4 and 3);
\path[name path=horline] (1,0) -- (2,0);
\path[name path=vertline] (0,1) -- (0,2);
\path[name intersections={of = horline and vertline, by={origin}}, draw]
(origin) node [above right] {$0$} circle (1.5pt);
\path[name intersections={of = ellipse and vertline}]
\coordinate (I) at (intersection-1);
\coordinate (J) at (intersection-2);
\draw (I) circle (1.5pt);
\draw (J) circle (1.5pt);
\end{tikzpicture}
\end{document}

it doesn't give me the desired result : the intersections (I) and (J) are of ellipse and vertline are totally misplaced. Moreover, the code is faulty, but I don't understand where the error lies. Please tell me if you'd code things differently, I don't want to develop bad habits.
Further Edit It appears (I) and(J) aren't misplaced, they simply aren't calculated at all, and what appeared on the pdf were points (I) and(J) defined in a previous drawing.
Oringinal Question - May be dicarded In this Example, the author gets tikz to calculate the coordinates of the two intersections (X and Y) of an ellipse with the line defined by a certain segment, and also the coordinates of the intersection (F) of two lines defined by two line segments.
On my machine, I have no problem with the second problem, finding the intersection point of two lines defined by (non intersecting line segments), but i get non-sense when I try to perform the intersection of an ellipse with the line defined by a line segment that doesn't intersect the ellipse.

A:

You can calculate the intersection of two non-parallel lines using the coordinate specification (intersection of A--B and C--D), where A, B, C and D have to be named nodes. That's the approach used in the code you linked to. This, however, does not work with arbitrary named paths, which is what you're trying to do.
To calculate the intersections of a line with an arbitrary path, you'll have to make sure that the paths actually intersect. If you don't want to manually extend the line segment, you can use the approach from Intersection with rays in TikZ and create "infinitely long" (1 metre, say) line segments inside a interruptboundingbox environment:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\usetikzlibrary{intersections, calc}

\path[name path=ellipse] (0,0) ellipse (4 and 3);
\begin{pgfinterruptboundingbox}
\path[name path global=horline] ($(1,0)!-100cm!(2,0)$) -- ($(1,0)!100cm!(2,0)$);
\path[name path global=vertline] ($(0,1)!-100cm!(0,2)$) -- ($(0,1)!100cm!(0,2)$);
\end{pgfinterruptboundingbox}
\path[name intersections={of = horline and vertline, by={origin}}, draw]
(origin) node [above right] {$0$} circle (1.5pt);
\path[name intersections={of = ellipse and vertline}];
\coordinate (I) at (intersection-1);
\coordinate (J) at (intersection-2);
\draw (I) circle (1.5pt);
\draw (J) circle (1.5pt);
\end{tikzpicture}
\end{document}

