«

»

Feb 10

Drawing 2D radiation pattern using latex

I was wondering always, how to draw 2D antenna radiation pattern using tikz. I’ve finally figured out a way to draw it. My example code is below:

documentclass{article} % say
usepackage{tikz}
usetikzlibrary{through}
begin{document}
begin{tikzpicture}[scale=3]
draw[line width=2pt] plot[smooth] coordinates{
(0.000000000000000:1.150696803671314)
(10.000000000000000:1.109010173560963)
(20.000000000000000:1.005774774229604)
(29.999999999999996:0.873895196847011)
(40.000000000000000:0.715671474041031)
(50.000000000000000:0.535249735011384)
(59.999999999999993:0.347037334115942)
(70.000000000000000:0.178899903525623)
(80.000000000000000:0.069191578335660)
(90.000000000000000:0.038848190007194)
(100.000000000000000:0.083103077745954)
(110.000000000000000:0.191007525327720)
(119.999999999999990:0.356714490965267)
(130.000000000000000:0.573313408578237)
(140.000000000000000:0.806004491101224)
(150.000000000000000:0.999364708018521)
(160.000000000000000:1.132102806625732)
(170.000000000000000:1.208323740806376)
(180.000000000000000:1.205763767746486)
(190.000000000000000:1.119087052034973)
(200.000000000000000:0.996900128069532)
(210.000000000000000:0.868248301176504)
(220.000000000000000:0.716866900924059)
(230.000000000000000:0.541648322477907)
(239.999999999999970:0.386533290518333)
(250.000000000000030:0.287690804797076)
(260.000000000000000:0.241969051119912)
(270.000000000000000:0.234719353470997)
(280.000000000000000:0.256050403691115)
(290.000000000000000:0.305762708030155)
(300.000000000000000:0.395298482873201)
(310.000000000000000:0.531236218314417)
(320.000000000000000:0.694584874449316)
(330.000000000000000:0.854157732305391)
(340.000000000000000:0.994792178281235)
(350.000000000000000:1.104486969535200)
(360.000000000000000:1.150696803671315)
};
coordinate (a) at (1.208323740806376,0);
coordinate (c) at (0,0);
node [draw,line width=1pt,circle through=(a),
label=left:$180^circ$,
label=right:$0^circ$,
label=30:$30^circ$,
label=60:$60^circ$,
label=90:$90^circ$,
label=120:$120^circ$,
label=150:$150^circ$,
label=180:$180^circ$,
label=210:$210^circ$,
label=240:$240^circ$,
label=270:$270^circ$,
label=300:$300^circ$,
label=330:$330^circ$] at (c) {};
draw[line width=1pt,dashed] (0,0) circle (1.208323740806376/2);
draw[line width=1pt,dashed] (0,0) circle (1.208323740806376/4);
draw[line width=1pt,dashed] (0,0) circle (1.208323740806376*3/4);

draw[line width=1pt,dashed] (0,0) — (30:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (60:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (120:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (150:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (210:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (240:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (300:1.208323740806376);
draw[line width=1pt,dashed] (0,0) — (330:1.208323740806376);

draw[line width=1pt] (180:1.208323740806376) — (0:1.208323740806376);
draw[line width=1pt] (270:1.208323740806376) — (90:1.208323740806376);
end{tikzpicture}

end{document}

Result of this code is shown in .pdf file. However, the .tex file is also attached (due to the restictions I added .doc file).

pdf file: Radiation pattern in pdf

tex file: tex file

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>