import math


def slopeRadians(dist):
    """
    Given the distance in meters find the slope in radians.

    We assume the "road" is an undulating sine wave
    with a constant frequency and amplitude. If amplitude
    is 0 there is no undulations.
    """
    # The cos(sin(x)) is the slope of a line tagent to the sin curve at x
    freq = 100.0 # 100 meters
    amplitude = 1.0 / freq # 0.0 for level 1.0 for slight undulation
    c = math.cos(2.0 * math.pi * (dist / freq)) * amplitude
    return c