# Rays within a circle

I am trying to create the same figure as the one posted in here (see reply) but centered around a different point than (0,0). Any suggestion?

• Welcome to TeX.SX! Have you tried something? I guess if you change (0,0) to something else it'll do what you want. – Phelype Oleinik Mar 19 at 19:37
• That does not work as it would draw lines from (x,y) to points along a circle of radius \Radius centered at(0,0). The reply below, with the +, works exactly as I needed. Thanks – geguze Mar 19 at 19:57
• I'm voting to close this question as off-topic because this is just a do-it-for-me question. Hence a -1. – Raaja Mar 20 at 6:05
• @Raaja The OP is a new contributor, wait a bit before closing, please! – CarLaTeX Mar 20 at 6:31

Sure. Define a coordinate which should be the center point, state this first to all commands and then add a + before each coordinate. The plus sign makes the following coordinate relative to the one without a plus sign which then is exactly what you want. See Heiko's modified code to which I also added a red circle at (0,0) to prove that the center really is not there any more, but at the defined coordinate (A).

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (1,1);
\draw
\foreach \a in {10, 20, ..., 350} {
}
%
+(0, 0) -- +(0:3.75cm)
+(0, 0) -- +(10:3.75cm)
%
+(5:4cm) node {\SI{10}{\degree}}
+(-30:3.7cm) node {\SI{360}{\degree}}
;

\draw[->]
(A)
;

\draw[->]
(A)
;
\fill [red] (0,0) circle (2pt);
\end{tikzpicture}
\end{document}


• It is probably simpler to use shifted scope, no ? – Kpym Mar 19 at 19:51
• @Kpym, this would be another possibility. And I am pretty sure there are even more. Feel free to write an answer, too. This is what this site is all about, as you know ;) – Stefan Pinnow Mar 19 at 20:03

Here is another possibility : define a pic that you can place where you want after that. This is interesting only if you need to place the wheel multiple times.

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usepackage{siunitx}
\tikzset{
wheel/.pic={
\draw
\foreach \a in {10, 20, ..., 350}{
}
(0, 0) -- +(0:3.75cm)
(0, 0) -- +(10:3.75cm)
(5:4cm) node {\SI{10}{\degree}}
(-30:3.7cm) node {\SI{360}{\degree}}
;

\draw[->]
;

\draw[->]