Example #1
0
def dtf_connect_points(points):
    d = ""
    total_distance = 0
    last_dist = 0
    for i,s in enumerate(points[:-1]):
        e = points[i+1]
        total_distance += distance(s, e)
        if (total_distance - last_dist) > feet(40):
            offset = e.offset_miles(1,0)
            d += dtf.dtf_text(offset,
                             "T+%02d %.2f miles, %s, %dmph. tas" %
                             (int(e.tm/60), miles(total_distance),
                              alt_text(e.alt), int(e.tas)))
            d += dtf.dtf_circle(e, feet(1))
            last_dist = total_distance
            m = midpoint(s,e)
            a1,a2 = arrow(s,m)
            d += dtf.dtf_line(m,a1)
            d += dtf.dtf_line(m,a2)
            d += dtf.dtf_line(a1,a2)
        d += dtf.dtf_line(s,e)
    return d
Example #2
0
def draw_lines(t):
    points = generate_grid(t)
    s = ""
    for (p1,p2) in points:
        s += dtf.dtf_line(p1, p2)
    return s