You need to load the intersections
library:
\usetikzlibrary{intersections}
See 13.3.2 Intersections of Arbitrary Paths in the TikZ 2.10 manual, which explains also name path=...
and name intersections=...
.
Sometimes we only need a virtual path, or a totally transparent path just to compute some coordinates, intersections, and so on.
To do an invisible path we use \path
and if you want to put some ink on it you use \draw
.
Example: Here is an example where I used some paths to compute the intersections.
\documentclass{report}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[scale=2]\footnotesize
\clip (-1.2,-.3) rectangle (4,1.75);
\begin{scope}[rotate=70]
\coordinate (q) at (0,0);
%
\draw[dashed] (q) circle (1);
\draw[dotted](0,-.8)--(0,.8)node[left=1.5em]{$\mathcal{K}$};
%
\path[name path=ray1] (q)-- (35:3cm);
\path[name path=ray2] (q)-- (0:3cm);
\path[name path=ray3] (q)-- (-40:3cm);
\path[name path=ray4] (q)-- (-60:3.5cm);
\path[name path=ray5] (q)-- (-70:4cm);
\draw[name path=circulo] (q)+(.4,0) circle (.4);
\draw[name path=vertical] (1.25,-4)node[above left=10pt]{$L$} -- (1.25,2);
%
\draw[name intersections={of=ray1 and vertical,by={b}}] (q)--(b);
\draw[name intersections={of=ray2 and vertical,by={a}}] (q)--(a);
\draw[dotted,name intersections={of=ray3 and vertical,by={v3}}] (q)--(v3);
\draw[dotted,name intersections={of=ray4 and vertical,by={v4}}] (q)--(v4);
\draw[dotted,name intersections={of=ray5 and vertical,by={v5}}] (q)--(v5);
%
\path[name intersections={of=ray1 and circulo,by={btilde}}] ;
\path[name intersections={of=ray2 and circulo,by={atilde}}] ;
\path[name intersections={of=ray3 and circulo,by={c31,c32}}] ;
\path[name intersections={of=ray4 and circulo,by={c41,c42}}] ;
\path[name intersections={of=ray5 and circulo,by={c51,c52}}] ;
%
\draw (atilde)--(btilde);
\draw[rotate=35] (btilde) rectangle +(-.07,-.07);
\draw[rotate=0] (a) rectangle +(-.07,.07);
\foreach \p in {q,btilde,atilde,c32,c42,c52,b,a,v3,v4,v5}{
\draw[fill=white] (\p) circle (.7pt); }
%
\node[left=2pt] at (btilde){$\tilde b$};
\node[right=2pt] at (atilde){$\tilde a$};
\node[above=2pt] at (a){$a$};
\node[above=2pt] at (b){$b$};
\node[below=2pt] at (q){$q$};
\end{scope}
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/CwLB4.png)
Best Answer
I make this answer a Wiki in order to allow those who are aware of the new features of version 3.1 to make them public.
A new
pic
typeright angle
is added. (page 561)
Unfortunately "The Data Visualization Backend"
which was not documented in version 3.0.1a is still not documented. (page 944)
The
3d
librarythat was available is now documented (page 557).
In
grid
if the
xstep
orystep
is 0 or negative the corresponding lines are not drawn (p.157 of the documentation).SVG Animations;
compile with
latex
anddvisvgm --font-format=woff --exact --zoom=-1
Static SVG and animated SVG without user interaction (e. g. activation on click) are embedded into HTML with the
<img>
tag, e. g.:The
<img>
tag also works on this site (TeX.SX). Unfortunately, Imgur does not allow SVG file upload, but file URLs to third-party sites can be used.Animated SVG with user interaction and scripted SVG (as those produced with pkg
animate
) must be embedded into HTML using the<object>
tag:Unfortunately, Blog sites and StackExchange do not accept the
<object>
tag, mainly for security reasons. As a workaround, an<img>
tag can be used as text of a link that redirects the browser to the file URL of the SVG on click. This was done for the example above. In Markdown syntax:Some basic tools for perspective drawing
with one, two, or three vanishing points have been added in the
perspective
library. Documentation is on page 726 (section 63) of the manual.One of the examples from the manual can be drawn with:
Results in:
A lot of standard Tikz keys are not (yet) supported, e.g.
shift
,xshift
,yshift
,rotate around x
,rotate around y
,rotate around z
, all thecanvas is ... plane
keys from the3d
library, and there are bound to be more.