import math


def generate_equator(step=0.5, type='equ'):
    """
    step is in degrees
    types:
        equ = celestial equator
        ecl = ecliptic
        gal = galactic equator
    """
    eps = math.radians(23.4392911)
    se = math.sin(eps)
    ce = math.cos(eps)
    d = 0.
    points = []
    while d <= 360.0:
        rx = math.radians(d)
        sx = math.sin(rx)
        cx = math.cos(rx)
        if type == 'equ':
            points.append(tuple([d, 0.]))
        elif type == 'ecl':
            # Because beta is 0, some terms cancel out
            ra = math.degrees(math.atan2(sx * ce,  cx)) / 15.
            dec = math.degrees(math.asin(se * sx)) 
            points.append(tuple([ra, dec]))
        elif type == 'gal':
            pass
        d += step
    return points