The right choice of the basis functions that are used to represent the elementary currents is very important. It will determine the accuracy and computational efficiency of the resulting numerical solution. Rooftop basis functions are one of the more popular types of basis functions used in a variety of MoM formulations. The simplest rooftop function is the one-dimensional triangular functions defined as in the figure below:
<table><tr><td> [[FileImage:18_meshing_tn.gif|thumb|360px|Triangular basis function.]]</td> </tr></table>
This function provides a linear interpolation of the unknown currents or fields in one dimension. Note that the function vanishes at it two ends. This is a desirable feature for basis functions that represent electric currents on metallic wires as the current must vanish at the two ends of a wire. The total current on the wire can be approximated in a linear fashion by a set of one-dimensional rooftop functions as shown in the figure below:
<table><tr><td> [[FileImage:19_meshing_tn.gif|thumb|480px|Meshing a wire with rooftop (triangular) basis functions.]]</td> </tr></table>
This can be written as
:<math> I(l) = \sum_{n=1}^N a_n f_n(l) \mathbf{\hat{s}_n} </math>
<!--[[File:20_meshing_tn.gif]]-->
where l is the length coordinate along the wire with l=0 at its start point. <math>f_n(l)</math> is the scaled and translated version of the linear basis function <math>f(l)</math> shown in the previous figure. <math>\mathbf{\hat{s}_n}</math> is the unit vector along wire.