POV-Ray : Newsgroups : povray.binaries.images : pyramid math (2 jpegs, 144k) : Re: pyramid math (2 jpegs, 144k) Server Time
2 Aug 2024 02:27:31 EDT (-0400)
  Re: pyramid math (2 jpegs, 144k)  
From: Ray Bellis
Date: 15 Jan 2008 03:31:27
Message: <478c6f5f$1@news.povray.org>
stbenge wrote:
> Hi everyone,
>
> Today I figured out a couple of mathematical expressions to find the
> number of bricks for any given 2d or 3d pyramid. I had previously
> figured out the 2d version, but the equation was a bloated
> monstrosity. The new one is much simpler!

http://pirate.shu.edu/~wachsmut/ira/infinity/answers/sm_sq_cb.html

2D pyramid = 1 + 2 + 3 + .. + n
           = n * (n + 1) / 2

3D pyramid = 1 + 2^2 + 3^2 + .. + n^2
           = n * (n + 1) * (2n + 1) / 6

Ray


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.