Jake's answer is perfect. The next answer is for the case that you need to do more complex calculation not easily done by simple expressions
I think it's not very fine to do calculations and drawing operations at the same time. And if you use several calculations and several drawings, you complicate the code.
A) Path and drawing
The path begins with \draw (exactly \path[draw]) and ends with ;. Drawing one path means you take one pencil with one color . You cannot change the pencil inside the path.
So if you want to draw two circles with different colors you need to use two paths, example :
\documentclass[11pt]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [blue] (0,0) circle (1 cm);
\draw [red] (2,0) circle (1 cm);
\end{tikzpicture}
\end{document}
But if you write
\draw [red] (0,0) circle (1 cm) [blue,fill=green!20]
(2,0) circle (2 cm);
then the circles are in blue and the disks are green. Blue because it's the last option the color, and the fill color is applied to the path.
B) Path and calculations
Now if you need to do some calculations to draw the circles
In the pgfmanual there is this example :
I used longer names, but I have to use curly braces \p{AB} insted of \p1. The code is more readable.
Remark : in the next example you can avoid the let operation with the through library.
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate [label=left:$A$] (A) at (0,0);
\coordinate [label=right:$B$] (B) at (1.25,0.25);
\draw let \p{AB} = ($ (B) - (A) $),
\n{radius} = {veclen(\x{AB},\y{AB})}
in
(A) circle (\n{radius})
(B) circle (\n{radius});
\end{tikzpicture}
\end{document}
The two circles are in black now if I want the first circle in red and the secon in blue and if I want to calculate once the AB, I need to do this
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate [label=left:$A$] (A) at (0,0);
\coordinate [label=right:$B$] (B) at (1.25,0.25);
\draw let
\p{AB} = ($ (B) - (A) $),
\n{radius} = {veclen(\x{AB},\y{AB})}
in
\pgfextra{\xdef\sameradius{\n{radius}}}
[red] (A) circle (\n{radius}) ;
\draw [blue] (B) circle (\sameradius) ;
\end{tikzpicture}
\end{document}
Explanation : \p{AB} is local to the path operation and you can use the result outside the first path. You need to pass the tikz register \n{radius} to tex. But you need to use a global macro to jump outside the group. It's why I used \xdef !
C) Your case
In your case (if myradius is the radius of the big circle) you wrote
\draw (center) circle (\myradius pt)
(A) circle (0.1cm)
(0,0) |- (A) [dashed]
(center) -- (A);
Here you have only one path. (the beginning is \drawequivalent to \path[draw] and the end is ;).
All the path is drawn with the "dashed" option. If you want to change the options then you need three paths
\draw (center) circle (\myradius pt);
\fill (A) circle (0.1cm) ; % fill the little circle
\draw [dashed] (0,0) |- (A) % dash the lines
(center) -- (A);
D) In the Old Days, before the let operation
Perhaps it's interesting to know what it was necessary to do before the `let' operation. This operation now is used to avoid the next TeX code. This kind of code sometimes is useful when you want to create complex operations and if you want a code more flexible and faster
First we need to get the coordinates of the vector $(A)-(center)$. We need to use the macro \pgfpointdiff. The result is inside \pgf@x and \pgf@y. We need to work between \makeatletter and \makeatother because we need to use @ like a simple letter.
Then we calculate the length (A)--(center) with \pgfmathveclen. The result is in \pgfmathresult. (unity is pt). This is raw code and it's preferable to take some precautions when we use \pgf@x} , \pgf@y and \pgfmathresult.
\makeatletter
\pgfpointdiff{\pgfpointanchor{A}{center}}%
{\pgfpointanchor{center}{center}}%
\pgfmathveclen{\pgf@x}{\pgf@y}
\makeatother
This is raw code and it's preferable to take some precautions when we use \pgf@x} , \pgf@y and \pgfmathresult.
Now we can stock the mathresult inside a macro \myradius and it's more easy to use and to read the code
\makeatletter
\pgfpointdiff{\pgfpointanchor{A}{center}}%
{\pgfpointanchor{center}{center}}%
\pgfmathsetmacro{\myradius}{veclen(\xdim,\ydim)}
\makeatother
But It's possible to do something better because now we have pgflastxy and we can avoid makeatletter
Firstly we create \xdim and ydim to stock the dimensions and we use \pgfgetlastxy to get the dimensions of the vector.
\newdimen\xdim\newdimen\ydim
\pgfpointdiff{\pgfpointanchor{A}{center}}%
{\pgfpointanchor{center}{center}}%
\pgfgetlastxy{\xdim}{\ydim}
\pgfmathsetmacro{\myradius}{veclen(\xdim,\ydim)}
The complete code
\documentclass[11pt]{article}
\usepackage{tikz}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=1.25,cap=round,>=latex]
\draw[step=.5cm,gray,very thin] (-3.0cm,-3.0cm) grid (3.0cm,3.0cm);
\draw[->] (-2.5cm,0cm) -- (2.5cm,0cm);
\draw[->] (0cm,-2.5cm) -- (0cm,2.5cm);
\coordinate (center) at (0.cm,0.cm) ;
\coordinate (A) at (1.5cm,1.cm);
\filldraw [black] (center) circle (0.04cm) node [left] {$Ο$};
% calculation (the let part)
\newdimen\xdim\newdimen\ydim
\pgfpointdiff{\pgfpointanchor{A}{center}}%
{\pgfpointanchor{center}{center}}%
\pgfgetlastxy{\xdim}{\ydim}
\pgfmathsetmacro{\myradius}{veclen(\xdim,\ydim)}
\draw (center) circle (\myradius pt);
\fill (A) circle (0.1cm) ;
\draw [dashed] (0,0) |- (A)
(center) -- (A);
\end{tikzpicture}
\end{center}
\end{document}
Instead of
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=1.25,cap=round,>=latex]
\draw[step=.5cm,gray,very thin] (-3.0cm,-3.0cm) grid (3.0cm,3.0cm);
\draw[->] (-2.5cm,0cm) -- (2.5cm,0cm);
\draw[->] (0cm,-2.5cm) -- (0cm,2.5cm);
\coordinate (center) at (0.cm,0.cm) ;
\coordinate (A) at (1.5cm,1.cm);
\filldraw [black] (center) circle (0.04cm) node [left] {$Ο$};
\draw
let
\p{Acenter} = ($ (A) - (center) $),
\n{radius} = {veclen(\x{Acenter},\y{Acenter})}
in
(center) circle (\n{radius});
\fill (A) circle (0.1cm) ;
\draw [dashed] (0,0) |- (A)
(center) -- (A);
\end{tikzpicture}
\end{center}
\end{document}

letcommand is always used within a\path(or\drawor\fill) command, and you can't change the drawing options within a\path. In your example, there's no reason to have the lines from(A) circle ...to(center) -- (A);in the same\drawcommand as theletkeyword (you're not using\p1,\n1, or\n2in any of them), so you can just move them to their own\drawcommands. – Jake Mar 19 '13 at 16:50\pathcommands, but since aletkeyword is always part of a\pathyou can't use separate options for different parts of aletkeyword. – Jake Mar 19 '13 at 17:04coordinatein theletoperation is probably the clearest way to do it. However, you could also use anedgeoperation if you absolutely want to avoid this. The(center) -- (A)could be replaced by(center) edge [red, solid] (A), for example, but it gets more unwieldy for the other lines. The orthogonal line would have to be expressed using(0,0) edge [to path=(\tikztostart) |- (\tikztotarget), ultra thick, solid, blue] (A), for instance (though you could simplify this by defining custom styles). – Jake Mar 19 '13 at 17:27let and edge operation in tikz. – karathan Mar 19 '13 at 17:36