Re: How do I write a program to calculate the golden section?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Rafael
The Fibonacci series is the series where each term is the sum of the
preceding two terms, starting with 1,1 as the first two terms

A code snippit like this will print a Fibonacci series L terms long
<<begin code>>
integer L
sequence Fib
Fib={1,1}
L=100
for n=3 to L by 1 do
    Fib=append(Fib,(Fib[n-1]+Fib[n-2]))
end for
?Fib
<< end code>>

You'll note that the ratio of adjacent terms does approach the golden
mean the farther into the series you go.

Bye
Martin

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu