To go along with my other fractals: Tikz Fractal - Cantor Dust and Tikz Fractal - Menger Sponge, which you lovely people have helped my create, I would like to construct a "uniform Cantor set".
The construction is as follows:
Take the unit interval [0,1] and at each stage replace each interval with (a fixed number) n intervals of length less than |I|/n, where |I| is the length of the interval, and where an end point of the each of the subintervals coincides with the end point of its 'father' interval.
Here is a picture to try to make my shoddy explanation a little clearer:

The standard middle third Cantor set is where n=2 and |I|=1/3:

Short of working out all of the length and spacings, how can I construct this "automatically"? My thinking is that I should use a linedenmayer system but I have not done this for line segments before.





Fare drawn, due toaxiom=F, and all others words of the grammar (heref) take up blank space ? – marsupilam Aug 13 '17 at 21:52Fandfare library keywords fordraw a lineandtake up space. Theaxiom=Foption sets the initial state, the root from which next steps are iteratively expanded following the system's rules. (By the way, very elegant code ! It would be a nice example for the TikZ manual.) – marsupilam Aug 13 '17 at 22:04