# Tagged Questions

For questions about calculating intersections using {tikz-pgf} or {pgfplots}, including PGF's intersections library.

2k views

### Intersection of two surfaces

I'm trying to create a signed distance function S(x), where I want to intersect S(x) = 0 with a plane. The problem is not to get the two functions into a plot, but to get the two functions to visual ...
590 views

### How to get intersection points of a self intersecting path?

(Tricky question.) I'm trying to get intersection points of one individual/arbitrary curve instead of searching intersection points among many curves. We can get intersection points of two different ...
11k views

### TikZ: Intersection of two lines

what is the easiest way to determine the intersection of two lines? I tried \usetikzlibrary{intersections} \begin{tikzpicture}[every node/.style={black,above right}] \draw[name path=line 1] (0,0) -- (...
2k views

### Intersections in PGFplots

I can get intersections to work in TikZ, but not PGF plots. I defined a command to show the intersections to make sure that it is identical in both cases. Commenting out the \ShowIntersection line in ...
455 views

### Intersection of 5 ellipses

I would like to fill the intersection of each of my 5 ellisses with the same color (black for example). It works very well with two. But with a third or more, I don't know how to "save" the first ...
6k views

### Insertion of perpendicular symbol at intersection of two perpendicular lines

This provides good details on How to draw a line passing through a point and perpendicular to another?. What I would like to do is to extend this somehow to add the usual geometry symbol to indicate ...
3k views

### Coordinates of intersections

In axis environment I have a curve and a line intersecting it. How can I get components of intersection-1, intersection-2 etc. in axis units? \documentclass{minimal} \usepackage{pgfplots} \...
3k views

### How to access \xmin, \xmax, \ymin, \ymax from within PGFplots axis environment

In the MWE example below I have the values specified twice, but would prefer not to have to do that. Furthermore, it is possible to allow PGFplots to automatically select these end points so I would ...
735 views

### How to decorate a path with arrows at certain coordinates?

Next example (taken from TiKZ manual) shows how to find intersection points between two paths. Once you know intersection points it's easy to decorate them with any marking. But if I want to use an ...
2k views

### Crossing paths in TikZ without intersection

Once again, I'm preparing a new logic puzzle; Resuko to be precise. For the race track, I would like to have a symbolized bridge/underbridge -|-. I searched this site, but only found this question: ...
305 views

### Given four nodes forming a quadrilateral, how do I find the node at the intersection of the diagonals [duplicate]

I'm trying to find and name a node at the intersection of the diagonals of a quadrilateral formed by four other nodes. However, I'm not drawing a path. All I can seem to find in the tikz manual are ...
316 views

### TikZ: Intersection point with a double-line path

When calculating the intersection point(s) between a line and another double-line path, TikZ normally returns the intersection at the middle of the double-line path. The question here is how to get ...
2k views

### Intersection of 2 surface plots in pgfplots

My question is pretty much a duplicate of this one. I'd like pgfplots to display the intersection between tho surface plots properly. Unfortunately, my function is quite different from the one in the ...
2k views

### “pgf Error: No shape named i-0 is known”, but only upon 2nd run

Update 2012-01-31: This seems to be a version (and/or OS specific) problem. It breaks on my latest TeXLive2011 on a Mac, but I can get it to run on my PC version of MiKTeX 2.8, and @MarcvanDongen ...
355 views

### Stereographic projection of a circle to a plane in Asymptote

I would like to produce an Asymptote version of the scene portrayed here: https://www.youtube.com/watch?v=kE6aC51LMv0 The output should preferably be vector graphics. Nevertheless, this is how far I ...
222 views

### Rotating tikzpicture messes up intersections

I'm working on a picture using TikZ and I'm using intersections to draw some points (the $α(t_{j+i}$). I saw that the picture would fit better into the page if I rescaled it and rotated 90 degrees, ...
604 views

### Tikz — Rotating a line around an intersection

I've been trying to rotate a line around an intersection. The problem (I think) is that the intersection is in a previous scope (I need that to have the correct clipping), and the new scope doesn't ...
759 views

### Drawing little semicircle to show that two intersecting lines are not connected [duplicate]

I want my diagram to show that two intersecting lines are not actually connected, but one passes above the other. The best result I would like to achieve would be a small semicircle as used in ...
260 views

### Avoiding line intersection

i wanna do something like that: Non-intersecting lines on class diagram with that: http://www.texample.net/tikz/examples/oxidation-and-reduction/ It will be something like:
222 views

### How to draw tikz image of the ridge regression image?

I am trying to recreate the following image: Unfortunately, this has been drawn in Python, so I can't really use it. So I thought I should recreate it with Tikz. My attempt at creating the left ...
372 views

### Tikz: Fill the intersection between two polygons

I'm trying to fill the intersection of the two polygons that I have made using tikz. But it seems like I have some mistake in my \clip and \fill commands that I can't get what I want. This is what I ...
840 views

### Intersection of lines to draw a convex function

I'm trying to draw (in TikZ) a convex function f constructed as the minimum of the linear functions f1, f2, f3 and f4. To do that, my inclination is to use the intersections of said lines to find the ...
333 views

### Draw all existing intersections

I have a set of arrows that intersect a circle and I want to highlight all intersections dynamically. I know that I can find those intersections via tikz' name intersections but I can't get it to work....
3k views

### Draw line from a point to another line (along x-axis or y-axis) in TikZ

I would like to make use of the intersection tools to draw a line to another line in a way that it only reaches along the x-axis or y-axis. I mean I currently think that I would achieve this via the ...
319 views

### Tikz: Shifting a curve to get a tangent condition

I want to achieve a very similar thing like in this post Line tangent to a a curve (using plot or controls), starting at a point. But I need a more simple solution. I can create a first tangent curve ...
335 views

### TikZ: naming paths in a \foreach and accessing them later

\documentclass[convert = false, tikz]{standalone} \usetikzlibrary{calc} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \coordinate (P1) at (60:4cm); \coordinate (P2) at (-20:...
596 views

### ellipse intersecting a circle

I am trying to draw an ellipse which intersects the sphere of influence, that is, the dashed circle around the moon. The ellipse needs to pass through (-170.864:.7cm) location along the v0 vector and ...
655 views

### TikZ: How to draw an helicoid and fill area below curve

I am trying to draw an helicoid and to fill the area below the curve. Since the aim of the figure is just to "give an idea", I would prefer to keep it simple and to avoid using PGFplots and GNUplot -- ...
851 views

### Bad intersection of lines in TikZ

Consider the following: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture}[line width = 4] \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (1,1); \...
206 views

### Intersection of line using polar coordinates

I am trying to draw a line with a given angle and have this line intersect with a vertical line. When I draw an ordinary line from point B with an angle of 150 degrees and length=2, everything is ...
514 views

### Filling the area under a graph based on intersection with another graph

I'm trying to produce this: But I can't get any further than this: This is my code: \documentclass{minimal} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections} \...
3k views

### How to Intersect an arc with a line without calculating the angle

I'd like to draw an optics-related figure, for which I need to draw several beams with varying opening angles, which will need to be labeled. What I've come up at the moment (boiled down to a minimal ...
601 views

### TikZ doesn't find all intersections between plot and a line

Why doesn't TikZ find all intersections. They are obviously there … \documentclass[border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[...
537 views

### tikz intersection fails in combination with the library calc

In the second example I am trying to work the the library intersection. It works fine as long as I don't use the calc library. The first example shows my intention. I am using ($2*(w1')$) which ...
658 views

