import math


def getCircleXandD1FromRadians(thetaSet, radius, origin):
    """
    Gets the coordinates and derivatives along a circular path
    based on an angular range.
    :param thetaSet: Lower and upper limit of theta.
    :param radius: Radius of circle.
    :param origin: Origin of circle.
    :return: coordinates, derivatives on lower and upper
    limit of thetaSet.
    """
    nx = []
    nd1 = []
    dTheta = thetaSet[1] - thetaSet[0]
    for n in range(2):
        theta = thetaSet[n]
        x = [radius * math.cos(theta) - origin[0],
             radius * math.sin(theta) - origin[1],
             0.0]
        d1 = [-radius * math.sin(theta) * dTheta,
              radius * math.cos(theta) * dTheta,
              0.0]
        nx.append(x)
        nd1.append(d1)

    return nx, nd1