Graphics, Figures & TablesSemicircles with different Diameter around a Circle

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
circle
Posts: 2
Joined: Wed Sep 11, 2013 1:19 pm

Semicircles with different Diameter around a Circle

Post by circle »

Dear community,

I am trying to create a picture with pstricks whereby at the circumference of a circle smaller semicircles with different diameters are placed. I have tried several approaches, such as placing \psarc manually within the pspicture environment. The best result so far is the example shown here:

Code: Select all

\documentclass[]{article}
\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{pst-all}

\begin{document}
  \begin{pspicture}(-2,-0.5)(2,5)
    \pstextpath[c](0,0){%
      \psarcn[linestyle=none](0,1){0.75}{1}{3}}{
        $\circ$$\circ$$\circ$$\circ$$\circ$$\circ$$\circ$$\circ$$\circ$$\bigcirc$$\bigcirc$$\bigcirc$ \large{$\bigcirc$}$\circ$$\bigcirc$$\circ$$\circ$$\circ$}
\pscircle[fillstyle=solid](0,1){0.8}
\end{pspicture}
\end{document}
Anyhow, it is not satisfying since: I would like to place semicircles with larger diameters more on the top, some smaller ones between them and then in the lower part smaller diameters, preferably of different sizes. The above shown example does only give me a limited number of possible diameters and I struggle to place the semicircles the way I want.

I would highly appreciate your input. Any hint is welcome.

Kind regards

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Semicircles with different Diameter around a Circle

Post by localghost »

I'm not sure if I understand you right. But this could be what you are looking for. The output is attached.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}  % allow PSTricks code with PDFLaTeX

\begin{document}
  \begin{pspicture}[showgrid=false](-1.5,-1.5)(1.5,1.5)
    \multido{\i=30+30}{5}{\pscircle(1;\i){0.25}}
    \multido{\i=170+15}{5}{\pscircle(1;\i){0.125}}
    \multido{\n=240+7.5}{9}{\pscircle(1;\n){0.0625}}
    \multido{\i=310+15}{5}{\pscircle(1;\i){0.125}}
    \pscircle[fillstyle=solid](0,0){1}
  \end{pspicture}
\end{document}
Can for sure be improved regarding automation. If it's not what you want, it may serve as starting point.


Best regards and welcome to the board
Thorsten
Attachments
qtmp.png
qtmp.png (2.94 KiB) Viewed 5019 times
circle
Posts: 2
Joined: Wed Sep 11, 2013 1:19 pm

Re: Semicircles with different Diameter around a Circle

Post by circle »

Thank you for your quick reply and effort, Thorsten.

I can use your suggestion with some adjustments.

Kind regards
Post Reply