POV-Ray : Newsgroups : povray.binaries.images : pyramid math (2 jpegs, 144k) Server Time
15 Nov 2024 18:23:42 EST (-0500)
  pyramid math (2 jpegs, 144k) (Message 1 to 6 of 6)  
From: stbenge
Subject: pyramid math (2 jpegs, 144k)
Date: 14 Jan 2008 23:45:50
Message: <478c3a7e@news.povray.org>
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!

My approach is a geometric one, where I try to fit a number of 
asymmetrical (but numerically correct) versions of the pyramid into a 
box or cube. The 2d version is rather straight-forward, while the 3d 
version is a bit more complex.

In these images I attempt to illustrate the idea behind this method. 
Displayed as text is the initial edge dimension. This is followed by the 
object count acquired from an incremental value calculated as each 
object was laid. Below that is the equation describing the number of 
elements. This is calculated automatically at the time of parsing, based 
on the edge dimension (concatenation of strings and all that). The total 
number is given again as a proof that the method works. Following the 
initial image, other images tell a story about how I came to arrive at a 
working equation.

I know this has probably been done before, countless times, but it sure 
was fun to arrive at this independently! It was a good mental exercise.

Now, for you math theorists out there, what is the next logical step in 
the progression? I can see the equation as an extension of the 3d 
version, but what would the object look like? Composed of hexagonal 
prisms, perhaps...

Sam


Post a reply to this message


Attachments:
Download 'pyramid_math2d.jpg' (31 KB) Download 'pyramid_math3d.jpg' (109 KB)

Preview of image 'pyramid_math2d.jpg'
pyramid_math2d.jpg

Preview of image 'pyramid_math3d.jpg'
pyramid_math3d.jpg


 

From: Ray Bellis
Subject: Re: pyramid math (2 jpegs, 144k)
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

From: stbenge
Subject: Re: pyramid math (2 jpegs, 144k)
Date: 15 Jan 2008 17:00:53
Message: <478d2d15@news.povray.org>
Ray Bellis wrote:
> 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

Yeah well, like I said, it was fun to come up with this independently. I 
wonder if anyone else has used a similar geometric approach?

Sam


Post a reply to this message

From: alphaQuad
Subject: Re: pyramid math (2 jpegs, 144k)
Date: 17 Jan 2008 20:55:00
Message: <web.479006afb3ba6fcf862a19220@news.povray.org>
stbenge <stb### [at] hotmailcom> wrote:
> Ray Bellis wrote:
> > 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
>
> Yeah well, like I said, it was fun to come up with this independently. I
> wonder if anyone else has used a similar geometric approach?
>
> Sam

you cant just leave it like that.

4D pyramid = 1 + 2^3 + 3^3 + .. + n^3





Post a reply to this message

From: stbenge
Subject: Re: pyramid math (2 jpegs, 144k)
Date: 18 Jan 2008 01:38:11
Message: <47904953$1@news.povray.org>
alphaQuad wrote:
>> Yeah well, like I said, it was fun to come up with this independently. I
>> wonder if anyone else has used a similar geometric approach?
>>
>> Sam
> 
> you cant just leave it like that.
> 
> 4D pyramid = 1 + 2^3 + 3^3 + .. + n^3

> 
> 


Where did you get that long decimal number?

I am more of a hacker than a mathematician or even a programmer. Before 
that, I use art as a visualization tool. Somehow though, I think there 
must be an approach to finding the brick count in 2d and 3d pyramids 
without the use of long decimal numbers. I'm thinking something like 
this might work:

4d pyramid? =
  n*(n+1)*(n+2)*(n+3)/4
  -n*(n+1)*(n+2)/3
  -n*(n+1)/2

It would be an extension of my 3d method:

3d pyramid =
  n*(n+1)*(n+2)/2
  -n*(n+1)/2

Of course, that 4d pyramid expression is probably wrong. It seems too 
simple a solution. Any time something is too easy, I quickly find out 
that there was a reason...

Sam


Post a reply to this message

From: Jan Dvorak
Subject: Re: pyramid math (2 jpegs, 144k)
Date: 18 Jan 2008 06:14:12
Message: <47908a04$1@news.povray.org>
stbenge napsal(a):
> alphaQuad wrote:
>>> Yeah well, like I said, it was fun to come up with this independently. I
>>> wonder if anyone else has used a similar geometric approach?
>>>
>>> Sam
>>
>> you cant just leave it like that.
>>
>> 4D pyramid = 1 + 2^3 + 3^3 + .. + n^3

>>
>>

> 
> Where did you get that long decimal number?
> 
> I am more of a hacker than a mathematician or even a programmer. Before 
> that, I use art as a visualization tool. Somehow though, I think there 
> must be an approach to finding the brick count in 2d and 3d pyramids 
> without the use of long decimal numbers. I'm thinking something like 
> this might work:
> 
> 4d pyramid? =
>  n*(n+1)*(n+2)*(n+3)/4
>  -n*(n+1)*(n+2)/3
>  -n*(n+1)/2
> 
> It would be an extension of my 3d method:
> 
> 3d pyramid =
>  n*(n+1)*(n+2)/2
>  -n*(n+1)/2
> 
> Of course, that 4d pyramid expression is probably wrong. It seems too 
> simple a solution. Any time something is too easy, I quickly find out 
> that there was a reason...
> 
> Sam
you say:
 >  n*(n+1)*(n+2)*(n+3)/4
 >  -n*(n+1)*(n+2)/3
 >  -n*(n+1)/2
I guess:
 >  n*(n+1)*(n+2)*(n+3)/4
 >  -n*(n+1)*(n+2)/3
 >  +n*(n+1)/2
or:
 >  n*(n+1)*(n+2)*(n+3)/4
 >  -n*(n+1)*(n+2)/3


Post a reply to this message

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