Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Cantor set

  • To: mathgroup at
  • Subject: [mg1090] Re: [mg995] Re: [mg891] Cantor set
  • From: Allan Hayes <hay at>
  • Date: Sun, 14 May 1995 21:01:30 -0400

Richard Mercer <richard at> gives the following  
code for successive stages in constructing the ternary Cantor set

> CantorEndPoints[0] = {{0,1}};
> CantorEndPoints[n_]:=
> Join[CantorEndPoints[n-1]/3, CantorEndPoints[n-1]/3 + 2/3];


We'd better avoid the doubling in this, by, for example

CantorEndPoints2[0] = {{0,1}};

	2.15 Second
Compared to

	16.15 Second

Allan Hayes
hay at

  • Prev by Date: Looking for MMA Code/Modern Diff. Geom./Alfred Gray
  • Next by Date: Online documentation available?
  • Previous by thread: Re: Cantor set
  • Next by thread: Re: NDSolve problem