A fixed point is at a perpendicular distance a from a fixed straight line and a point moves so that its distance from the fixed point is always equal to its distance from the fixed line. The axes of coordinates being drawn through the fixed point and being parallel and perpendicular to the given line.If the first distance be (1) always half and (2) always twice the second distance, find the equations to the respective loci.