An electromechanical device for generating both sine and cosine functions is described. A motor rotates a cylinder about an axis parallel to and a slight distance from the central axis of the cylinder. Two noncontacting displacement sensing devices are placed ninety degrees apart, equal distances from the axis of rotation of the cylinder and short distances above the surface of cylinder. Each of these sensing devices produces an electrical signal proportional to the distance that it is away from the cylinder. Consequently, as the cylinder is rotated the outputs from the two sensing devices are the sine and cosine functions.