Distributing circles along a circular path
up vote
6
down vote
favorite
In the left scope, how to automate evenly distributing the red circles along the third blue circle instead of manually drawing and shifting them; and making this third circle invisible (white).
In the right scope, how to gather the red circles around a certain point and control the distances between them to make the second and third drawings.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
begin{document}
begin{frame}[t]
frametitle{bias}
begin{minipage}{textwidth}
{
tikzset{pics/.cd,cc/.style={code={draw [red, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,2.5,3,4,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(-90.:2.4cm)}]o.center) {cc};
pic at ([shift={(90.:2.4cm)}]o.center) {cc};
pic at ([shift={(170.:2.48cm)}]o.center) {cc};
pic at ([shift={(10.:2.48cm)}]o.center) {cc};
pic at ([shift={(45.:2.48cm)}]o.center) {cc};
pic at ([shift={(-45.:2.48cm)}]o.center) {cc};
pic at ([shift={(135.:2.48cm)}]o.center) {cc};
pic at ([shift={(-135.:2.48cm)}]o.center) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(145.:2.48cm)}]o.center) {cc};
pic at ([shift={(156.:2.4cm)}]o.center) {cc};
pic at ([shift={(145.:3.cm)}]o.center) {cc};
pic at ([shift={(150.:3.6cm)}]o.center) {cc};
pic at ([shift={(159.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:2.48cm)}]o.center) {cc};
pic at ([shift={(168.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:3.06cm)}]o.center) {cc};
end{scope}
end{tikzpicture}
}
end{minipage}
end{frame}
end{document}
tikz-pgf
add a comment |
up vote
6
down vote
favorite
In the left scope, how to automate evenly distributing the red circles along the third blue circle instead of manually drawing and shifting them; and making this third circle invisible (white).
In the right scope, how to gather the red circles around a certain point and control the distances between them to make the second and third drawings.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
begin{document}
begin{frame}[t]
frametitle{bias}
begin{minipage}{textwidth}
{
tikzset{pics/.cd,cc/.style={code={draw [red, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,2.5,3,4,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(-90.:2.4cm)}]o.center) {cc};
pic at ([shift={(90.:2.4cm)}]o.center) {cc};
pic at ([shift={(170.:2.48cm)}]o.center) {cc};
pic at ([shift={(10.:2.48cm)}]o.center) {cc};
pic at ([shift={(45.:2.48cm)}]o.center) {cc};
pic at ([shift={(-45.:2.48cm)}]o.center) {cc};
pic at ([shift={(135.:2.48cm)}]o.center) {cc};
pic at ([shift={(-135.:2.48cm)}]o.center) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(145.:2.48cm)}]o.center) {cc};
pic at ([shift={(156.:2.4cm)}]o.center) {cc};
pic at ([shift={(145.:3.cm)}]o.center) {cc};
pic at ([shift={(150.:3.6cm)}]o.center) {cc};
pic at ([shift={(159.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:2.48cm)}]o.center) {cc};
pic at ([shift={(168.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:3.06cm)}]o.center) {cc};
end{scope}
end{tikzpicture}
}
end{minipage}
end{frame}
end{document}
tikz-pgf
add a comment |
up vote
6
down vote
favorite
up vote
6
down vote
favorite
In the left scope, how to automate evenly distributing the red circles along the third blue circle instead of manually drawing and shifting them; and making this third circle invisible (white).
In the right scope, how to gather the red circles around a certain point and control the distances between them to make the second and third drawings.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
begin{document}
begin{frame}[t]
frametitle{bias}
begin{minipage}{textwidth}
{
tikzset{pics/.cd,cc/.style={code={draw [red, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,2.5,3,4,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(-90.:2.4cm)}]o.center) {cc};
pic at ([shift={(90.:2.4cm)}]o.center) {cc};
pic at ([shift={(170.:2.48cm)}]o.center) {cc};
pic at ([shift={(10.:2.48cm)}]o.center) {cc};
pic at ([shift={(45.:2.48cm)}]o.center) {cc};
pic at ([shift={(-45.:2.48cm)}]o.center) {cc};
pic at ([shift={(135.:2.48cm)}]o.center) {cc};
pic at ([shift={(-135.:2.48cm)}]o.center) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(145.:2.48cm)}]o.center) {cc};
pic at ([shift={(156.:2.4cm)}]o.center) {cc};
pic at ([shift={(145.:3.cm)}]o.center) {cc};
pic at ([shift={(150.:3.6cm)}]o.center) {cc};
pic at ([shift={(159.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:2.48cm)}]o.center) {cc};
pic at ([shift={(168.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:3.06cm)}]o.center) {cc};
end{scope}
end{tikzpicture}
}
end{minipage}
end{frame}
end{document}
tikz-pgf
In the left scope, how to automate evenly distributing the red circles along the third blue circle instead of manually drawing and shifting them; and making this third circle invisible (white).
In the right scope, how to gather the red circles around a certain point and control the distances between them to make the second and third drawings.
documentclass{beamer}
beamertemplatenavigationsymbolsempty
usepackage{tikz}
begin{document}
begin{frame}[t]
frametitle{bias}
begin{minipage}{textwidth}
{
tikzset{pics/.cd,cc/.style={code={draw [red, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,2.5,3,4,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(-90.:2.4cm)}]o.center) {cc};
pic at ([shift={(90.:2.4cm)}]o.center) {cc};
pic at ([shift={(170.:2.48cm)}]o.center) {cc};
pic at ([shift={(10.:2.48cm)}]o.center) {cc};
pic at ([shift={(45.:2.48cm)}]o.center) {cc};
pic at ([shift={(-45.:2.48cm)}]o.center) {cc};
pic at ([shift={(135.:2.48cm)}]o.center) {cc};
pic at ([shift={(-135.:2.48cm)}]o.center) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
pic at ([shift={(145.:2.48cm)}]o.center) {cc};
pic at ([shift={(156.:2.4cm)}]o.center) {cc};
pic at ([shift={(145.:3.cm)}]o.center) {cc};
pic at ([shift={(150.:3.6cm)}]o.center) {cc};
pic at ([shift={(159.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:2.48cm)}]o.center) {cc};
pic at ([shift={(168.:3.6cm)}]o.center) {cc};
pic at ([shift={(168.:3.06cm)}]o.center) {cc};
end{scope}
end{tikzpicture}
}
end{minipage}
end{frame}
end{document}
tikz-pgf
tikz-pgf
asked Dec 4 at 6:51
Hany
1,056415
1,056415
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
Is this what you are lookig for?
documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}
tikzset{pics/.cd,cc/.style={code={draw [black, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,3,4,5} draw[blue, thick] (o.center) circle (r);
foreach ang in {0,45,...,315}
pic at (ang:2.5cm) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
defdist{0.7}
coordinate (p) at (240:3cm);
foreach ang in {0,45,...,315}
pic at ([shift={(ang:dist)}]p) {cc};
end{scope}
end{tikzpicture}
end{document}
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
add a comment |
up vote
7
down vote
A PSTricks solution only for comparison purposes.
One
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={!3 45 ispace mul PtoC}]{5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Two
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
psLoop{8}{pscircle[fillstyle=solid,fillcolor=red,origin={-3,-2}](!Rand .5 mul Rand 360 mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Three
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={3;225}](!.5 45 ispace mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use packageauto-pst-pdf
with shell-escape and pdflatex.
– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
Is this what you are lookig for?
documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}
tikzset{pics/.cd,cc/.style={code={draw [black, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,3,4,5} draw[blue, thick] (o.center) circle (r);
foreach ang in {0,45,...,315}
pic at (ang:2.5cm) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
defdist{0.7}
coordinate (p) at (240:3cm);
foreach ang in {0,45,...,315}
pic at ([shift={(ang:dist)}]p) {cc};
end{scope}
end{tikzpicture}
end{document}
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
add a comment |
up vote
5
down vote
accepted
Is this what you are lookig for?
documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}
tikzset{pics/.cd,cc/.style={code={draw [black, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,3,4,5} draw[blue, thick] (o.center) circle (r);
foreach ang in {0,45,...,315}
pic at (ang:2.5cm) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
defdist{0.7}
coordinate (p) at (240:3cm);
foreach ang in {0,45,...,315}
pic at ([shift={(ang:dist)}]p) {cc};
end{scope}
end{tikzpicture}
end{document}
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Is this what you are lookig for?
documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}
tikzset{pics/.cd,cc/.style={code={draw [black, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,3,4,5} draw[blue, thick] (o.center) circle (r);
foreach ang in {0,45,...,315}
pic at (ang:2.5cm) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
defdist{0.7}
coordinate (p) at (240:3cm);
foreach ang in {0,45,...,315}
pic at ([shift={(ang:dist)}]p) {cc};
end{scope}
end{tikzpicture}
end{document}
Is this what you are lookig for?
documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}
tikzset{pics/.cd,cc/.style={code={draw [black, thin, fill=red] circle (0.248cm);}}}
begin{tikzpicture}[scale=.9, transform shape]
begin{scope}[scale=.4]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,3,4,5} draw[blue, thick] (o.center) circle (r);
foreach ang in {0,45,...,315}
pic at (ang:2.5cm) {cc};
end{scope}
begin{scope}[scale=.4, xshift=14cm]
draw[black, thick, fill=black] (0,0)node (o){} circle (0.24cm);
draw[black, thick, dashdotted] ([shift={(-90.:5.4cm)}]o.center) -- ([shift={(90.:5.4cm)}]o.center) ([shift={(180.:5.4cm)}]o.center) -- ([shift={(0.:5.4cm)}]o.center);
foreach r in {1, 2,...,5} draw[blue, thick] (o.center) circle (r);
defdist{0.7}
coordinate (p) at (240:3cm);
foreach ang in {0,45,...,315}
pic at ([shift={(ang:dist)}]p) {cc};
end{scope}
end{tikzpicture}
end{document}
answered Dec 4 at 9:07
nidhin
2,889926
2,889926
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
add a comment |
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
Yes this is what I was looking for. Thank you very much.
– Hany
Dec 4 at 12:00
add a comment |
up vote
7
down vote
A PSTricks solution only for comparison purposes.
One
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={!3 45 ispace mul PtoC}]{5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Two
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
psLoop{8}{pscircle[fillstyle=solid,fillcolor=red,origin={-3,-2}](!Rand .5 mul Rand 360 mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Three
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={3;225}](!.5 45 ispace mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use packageauto-pst-pdf
with shell-escape and pdflatex.
– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
add a comment |
up vote
7
down vote
A PSTricks solution only for comparison purposes.
One
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={!3 45 ispace mul PtoC}]{5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Two
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
psLoop{8}{pscircle[fillstyle=solid,fillcolor=red,origin={-3,-2}](!Rand .5 mul Rand 360 mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Three
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={3;225}](!.5 45 ispace mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use packageauto-pst-pdf
with shell-escape and pdflatex.
– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
add a comment |
up vote
7
down vote
up vote
7
down vote
A PSTricks solution only for comparison purposes.
One
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={!3 45 ispace mul PtoC}]{5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Two
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
psLoop{8}{pscircle[fillstyle=solid,fillcolor=red,origin={-3,-2}](!Rand .5 mul Rand 360 mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Three
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={3;225}](!.5 45 ispace mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
A PSTricks solution only for comparison purposes.
One
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={!3 45 ispace mul PtoC}]{5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Two
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
psLoop{8}{pscircle[fillstyle=solid,fillcolor=red,origin={-3,-2}](!Rand .5 mul Rand 360 mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
Three
documentclass[pstricks,border=12pt]{standalone}
pstVerb{realtime srand}
begin{document}
begin{pspicture}(-6,-6)(6,6)
qdisk(0,0){5pt}
foreach i in {1,...,6}{pscircle[linecolor=blue]{i}}
foreach i in {0,1,...,7}{pscircle[fillstyle=solid,fillcolor=red,origin={3;225}](!.5 45 ispace mul PtoC){5pt}}
psset{linestyle=dashed}
psline(0,-6)(0,6)
psline(-6,0)(6,0)
end{pspicture}
end{document}
edited Dec 4 at 9:35
answered Dec 4 at 7:30
Artificial Stupidity
4,74111039
4,74111039
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use packageauto-pst-pdf
with shell-escape and pdflatex.
– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
add a comment |
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use packageauto-pst-pdf
with shell-escape and pdflatex.
– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
Thank you for your answer. Unfortunately, for some reason, I can not compile pstricks. Would you please use tikz in Beamer class.
– Hany
Dec 4 at 7:59
1
1
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
(0) The beautiful code. :-))
– chishimotoji
Dec 4 at 8:16
3
3
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use package
auto-pst-pdf
with shell-escape and pdflatex.– jfbu
Dec 4 at 8:18
@Hany I think for PSTricks you need either latex+dvips + ps2pdf or xelatex or use package
auto-pst-pdf
with shell-escape and pdflatex.– jfbu
Dec 4 at 8:18
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
@jfbu Thank you for your advice.
– Hany
Dec 4 at 12:03
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463096%2fdistributing-circles-along-a-circular-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown