5

enter image description hereI found a weird "(node.angle)" instruction, see the complete minimal example below. From the tests I have been able to do, I understand it is a kind of polar coordinates.

We start from the center of the node given in the brackets, we move on a straight line inclined by the angle given in brackets and we place a node at the intersection of the line and the border of the node given in brackets.

In order for TikZ to be able to detect the difference between the usual polar coordinates and these, the colons (:) would be replaced by a single dot (.).

I have read the documentation "PGF/TikZ manual", especially the chapters Nodes and Edges and Specifying Coordinates, but I couldn't find where this command is explained. Can someone tell me where to find explanations for this command in the documentation "PGF/TikZ manual" ? Thanks in advance.

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node(c)[draw,align=center]at(0,0){Donald Knuth~: \TeX\\Leslie Lamport~: \LaTeX\\ Till Tantau~: Ti\textit{k}Z};
\draw (0,0)node[red]{$\bullet$}; %to visualize the center of the node (c)
\draw (c.130)node[blue]{$\bullet$};
\draw (c.20)node[teal]{$\bullet$};
\end{tikzpicture}
\end{document}
gernot
  • 49,614
  • Right, it‘s probably not mentioned there. However, it‘s a nice, useful and straightforward syntax. – MS-SPO Aug 19 '23 at 11:19
  • 1
    Just to remind you of your previous question: https://tex.stackexchange.com/a/692191/245790 . Here's an application within the blackdiagrams: https://tex.stackexchange.com/a/692274/245790 . – MS-SPO Aug 19 '23 at 11:36
  • 2
    c.30 is not a polar coordinate, it's a borderanchor of the node c. The explicit node coordinate system differentiates between anchor (like north west) and angle. The implicit version (see the same link), i.e. the one with ., figures that out for you. – Qrrbrbirlbel Aug 19 '23 at 11:49
  • 2
    Otherwise, yes, that's exactly what an anchor order should do. Find the point on the border of a shape that is at an angle from its center. TikZ uses it everytime you connect nodes with lines without using an anchor, say in (a) -- (b). – Qrrbrbirlbel Aug 19 '23 at 12:02
  • 1
    You can see examples of using the border anchor here for example. – Rmano Aug 19 '23 at 12:08
  • 2
    The border anchor is shown, but at quick glance not explained, in ch. 71 "Shape library". See e.g. the circle and other shapes https://tikz.dev/library-shapes . And you can see it the code for "/pgf/shape border rotate=⟨angle⟩ " in ch 17.2.2 https://tikz.dev/tikz-shapes . – MS-SPO Aug 19 '23 at 12:12

1 Answers1

5

This question is answered in the comments by Qrrbrbirlbel.

It is a borderanchor of the node. More precisely, it is an implicit way of specifying a point in the node coordinate system. Therefore, (start.\angle) should have the same meaning as (node cs:name=start,angle=\angle)

To take safe ground in the documentation, one has to look for the word implicit in the section on Node Coordinate System:

The implicit way of specifying the node coordinate system
is to simply use the name of the node in parentheses
as in (a) or to specify a name together with an anchor
or an angle separated by a dot as in (a.north) or (a.10). 

See also here in the screenshot:

implicit

A few paragraphs above then one reads

/tikz/cs/angle=⟨degrees⟩(no default)

It is also possible to provide an angle instead of an anchor. This coordinate refers to a point of the node’s border where a ray shot from the center in the given angle hits the border.

MS-SPO
  • 11,519
minorChaos
  • 260
  • 6