def normal2SD(x, y, z):
    """Converts a normal vector to a plane (given as x,y,z)
    to a strike and dip of the plane using the Right-Hand-Rule.
    Input:
        x: The x-component of the normal vector
        y: The y-component of the normal vector
        z: The z-component of the normal vector
    Output:
        strike: The strike of the plane, in degrees clockwise from north
        dip: The dip of the plane, in degrees downward from horizontal
    """
    from math import asin, atan2, sqrt, degrees
    z = -z
    r = sqrt(x * x + y * y + z * z)
    plunge = degrees(asin(z / r))
    bearing = degrees(atan2(y, x))
    bearing = 90 - bearing
    if bearing < 0:
        bearing += 360
    if plunge < 0:
        plunge = -plunge
        bearing -= 180
        if bearing < 0:
            bearing += 360
    strike = bearing + 90
    dip = 90 - plunge
    if strike > 360:
        strike -= 360
    return strike, dip
