code: def cartesian(lon, lat):
      
      return N.array([
          N.cos(lat)*N.cos(lon),
          N.cos(lat)*N.sin(lon),
          N.sin(lat)
          ])
docs: Converts spherical positions in (lon, lat) to cartesian coordiantes [x,y,z].
      For the purposes of this library's focus on orientations, this operates in a
      *north = vertical* framework. That is, positions around the equator are in the
      [x,y] plane, and dipping planes occur with higher latitudes.
  
      This is intuitive for strike and dip representations, as it maps
      (strike, dip) to (lon, lat). However, we note that it is distinct from the
      traditional stereonet representation, which puts the X-Y plane along the prime
      meridian.