MathGroup Archive 2002

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

Search the Archive

Re: Pascal's Triangle

  • To: mathgroup at
  • Subject: [mg37356] Re: Pascal's Triangle
  • From: "Borut L" <gollum at>
  • Date: Fri, 25 Oct 2002 02:46:40 -0400 (EDT)
  • References: <ap86hf$554$>
  • Sender: owner-wri-mathgroup at


I should thank you for this pleasent mind excercise, though not tough, it
was just basic geometry.


(* first create a basic object, a colored triangle with text inscribed, note
that the height of the triangle is a unit *)

      x0=(i-.5 j)2/Sqrt[3],y0=-j,a=2/Sqrt[3]
      Polygon[{{x0,y0},{x0-.5 a,y0-1},{x0+.5 a,y0-1}}],

(* the following command will show the agglomerate, note that it doesn't
draw each of the triangles having no text, instead it draws a big triagle as
a background and puts the numbered ones onto it *)



(1.3 sec on my P2-350, how's your timming?)

p.s. : According to S. Wolfram and his new kind of science, the solution to
your problem is just a simple program. He ilustrates this in 2nd Chapter. It
may be worthy to take a peak.



"Al Mannon" <almannon at> wrote in message
news:ap86hf$554$1 at
| I want to write a program that will create an array of equilateral
| such that in the first row there is 1 triangle, in the second row there is
| triangles, in the third row there will be 5 the nth row
| will be 2n - 1 triangles. Putting all of these triangles together and
| calling the first row, row 0, we would have a large triangle with n + 1
| along the side of the large triangle and 2n - 1 columns along the base of
| the triangle.
| This would be phase one of the project.
| Phase 2: Fill in the binomial coefficients into the triangle.
| Phase 3: Color all odd numbered triangles blue.
| Phase 4: Color all even numbered triangles red.
| Phase 5: Any triangle that shares an edge with a red triangle, color red.
| The result is Zierpinski's Triangle! I have done this by hand for a
| with 16 rows. Needless to say the work was tedious. The result, however,
| quite satisfying and remarkable. I would like to be able to use this as a
| tool to teach some of the other derivations that are possible from
| triangle other than binomial coefficients and combinations. Therefore it
| would be beneficial to be able to reproduce this work at will.
| Since my Mathematica programming skills are practically nil, any help
| be appreciated.
| I can be reached directly by electronic mail by deleting "the" in the
| following:
| althemannon at

  • Prev by Date: Re: Re: PlotVectorField3D in Cylindrical Coordinates
  • Next by Date: Re: help on bootstrap sample
  • Previous by thread: Re: Pascal's Triangle
  • Next by thread: Re: Pascal's Triangle