-UnixWebMath-

Antenna Pattern Plotting Functions

Plotting two-dimensional antenna patterns

There are several functions that facilitate the plotting of two-dimensional (2D) antenna patterns:

- PatPlotxy[f] for plotting x-y plane patterns,
- Patplotyz[f] for plotting y-z plane patterns,
- PatPlotxz[f] for plotting x-z plane patterns,
- PatPlot2DAll[f] for plotting all of the above.

All of these predefined routines can be loaded by typing

<< notebooks/PatPlot.m

Use of these graphical notebooks requires the specification of a function specifying the pattern in terms of the angles spherical angles theta and phi. This function must be positive for all relevant theta and phi directions. Of course, this function may represent a field pattern as well as a power pattern. We will next illustrate the use of these different plotting routines

PatPlotxy

Consider an antenna with a radiation intensity specified as

U(theta,phi)=cos^2(theta) * sin^2(phi)

To plot the x-y power pattern of this antenna, you specify

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

Out[2]=

  -Graphics-


Notes:

(a) The ClearAll[u] directive clears all previous definitions of the function u. While
it is not needed in the current application (since excecuting these commands over
the web starts a new Mathematica session), clearing all new functions is generally
a good idea. If you do not clear a function, your new definition will be appended
to all already existing definitions of the same function, creating a "rule base".

(b) Note the format for defining a function: the variables on the left-hand side of
the definition are followed by an underscore, the left and rigth hand sides are separated
by ":=" (not by a simple "="), and on the rigth hand side, the variables appear without
underscore.

PatPlotxz

If, instead, you wish to plot the power pattern of this antenna in the x-z plane, you issue
the commands

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

Out[4]=

  -Graphics-

PatPlotyz

Similarly, y-z patterns are obtained by using the PatPlotyz routine. For example,
consider an antenna with a field pattern given by

f(theta,phi)=sin(5*theta)

The y-z pattern of this antenna is plotted as

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

Out[6]=

  -Graphics-

PatPlot2DAll

All three 2D patterns are plotted simultaneously when you use PatPlot2DAll. For the
antenna with power pattern U(theta,phi)=cos^2(theta) * sin(phi) (also used in the
first two examples), all power patterns are plotted by issuing the commands:

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

The PlotPoints -> (# of points) Option

Mathematica uses built-in and predefined resolution density for plotting the
above functions. Sometimes, for highly oscillatory pattern plots, the fine detail of
the pattern migth be lost because of low sampling. All of the above functions
permit the specification of the

PlotPoints -> (# of points)

directive, following the function argument. As a matter of fact, you can insert
all Mathematica graphics options in this manner after the function argument.
As an example, suppose an antenna is characterized by a field pattern

f(theta,phi)=Sqrt(Cos^2(20*phi)*Sin(theta))

Plotting this pattern using the PlotPoints option is illustrated in the window below. Try
the same without specifying the PlotPoints option, or with a reduced sampling rate, and
notice the difference!

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

Plotting three-dimensional antenna patterns

PatPlot3D

The PatPlot3D routine permits the visualization of three-dimensional (3D) field
and power patterns. Consider, an antenna with power pattern given by U(theta,phi)=cos^2(theta) * sin(phi). The 3D pattern is plotted by issuing the
commands

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:


The PlotPoints option can also be used with the PatPlot3D routine. For example,
consider an antenna with power pattern U(theta,phi)=Cos^2(6*phi)*Sin^2(theta).
The power pattern of this antenna is plotted below. Increase the sampling density
and observe the improvement!

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

PatPlotAll

Finally, the PatPlotAll routine renders all 2D plots and the 3D pattern of the
function specified. For example, with F(theta,phi)=sin(theta), you get

Input Block:

Adjacent images can be compiled into a movie and 3D graphics can be converted to a VRML format:
Note: VRML images require a VRML viewer and Movies require a MPEG viewer.

Select a display mode

Enter values in this section only if you are submitting a job for later retrieval:

Title for job:
Brief description of the job:

This script was developed at the Center for Computational Electromagnetics (CCEM) in the University of Illinois at Urbana with funding from the Sloan Center for Asynchronous Learning Environments(SCALE).
Back to main page