def make_alm_bg_hdots(bclc, first_sunday, no_days, chart) : # horizontal dots # we start with the first Sunday of the year for sunday in range(first_sunday, no_days, 7) : x1 = 0 x2 = chart.width y = chart.height - (sunday * chart.height / no_days) bclc.stroke(path.line(x1, y, x2, y), [color.cmyk.Gray, style.linestyle(style.linecap.round, style.dash([0, 3.248]))])
def make_alm_bg_vdots(bclc, first_sunday, no_days, chart) : # vertical dots # left side is 4pm, right side is 8am. We will draw dots every 1/2 hour nlines = int(round((chart.URcorn-chart.ULcorn)/ephem.hour*2+1)) xincr = chart.width/(nlines-1) h = chart.height for i in range(nlines) : bclc.stroke(path.line(i*xincr, 0, i*xincr, h), [color.cmyk.Gray, style.linestyle(style.linecap.round, style.dash([0, 2.6333*366.0/no_days]))])
############################################################################### # # w, h = 2.2, 2.4 c = canvas.canvas() r0 = 0.4*w # second hole r1 = 1.4*w # last hole #st_target = st_curve+st_dashed #st_target = [red, style.linewidth.THick, deco.earrow(size=0.2)] #st_target = st_curve+st_dashed st_target = st_curve+[ style.linestyle(style.linecap.butt, style.dash([2], offset=1, rellengths=False))] def manifold(x, y, labels, count): if count in [0, 2]: c.stroke(path.line(x-r0, y, x+r1+r0, y), st_curve) else: extra = list(st_curve) #if count==3: # extra.append(trafo.scale(x=x, y=y, sx=1, sy=-1)) Turtle(x-0.85*r0, y, pi/2).\ fwd(0.3).\ right(0.25*pi, 0.4).left(0.50*pi, 0.73).left(0.88*pi, 0.15).\ fwd(0.55).\ right(0.88*pi, 0.15).right(0.50*pi, 0.73).\ left(0.25*pi, 0.52).goto(x+r1+r0, y).\