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

learn more… | top users | synonyms

1
vote
2answers
64 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 ...
3
votes
1answer
51 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} ...
3
votes
2answers
156 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 ...
2
votes
1answer
29 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} ...
3
votes
2answers
95 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} ...
4
votes
1answer
119 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 ...
5
votes
1answer
80 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} ...
2
votes
1answer
158 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} ...
2
votes
0answers
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} ...
5
votes
3answers
96 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} ...
8
votes
3answers
309 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 ...
0
votes
0answers
46 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: ...
2
votes
1answer
65 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] ...
1
vote
0answers
56 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 ...
5
votes
1answer
142 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} ...
8
votes
2answers
290 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 ...
7
votes
3answers
178 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 ...
13
votes
2answers
5k 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 ...
5
votes
1answer
98 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. ...
1
vote
0answers
34 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 ...
3
votes
1answer
211 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} ...
13
votes
2answers
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 ...
4
votes
2answers
239 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 ...
3
votes
3answers
138 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 ...
10
votes
2answers
331 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 ...
11
votes
1answer
290 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 ...
17
votes
1answer
529 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 ...
9
votes
2answers
207 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 ...
7
votes
1answer
878 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, ...
4
votes
1answer
84 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} ...
6
votes
1answer
155 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 ...
5
votes
1answer
136 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 ...
9
votes
1answer
323 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 ...
5
votes
1answer
252 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 ...
6
votes
2answers
196 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: ...
10
votes
1answer
210 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, ...
3
votes
1answer
70 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 ...
2
votes
2answers
675 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: ...
5
votes
1answer
524 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. ...
14
votes
1answer
447 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 ...
5
votes
0answers
151 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 ...
6
votes
1answer
314 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 ...
3
votes
3answers
419 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 ...
6
votes
1answer
207 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 ...
5
votes
2answers
589 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 ...
3
votes
2answers
378 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 ...
17
votes
1answer
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 ...
3
votes
1answer
141 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 ...
2
votes
1answer
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 ...
4
votes
1answer
265 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 ...