{0,1,0,1}.{2/3, 2/9, 2/27,2/81}

lc[b_List] := b.Table[2/(3^k), {k,Length[b]}]

lc[{0,1,0,1}]

rc[b_List] := lc[b]+1/(3^(Length[b]))

rc[{0,1,0,1}]

CS[n_] := Flatten@Table[
box[lc[bx],lc[by]],
{bx, Tuples[{0,1},n]}, {by, Tuples[{0,1},n]}
]

CS[3]

lc[b_List] := b.Table[2/(3^k), {k,Length[b]}];
CS[n_,θ_]:=Flatten@Table[
interval[Cos[θ]lc[bx]+Sin[θ]lc[by],Cos[θ]lc[bx]+Sin[θ]lc[by]+{1,1}.{Cos[θ],Sin[θ]}/(3^n) ],
{bx, Tuples[{0,1},n]}, {by, Tuples[{0,1},n]}
]

CS[2,π/6.]

?Rectangle

Manipulate[
M={{Cos[θ],Sin[θ]},{-Sin[θ],Cos[θ]}};
Graphics[CS[5] /. box[x_,y_] :> Rectangle[M.{x,y}, M.(1/(3^5)+{x,y})]],
{θ,0,π/2}
]