During one of the weekly Thursday nets of the Burnaby Amateur Radio club (2000 pst on 145.350 MHz -600) the discussion turned to fractal antennas, and I was inspired to attempt to create a model in cocoaNEC, a macOS application for modeling antennas (http://www.w7ay.net/site/Applications/cocoaNEC/).
In my experience, most people use the spreadsheet functionality to create the antenna models, laboriously entering the x, y and z positions of each segment endpoint of their antennas. For simple antennas, a dipole antenna, this is fine, but when your antenna ideas get a bit complicated this task becomes onourous.
cocoaNec 2.0 includes, in addition to the spreadsheet functionality, a programming method to describe antennas using a scripting language called NC. NC is similar enough to C that it will be usable by anyone who has some rudimentary programming experience.
In addition to being easier to create antennas in NC than it is in the spreadsheet, it is possible to optimize antennas by selecting a parameter, or many parameters of the antenna
Unfortunately there are some behaviours of NC that I don't like
- variables can only be defined at the begining of functions
- variables cannot be assigned in the definition
- some functions do not behave like functions, see runModel for example
- you are limited to one module, or source file for your script
- hard to reuse code you've written before, you must cut and paste
That said, I have been able to quickly create models of antennas and then optimize the designs before I attempt to build them.
The '.nc' files in this repository can be loaded and executed with a free macOS application called cocoaNEC, which is an application used for desiging and modeling antennas. You can download it from
http://www.w7ay.net/site/Applications/cocoaNEC/
The cocoaNEC 2.0 application. And a macOS computer.
- cocoaNEC 2.0 - The antenna design software
BoringFractal.nc - my first attempt, making sure NC allows recursion
Dipole.nc - the antenna to beat
DragonCurve.nc - a fractal generated by folding
KochFractal.nc - generated by replacing the center of a line with a triangle
- Rich Nistuk (VA7RHN) - Initial work - rnistuk
This project is licensed under the GNU Affero General Public License v3.0
- Advice and inspiration from the members of the Burnaby Amateur Radio Club