I have been making cantor type sets. I have the following code, how to lower the position of gray lines a bit so that I can see the intersection.
The code is:
cantorRule = Line[{{a_, n_}, {b_, n_}}] :> With[{d = b - a, np = n - 0.1`},
{Line[{{a, np}, {a + (3 d)/4, np}}], Line[{{b - d/2, np}, {b, np}}]}
]
label = # /. l : Line[p : {{_, _}, {_, _}}] :> {l, Black, Text[Rationalize[#[[1]]], Offset[{0, -20}, #], {Center, Top}] & /@ p} &;
lines = Flatten@NestList[# /. cantorRule &, Line[{{0., 0}, {1., 0}}], 6];
coloredlines = Flatten[Riffle[{Black, Gray}, #] & /@ Partition[lines, 2, 2, {-1, 1}, {}]];
Graphics[{CapForm["Butt"], Thickness[.05], coloredlines}]