Cantor Set Builder
The learner removes open middle thirds from [0, 1] stage by stage and watches C_0, C_1, ... stack up. They follow a point (1/4 survives every stage, 1/2 is cut at stage 1) with its ternary digits and binary address, drag a zoom window until a gap appears inside it (nowhere dense), list the endpoints that crowd around a point (perfect), and read the kept length (2/3)^n; a dense set (Q ∩ [0,1]) or a fat Cantor set can be drawn alongside.
Used in: Mathematical Analysis
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Removing middle thirds" | Title bar text. |
| controls | string[] | all controls shown | Ids of the hideable controls and text blocks to show (see the controls registry, e.g. panel.point, readout.ternary, compare.rationals, panel.approximants). Core controls (stage, zoom, readout.gap) always show. Page building fills this from the subject's topic scope. |
| levels | number | 6 | Number of stages available, 1 to 12 (rows C_0 ... C_levels). |
| stage | number | 2 (or levels if smaller) | Stage shown at start, 0 to levels; the learner steps with Back / Remove middle thirds. |
| zoomInterval | [number, number] | none (zoom closed; the Zoom in button opens [0.2, 0.35] or a window around the point) | Opens the zoom window [a, b] (0 ≤ a < b ≤ 1): a magnified strip of the current stage inside it, with the largest removed gap that meets the window marked. The learner drags the window edges on the main strip. |
| point | number | string | none | Tracked point in [0, 1], as a fraction string ("1/4") or a number (0.25, read exactly as 1/4). Shown on every row with the piece it lands in (or the stage that removes it); the learner clicks the strip, picks a chip or types a value to change it. |
| points | (number | string)[] | ["1/4", "1/3", "1/2", "3/4"] | Quick-pick chips for the tracked point. |
| compareWith | "none" | "rationals" | "fat-cantor" | "none" | Draws a second set under the stages and in the zoom: rationals = Q ∩ [0,1] as ticks (dense: points in every window), fat-cantor = the Smith-Volterra-Cantor set F_n (middles of length 4^-k removed; kept length tends to 1/2, still no interval). The learner can switch. |
| showAddresses | boolean | false | Start with each piece labelled by its ternary address (00, 02, 20, 22, ...) and the tree of pieces drawn between stages. |
| showLength | boolean | false | Start with the length readout on: kept (2/3)^n and removed 1/3 + 2/9 + ... = 1 - (2/3)^n. |
| showRemoved | boolean | false | Start with the list of the open intervals removed at each stage. |
| showBinary | boolean | false | Start with the binary address of the tracked point on: ternary digits 2 -> binary 1 (e.g. 1/4 = 0.(02)_3 -> 0.(01)_2 = 1/3), the map of C onto [0, 1]. |
| showApproximants | boolean | false | Start with the nearby-endpoints table on: for n = 1 ... stage, the tracked point's piece of C_n and its endpoint y_n ≠ x with |x - y_n| ≤ 3^-n. |