sharing: golden ratio

willum070's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi all, I have been messing around with the golden ratio. Don't worry, I didn't change it or anything! Anyhow I have a nice little bit of code that takes a number, and returns the large and small golden proportions of that number. I created it for another patch I am working on, and thought perhaps someone else would find it handy. Cheers!

sterlingcrispin@gmail.com's icon

simple but thank you!

Gregory Taylor's icon

Since phi is the only number that is its own reciprocal, a string of [!/ 1.0] objects will set you up jes' fine....

big_pause's icon

pedant time

φ = 1/φ + 1

i.e. it's not its own reciprocal.

you may be thinking of Φ = 1/φ (note the case)

where Φ = φ - 1 (obvious from above and roughly 0.61803)

a side note,

2 numbers that are their own reciprocals are 1 and -1

Gregory Taylor's icon

You're right, of course. I should never post after getting home from the radio station. D'oh!

big_pause's icon

having a look at the op's patch tho' - this wont work for negative numbers, it's probably easier just setting the larger portion to

x*Φ

and the smaller portion to

x*Φ^2

Φ=0.618034.... in both cases there

end of pedant mode :)