Imported Upstream version 4.6.0
[debian/atlc] / docs / html-docs / colours.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN -x">
2 <html>
3 <head>
4 <meta name="generator" content="HTML Tidy, see www.w3.org">
5 <meta name="generator" content="Mostly bluefish &amp; vi. Sometimes netscape">
6 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1">
7
8 <meta name="DESCRIPTION" content="Colour codes for atlc">
9 <meta name="KEYWORDS" content="Colour color atlc">
10 <title>Colour codes for atlc software.</title>
11 </head>
12 <body>
13 <H1>Producing suitable bitmaps</H1>
14 <a name="produce"> </a><COdE>atlc</code> expects to find the transmission line's cross section to be found in a standard bitmap (.BMP or .bmp) file. There are several forms of bitmaps, some grayscale, some 8-bit colour (256 colours), some 16 bit colour, some 24-bit colour. Some bitmaps are compressed. <COde>atlc</code> expects to see uncompressed 24-bit bitmaps. This may sound restrictive, but in practice most graphics software can save such files. </P>
15
16 Since the form of the input file is critical, we will discuss this a little. 24-bit images have 8 bits per colour (8 for red, 8 for green and 8 for blue). Hence there are 256 shades of red, 256 shades of green and 256 shades of blue, giving a total of 256*256*256=16,777,216 possible colours. It follows that 3 bytes of data are needed to describe each pixel (ignoring compressed images which are not supported). Each bitmap has a small header of around 56 bytes, followed by 3 bytes for every pixel. The minimum possible length for a bitmap of x by y pixels is then 56+3*width*height (bytes). In practice, images are usually a little larger than this, as there is some padding. If your images are not at least this size, something is wrong! For a more detailed discussion of bitmap files <STRONG>(unnecessary for using <COde>atlc</code>)</STRONG>, see this <a href="bmp.html">HTML page</A> I found on the web somewhere. <br><br>
17 Colours in bitmap files are often written as red,green,blue as in 26,239,179 indicating the amount of red (26), the amount of green (239) and the amount of blue (179). Amounts vary from 0 (none of the colour) to 255 (the maximum possible amount of the colour. Often the colours are written in hexadecimal format as 0x1aefb3 or 0x1AEFB3. Such a colour will look like this. <br><img src="jpgs/1aefb3.jpg" ALT="The colour 0x1AEFB3 or 26,239,179" width="32" height="32">
18
19 <br> <br>
20 It is absolutely <STRONG>essential</STRONG> that you are able to produce bitmap images with <STRONG>exactly</STRONG> the colours <COde>atlc</code> needs. <br><br>
21
22 One conductor must be produced in <STRONG>pure red</STRONG>. i.e 255,0,0 or 0xFF0000. This red will look like the red square on the left. The one on the right is very slightly different, having a very small amount of blue, and so has the colour representation 255,0,1 or 0xFF0001. The colour on the left will be interpreted by <COde>atlc</code> as one conductor, the one on the right will not. Hence it is essential to check the colours produced by your graphics package not only look <EM>about right</EM>, but are <STRONG>exactly</STRONG> right. <TABLE>
23 <TR>
24 <TD><img src="jpgs/ff0000.jpg" ALT="Pure red 0xFF0000" width="32" height="32"></TD>
25 <TD><img src="jpgs/ff0001.jpg" ALT="Re with a little blue 0xFF0001" width="32" height="32"></TD>
26 </TR>
27 </TABLE>
28 <br> 
29 Graphics packages such as <A HREF="http://www.gimp.org">Gimp</A> (freely available for no cost on UNIX systems) will allow you to set a colour precisely. <br><br>
30 You then need to draw an image of the cross section of the transmission line to be analysed. The scale can be anything you reasonably want, but should result in the largest dimension in your transmission line have 200 or more pixels allocated to it. Making the bitmap much smaller (say 32 pixels in one dimension) will results in fast but inaccurate results. Much larger bitmaps, say 1000x1000, will take a long time to compute. The bitmaps don't have to be square. You should aim to fill the whole of the bitmap with the relevant details, and not have a lot of unused space on the bitmap. For example, the image on the left below is fine, but the one on the right will spend a lot of time computing nothing of value. <br>
31 <table>
32 <tr>
33 <TD><img src="jpgs/full-size.jpg" ALT="Relevant data fills bitmap" width="128" ></TD>
34 <TD><img src="jpgs/too-small.jpg" ALT="Wasted space = wasted computing time." width="128"></td>
35 </tr>
36 </table>
37 <h1>Predefined colours in <code>atlc</code></h1>
38 The input file to atlc, which is a bitmap, must have the correct colours to indicate what parts of the image are conductors and dielectrics. Parts at ground (0 V) potential must be drawn green, those at +1 V must be drawn red and those at -1V must be drawn blue. Only red and green are noramlly used for conductors, with blue being used only on couplers. Vacuum dielectric must be drawn white. Many other colours have very specific meanings as shown below. 
39 <p>
40 The following colours are predefined in <code>atlc</code>. These can be used, without the user specifying what they mean. 
41
42 <h2>Predefined conductors</h2>
43
44 <table>
45 <tr>
46 <td><img src="jpgs/ff0000.jpg" alt="+1 V conductor" width="128" height="128"></td>
47 <td><img src="jpgs/00ff00.jpg" alt="0 V conductor" width="128" height="128"></td>
48 <td><img src="jpgs/0000ff.jpg" alt="-1 V conductor" width="128" height="128"></td>
49 </tr>
50
51 <tr>
52 <td>Red<br>
53 live conductor<br>
54 RGB=0xff0000<br>
55 rgb=255,0,0</td>
56 <td>Green<br>
57 ground conductor<br>
58 RGB=0x00ff00<br>
59 rgb=0,255,0</td>
60 <td>Blue<br>
61 -1v conductor<br>
62 RGB=0x0000ff<br>
63 rgb=0,0,255</td>
64 </tr>
65 </table>
66
67 The following dielectrics are pre-defined. 
68
69 <h2>Predefined dielectrics</h2>
70
71 <table>
72 <tr>
73 <td><img src="jpgs/ffffff.jpg" alt="Vacuum" width="128" height="128"></td>
74 <td><img src="jpgs/ffcaca.jpg" alt="Air" width="128" height="128"></td>
75 <td><img src="jpgs/8235ef.jpg" alt="PTFE" width="128" height="128"></td>
76 <td><img src="jpgs/8e8e8e.jpg" alt="RT Duroid 5880" width="128" height="128"></td>
77 <td><img src="jpgs/ff00ff.jpg" alt="Polyethelene" width="128" height="128"></td>
78 </tr>
79
80 <tr>
81 <td>White<br>
82 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=1.0<br>
83 Vacuum<br>
84 RGB=0xffffff<br>
85 RGB=255,255,255</td>
86 <td>Pink<br>
87 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=1.0006<br>
88 Air<br>
89 RGB=0xffcaca<br>
90 RGB=255,202,202</td>
91 <td>Light Blue<br>
92 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=2.1<br>
93 PTFE<br>
94 RGB=0x8235ef<br>
95 RGB=130,52,255</td>
96 <td>Gray<br>
97 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=2.2<br>
98 RT duroid 5880<br>
99 RGB=0x8e8e8e<br>
100 RGB=142,142,142</td>
101 <td>Mauve<br>
102 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=2.33<br>
103 Polyethelene<br>
104 RGB=0xff00ff<br>
105 RGB=255,0,255</td>
106 <td></td>
107 </tr>
108
109 <tr>
110 <td><img src="jpgs/ffff00.jpg" alt="Polystyrene" width="128" height="128"></td>
111 <td><img src="jpgs/efcc1a.jpg" alt="PVC" width="128" height="128"></td>
112 <td><img src="jpgs/bc7f60.jpg" alt="Epoxy resin" width="128" height="128"></td>
113 <td><img src="jpgs/dff788.jpg" alt="FR4 PCB" width="128" height="128"></td>
114 <td><img src="jpgs/1aefb3.jpg" alt="Fibreglass" width="128" height="128"></td>
115 </tr>
116
117 <tr>
118 <td>Yellow<br>
119 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=2.5<br>
120 Polystyrene<br>
121 RGB=0xffff00<br>
122 RGB=255,255,0</td>
123 <td>Sandy<br>
124 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=3.3<br>
125 PVC (at 1MHz)<br>
126 RGB=0xefcc1a<br>
127 RGB=239,203,27</td>
128 <td>Brown<br>
129 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=3.335<br>
130 Epoxy resin<br>
131 RGB=0xbc7f60<br>
132 RGB=188,127,96</td>
133 <td>Light yellow<br>
134 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=3.7<br>
135 FR4 PCB<br>
136 RGB=0xdff788<br>
137 RGB=223,247,136,</td>
138
139 <td>Terquoise<br>
140 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=4.8<br>
141 Fibreglass PCB<br>
142 RGB=0x1aefb3<br>
143 RGB=26,239,179</td>
144
145 </tr>
146
147 <tr>
148 <td><img src="jpgs/696969.jpg" alt="RT Duroid 6006" width="128" height="128"></td>
149 <td><img src="jpgs/dcdcdc.jpg" alt="RT duroid 6010" width="128" height="128"></td>
150 <td><img src="jpgs/d5a04d.jpg" alt="Er = 100" width="128" height="128"></td>
151 </tr>
152
153 <tr>
154 <td>Dark grey<br>
155 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=6.15.<br>
156 RT duroid 6006<br>
157 RGB=0x696969<br>
158 RGB=142,142,142</td>
159 <td>Light gray<br>
160 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=10.2<br>
161 RT duroid 6010<br>
162 RGB=0xdcdcdc<br>
163 RGB=240,240,240</td>
164 <td>Dark Orange<br>
165 <font face="symbol">e</font><font face="ariel"><sub>r</sub></font>=100<br>
166 Er of 100.0<br>
167 RGB=0xd5a04d<br>
168 RGB=213,160,77</td>
169 </tr>
170 </table>
171
172 Note, the permitivity of free space (vacuum) is by definition 1.0. Air is very close to 1, but depends on pressure and temperature. Although the difference in permittivity between air and vacuum is smaller than the errors in <code>atlc</code>, having another permittivity very close to 1.0 is useful, as for test purposes. The figures for the plastics given above are only approximate. The permittivity of plastics are usually frequency dependant and temperature dependant. 
173
174 <h2>Entering the permittivity of other materials into <code>atlc</code></h2>
175
176 If you know the exact value of your dielectric material, draw the dielectric in a new colour, but define the colour with a command line option. For example, if your transmission line has a dielectric of 2.42 somewhere, then you must 
177
178 <ol>
179 <li>Draw the image, using a different colour (say a golden colour with RGB=0xf9e77d or in decimal RGB=249,231,125)</li>
180
181 <li>Run <code>atlc</code> with the following command line option.<br>
182  % atlc -d f9e77d=2.43 somefile.bmp</li>
183 </ol>
184
185 this sets the colour f9e77 in somefile.bmp to reresent a permittivity of 2.43. 
186 <p>
187 atlc is written and supported by <a href="jpgs/home-email.jpg">Dr. David Kirkby (G8WRB)</A><p>
188 <a href="http://atlc.sourceforge.net">Return to the atlc homepage</a>
189 <a href="http://homepage.ntlworld.com/drkirkby/list1.html"></a>
190 <a href="http://homepage.ntlworld.com/drkirkby/list2.html"></a>
191 <a href="http://homepage.ntlworld.com/drkirkby/list3.html"></a>
192 <a href="http://homepage.ntlworld.com/drkirkby/list4.html"></a>
193 <a href="http://homepage.ntlworld.com/drkirkby/list5.html"></a>
194 <a href="http://homepage.ntlworld.com/drkirkby/list6.html"></a>
195 <a href="http://homepage.ntlworld.com/drkirkby/list7.html"></a>
196 <BR>
197 <BR>
198 <A href="http://sourceforge.net"> <IMG
199 src="http://sourceforge.net/sflogo.php?group_id=25836&amp;type=5"
200 width="210" height="62" border="0" alt="SourceForge.net
201 Logo"></A>
202 </body>
203 </html>
204