### Is there a way to clear paths previously defined with name path global in TikZ

In the solution to Intersections in PGFplots it was pointed out that each \addplot command was drawn in its own scope and using name path would not survive outside of that \addplot command. The ...
1k views

### TikZ: Drawing an ellipse through two points

I am trying to construct a portion of an ellipse that connects point P1 and P2 but I don't know anything about the ellipse besides that F is one of the foci. All I know is that an elliptic arc ...
919 views

### Tikz: placing a node at the intersection of two circles along a hyperbola

I know one can use the intersection package to find the point of intersection but I don't understand how to do it yet. I would like to label the increasing order of the intersections F^*_2, F^*_1, F^*...
392 views

### TikZ Intersection missing the true intersection slightly

I'm having issues with the intersection feature. It works, but it seems to "miss" the true intersection a bit. The code below produces the error for me. See this image (can't post it directly because &...
270 views

### Number of intersection points

In this examle from pgfmanual p 132, how to use \t the number of intersections point outside \fill command. I tried \def\Nb{\t} but it dosen't work. \begin{tikzpicture} \clip (-2,-2) rectangle (2,2); ...
204 views

### Why do these TikZ intersections scale incorrectly?

In the following MWE, the shaded region scales incorrectly. The problem seems to involve the intersection calculations. What's the problem here? Here's the MWE, without scaling: \documentclass{...
209 views

### Am I able to intersect curves after rotating?

I would like to intersect arc and sloped line as it's discribed in the code after having rotated the sloped line. Why doesn't the red point belong to sloped line? I hope my question is quite clear for ...
850 views

### pgfplots intersection with path

I am trying to find the intersections of a path with plots from pgfplots via the intersection library. The intersections found clearly do not match the visable intersections. It seems as if they are ...
2k views

### How do I name a plot in tikz and use it for intersections?

I want to create a figure with 3 plots, a vertical reference line, and marks at the intersections of each plot with the reference line. The plots come from an external table. Plotting works, but ...
293 views

### Fill from path to axis with tikz intersections

I am trying to represent parts of a plot that extend from a simple curve to the boundaries, but I can't find a simple way of creating the closed path from the intersection of two paths. I have seen ...
304 views

### Calculate the intersection between a path enclosed by a scope and another path

I have constructed a circle using the through package. I would like to create a coordinate at the intersection of this circle and another line. Is there a way to do this? I tried to name the path ...
334 views

### The intersection of a sphere with planes through an axis tangent to the north pole

I am trying to draw a picture of a very simple sphere - i.e. one big black circle with additionally, an equator indicated with solid line in front, dotted in back. on this sphere I want to draw a ...
168 views

### Why do these two TikZ instructions produce different results?

I'm playing around with intersections to draw an illustration for a lecture about optics. However, I'm having a few issues as the following example shows: %!TEX encoding = UTF-8 Unicode %!TEX program ...
278 views

### Drawing a segmented circle

I'm trying to draw another larger circle that is also centered at (0,0). In words I'd like to "walk out along the top horizontal arm to its halfway point, then draw a circle all the way around to the ...