# Tagged Questions

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

42 views

### Intersection of two extended lines in TikZ without having to draw them

This question is a follow up of TikZ: how to find the intersection of two extended lines? I have a moderately complicated TikZ graphic that shows the setup of an optical system. I need to calculate ...
73 views

### intersection of functions or polygon tikz?

Hello I am creating a plot using tikz I have created 3 functions on a plot and took the area above each of them using drawge. My question is how I can fill the area above intersection of two functions ...
63 views

### Value variable in an addplot domain

In this MWE \documentclass[border=1cm, x11names,tikz=true]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections, calc} \usepackage[round-mode=places]{siunitx} ...
30 views

### pgfplots: calculating intersections and drawing arrows to the axis with foreach

I am trying to find the intersection points between two curves and draw arrows from each of them to the x-axis. I tried the following code: \documentclass{article} \usepackage{pgfplots} \...
180 views

### Create tikz image illustrating integration contour arithmetic

Can someone help me reproduce the following image illustrating arithmetic with integration contours using tikz? Update 1: @JMP: I slightly adapted your great solution to produce where I tried ...
109 views

### TikZ: even odd clipping using named path by intersections library

I would like to generate the following Venn diagram: which can be generated by the following \documentclass[tikz,margin=0pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,intersections} \...
135 views

### Customizing Venn Diagram

For my work, I need a Venn diagram with three circles and the intersecting split into two by a line. I used an answer from Tex.SE, but I do not know how to use it to draw the intervening line, and ...
95 views

### tikz path use draw area

I found a interesting snowman here, I rewrite it with some relative coordinate as below for fun: \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,shapes} \...
19 views

### Too many samples for intersection

I am trying to intersect a path with a curve in pgfplots. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \usetikzlibrary{intersections} \begin{document} \begin{...
112 views

### tikz intersection of named path

I want to use named path to calculate the intersection of 2 line. but below example code doesn't work! \documentclass[border=1mm]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{...
324 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....
47 views

### Intersection of data points from file with plane [duplicate]

I have written a simple code to stack multiple 2-dimensional plots read in from data files, in a 3-dimensional plot for comparison purposes. The minimal working example is the following: \...
77 views

### Vertical and horizontal line in intersection?

There is probleme in this source: \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \draw[thick,->] (-1,0) -- (5,0) node(xaxis)[below] ...
57 views

### Intersection segments are not as expected

I have a question about intersection segments in package pgfplots. I want to intersect circle (named mypath) with another circle and would like to draw the intersection segments L1,L2,L3 of the the ...
160 views

### TikZ — Intersection line of a cone and a helicoid, too many lines

Here is the image I'm working on: it's an archimedean spiral, shown as an orthogonal projection of an intersection line of a cone and a helicoid. \documentclass[12pt, border=0.5mm]{standalone} \...
312 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 ...
198 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 ...
106 views

### Tikz Intersecion doesn't recognize path named with name path

I have problems with using path names defined even in the same loop. the following code produces error message: ! Package tikz Error: I do not know the path named `ab6'. Perhaps you misspelt it. ...
36 views

### want figure in section and subsection of appendix [closed]

I want to put a figure in an appendix section as well as in a subsection as that section name and subsection name appears in containt section but I am getting the following error: subsection ...
174 views

### Positioning of named nodes and paths within groupplot environments

I am having issues with pgf, pgfplots and the groupplots library. The issue is best explained with an example \documentclass[tikz]{standalone} \usepackage{pgfplots} %\pgfplotsset{compat=1.12} \...
143 views

### Labeling the intersection of two rays

I have the code for rectangle ABCD and two of its diagonals. I am trying to draw rays from adjacent vertices C and D, each of which is perpendicular to a diagonal, label the intersection of the two ...
254 views

### Drawing lines, with arrowheads, at arbitrary angles with respect to the positive x-axis

I am trying to get TikZ to draw two lines, with arrowheads, on the Cartesian plane. I have drawn a square, with gray edges, and I want the tip of the arrowheads to be on an edge of the square. In ...
347 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 ...
306 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 ...
567 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 ...
86 views

### Intersection of double lines

I'm trying unsuccessfully to fill the intersection of two double lines with an other colour. Here is minimal working example : \documentclass{standalone} \usepackage{tikz} \begin{document} \...
165 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 ...
139 views

### TikZ not computing intersection

I'm trying to make two lines intersect using the (intersection cs: first line={}, second line={}) syntax. However, compilation of the following example doesn't do what I want: %!TEX encoding = UTF-8 ...
221 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 ...
350 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 ...
283 views

### Coordinates of intersection

The code generates a strain - stress curve. How can the code be simplified? How can the code be make smarter? Can I make the bezier curve with one draw command? \ShowintersectionB prints just the ...
202 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{...
219 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, ...
75 views

### Wrong intersection and position computations \anchorborder of \pgfdeclareshape

I'm trying to define a "labeled icon" shape (LIS), that is an icon (drawn with pgf commands, but replaced by a simple rectangle here for simplicity) with a label that is stuck to the icon (not the ...
223 views

### Tikz: Finding intersection of Brownian motion and circle

I'm trying to draw a two-dimensional Brownian motion started in a circle and now want to label the first exit time of the motion: \documentclass[parskip]{scrartcl} \usepackage{tikz} \usetikzlibrary{...
761 views

### Tikz intersection of lines with unnamed points?

This works: \draw (0,0) coordinate (A); \draw (1,1) coordinate (B); \draw (1,0) coordinate (C); \draw (0,1) coordinate (D); \coordinate (X) at (intersection of A--B and C--D); but this doesn't: \...
559 views

### How to draw in pgfplot until intersection with plot line?

I am trying to draw an arrow from the left side of my diagram and until it intersects with the plot. However I get this error message: ! Package pgf Error: No shape named intersection-1 is known. ...
452 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 ...
157 views

### \coordinate intersection does not work appropriately in TikZ [closed]

I was trying to use TikZ to sketch some graph but something weird happened. I was trying to use "intersection" to get the coordinate of the intersection of two lines, but strangely, there is always ...
327 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 ...
433 views

### how can I use intersection points to draw a proper arc for my simple instance

I would like to join points (s) and (t) via arc. Could u help me to implement it?! I've tried it by such way \draw (s) arc (t); It is wrong! To say simply I need the correct arc without spreading over ...
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 ...
645 views

### Sketching conic sections as intersections of cone and plane?

I would have thought this would be trivial, but I still haven't found an easy method. All I want to do is draw a cone, a plane, and their intersection (which will be a conic section). Something ...
386 views

### How to find coordinates of intersecting circles using TikZ?

I'm using code based on Tomas M. Trzeciak’s Stereographic and cylindrical map projections example to draw spheres. I have added three great circles to the sphere: The equator, and two longitudinal ...
143 views

### Self Intersecting Diagrams, PSTricks

Okay, so I have a self-intersecting curve drawn using \pscurve in PSTricks, and I would like the interestions to look something like -|- as opposed to +. I know it can be done using double lines in ...
112 views

### Do until there is no intersection point

I want to do a loop until there is intersection points between two paths edit I oblic lines until they don't intersect the circle. When there is zero intersection points I have an error. Is there a ...
273 views

### Stacking plots in animation using fill between library (with dynamic calculation of intersection segments?)

As a followup question to Filling the area under a graph based on intersection with another graph, I'm looking to create the following effect: Fill based on the coordinates of the intersection ...
503 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} \...