/cantor_3-4

code for creating & drawing Cantor-like sets, removing the 3rd interval of 4 at each iteration (and eventually the 2/4)

Primary LanguageJavaScript

Cantor-like Sets

Taking the interval [0,1], divide the interval into four equal intervals, and remove the third, leaving two intervals of length 1/2 and 1/4 respectively.

to see the first three iterations: https://bambery.github.io/cantor_3-4/

next steps

  • generalize for taking 2/4
  • investigate generalizing for aribitrary intervals for dividing and taking, ie divide into 5ths, take only 2/5, take 2/5 and 3/5, take only 3/5.

excuses

It's been a hot minute since I wrote Javascript, and I am spoiled for Python. Need to brush up my skills and get back into the swing of the syntax.