LaTeX forum ⇒ Graphics, Figures & Tablesdraw irregular circle in tikz

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Mohsen Avaji
Posts: 14
Joined: Mon Aug 27, 2012 12:06 am

draw irregular circle in tikz

Postby Mohsen Avaji » Sat Sep 14, 2019 8:25 pm

Hi
How to draw figure of attach file
irregular.png
irregular.png (3.21 KiB) Viewed 327 times
in LaTeX by Tikz?

Thank you.
Yours faithfully,
Mohsen Avaji.

rais
Posts: 235
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sun Sep 15, 2019 11:31 am

like this?
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[tikz]{standalone}
  2. \usetikzlibrary{decorations.pathmorphing}
  3. \begin{document}
  4. \begin{tikzpicture}
  5. \fill (0,0) circle [radius=1pt] node [below right] {$z_0$};
  6. \draw [blue!75!black, very thick, decorate, decoration={random steps}] (0,0) circle [radius=3cm] ;
  7. \draw[red!50!black, decorate, decoration={bumps, segment length=2cm, amplitude=2pt}] (0,0) -- (30:3);
  8. \draw[green!50!black, decorate, decoration={bumps, segment length=2cm, amplitude=2pt}] (0,0) -- (150:3);
  9. \draw[blue!50!black, decorate, decoration={bumps, segment length=2cm, amplitude=2pt}] (0,0) -- (270:3);
  10. \end{tikzpicture}
  11. \end{document}

KR
Rainer

User avatar
Mohsen Avaji
Posts: 14
Joined: Mon Aug 27, 2012 12:06 am

Postby Mohsen Avaji » Sun Sep 15, 2019 5:33 pm

Dear Kr Rainer
Thank you for your help and suggestion, in visual tikz I found some beautiful picture
but non of them they were not similar to the attached figure.

Is there another way to draw this figure?

Best wishes for you.
Yours faithfully,
Mohsen Avaji.

rais
Posts: 235
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sun Sep 15, 2019 9:53 pm

Mohsen Avaji wrote:in visual tikz I found some beautiful picture
but non of them they were not similar to the attached figure.

does this mean you did not try the code I provided?
Yes, it's not matching your figure 100%, but I fail to see a point in trying to achieve that, unless this `irregular' is something else than `freehand' and follows some rules---rules, I have yet to see.
And, of course, feel free to tweak some of the parameters like `amplitude', `segment length', and the decoration itself.
Have a look into the tikz-manual, too, especially `path morphing' and `decorations'.

BTW: `KR' stands for `Kind Regards' (I must confess I'm lazy at times;-)

KR
Rainer

User avatar
Mohsen Avaji
Posts: 14
Joined: Mon Aug 27, 2012 12:06 am

Postby Mohsen Avaji » Tue Sep 17, 2019 4:30 am

Dear Rainer
Thank your for your reply and help.
Before I ask my question on this site, I had seen Tikz-manual.
I saw your code and checked it, but it wasn't what I wanted.
I found the answer of my question.

Thanks again.
Yours faithfully,
Mohsen Avaji.

User avatar
Mohsen Avaji
Posts: 14
Joined: Mon Aug 27, 2012 12:06 am

Postby Mohsen Avaji » Wed Sep 18, 2019 6:25 pm

Hi
In the following code, how can thickness the circle and its radius?
Thank you.

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{tikzpicture}
  2. \begin{scope}[>=latex]
  3. \draw (2,0.8) node{$a(z-z_{0})F(z)$};
  4. \draw[->] (1.2,0.2) to [out=30, in=150] (2.2,0.2) ;
  5. \draw[clip] plot[smooth cycle,variable=\t,samples at={0,45,...,315}] (\t:{1*(1+0.1*rnd)});
  6. \foreach \X [count=\Y starting from 0] in {red,blue,green!70!black}
  7. {\draw[\X] plot[smooth,variable=\t,samples at={0,0.25,...,1.75}]
  8. ({15+6*(rnd)+120*\Y}:\t);
  9. }
  10. \end{scope}
  11. \end{tikzpicture}
Yours faithfully,
Mohsen Avaji.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Sep 18, 2019 6:45 pm

You can add a line width option, such as:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{scope}[>=latex, line width=1pt]


Stefan
Site admin

rais
Posts: 235
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Fri Sep 20, 2019 8:53 pm

In this case you could omit the {scope} environment completely and apply its options directly to the {tikzpicture} environment.
Instead of `line width=...', you could also use any of the predefined line widths, such as `thick', 'very thick', and the like.
If you want to have different line widths for the circle and its radii, e.g., to subdue the radii, you could put such a line width option into the options for \draw, like
\draw[very thin, \X]

KR
Rainer


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests