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

learn more… | top users | synonyms

5
votes
1answer
45 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
30 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 ...
2
votes
0answers
78 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} ...
3
votes
3answers
110 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 ...
4
votes
2answers
141 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 ...
10
votes
2answers
231 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 ...
10
votes
1answer
223 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
391 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 ...
4
votes
1answer
68 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
126 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
92 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
2answers
160 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 ...
9
votes
1answer
219 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
171 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
159 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
166 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
53 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 ...
3
votes
1answer
149 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} ...
2
votes
2answers
290 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
325 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
424 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
127 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
232 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
331 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
193 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
371 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
307 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 ...
3
votes
1answer
129 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
107 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 ...
3
votes
1answer
220 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 ...
7
votes
2answers
399 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} ...
4
votes
1answer
295 views

Pgfplot second intersection point

As it can be seen in the figure i added a line from the first intersection (y=2x and y=6-x) to x(2). But i couldn't add a line from second intersection (y=x and y=6-x) to x(3). i tried intersection-2 ...
4
votes
2answers
368 views

Shading area between curves

I am an old LaTeX user but just beginning to discover PGF and TikZ. I am trying to shade areas between 3 curves and from what I read I could do it with min and max functions, but forwhatever reasons ...
6
votes
2answers
518 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 -- ...
6
votes
1answer
195 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 ...
6
votes
1answer
221 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); ...
4
votes
1answer
438 views

tikz, intersection of four circles WITHOUT any fill, but text

Hej, I´ve got a problem with the following diagram. I want the intersection of all four circles to be white, not filled but transparent as there has to be a text in the intersection. I am ...
0
votes
1answer
444 views

How can I draw with coordinates of intersection in pgfplots?

When using pgfplots, the command \pgfgetlastxy works well without axis environment and with axis environment set as default. But it is hard getting the correct coordinate of intersecting, when ...
2
votes
1answer
294 views

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 ...
5
votes
3answers
244 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 ...
6
votes
1answer
620 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 ...
11
votes
1answer
235 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 ...
7
votes
1answer
455 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} ...
6
votes
1answer
260 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 ...
7
votes
2answers
267 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 ...
5
votes
1answer
400 views

How to find the intersection of two `path3[]`

I'm using Asymptote to draw some figures and I need to put a dot on the intersection of two path3[] but the command intersectionpoint() doesn't work for path3[]. What can I do?
1
vote
3answers
961 views

How can I draw tikz arrows on a calculated triangle?

I am going to need a lot of vector triangles and would like to do them with TikZ. My TikZ experience is close to not existing. Therefore I would like to ask you, if there is a possibility to draw ...
4
votes
2answers
197 views

Tikz: wrong intersection with axis

In the following code the dashed line that intersects with the y-axis is out of place and I don't know where I'm making the mistake (if there is any): \documentclass{article} \usepackage{pgfplots} ...
3
votes
1answer
322 views

TikZ: using the intersections library for normal vector

Consider the code: \documentclass[convert = false]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{calc} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[ ...
2
votes
1answer
153 views

TikZ: Why is the 2nd intersection not found?

I am trying to construct a tangent line to the dashed curve but TeX is telling me that No shape named intersection-2 is known. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc, ...