On Fri, Feb 6, 2009 at 10:25 AM, Sander Land <sander.land / gmail.com> wrote:
> On Fri, Feb 6, 2009 at 5:59 PM, Daniel Moore <yahivin / gmail.com> wrote:
>> Example Output:
>>
>> http://strd6.com/?attachment_id=145
>>
>> depth: 3
>> red: Math.sin(Math::PI * Math.cos(Math::PI * y * x))
>> green: Math.sin(Math::PI * (Math.sin(Math::PI * y)) ** 3)
>> blue: (Math.cos(Math::PI * Math.cos(Math::PI * y))) ** 3
>>
>> The depth is how many layers of functions to combine. The bottom layer
>> is always x or y. Depth 3 is where things begin to get a little bit
>> interesting, but 5 and higher is much more exciting.
>
> The link to the example output is dead.
> Also, I don't get what you mean by 'depth' exactly.
>
> I can see the red: as either
> depth 2: somecomplicatedfunction( times(x, y) )
> or
> depth 5: sin( times( pi, cos( times(pi, times(x,y)))))
>
>

You're right, I'm sorry for my error. Here is an updated link:
http://strd6.com/?p=146

My explanation of function depth is also somewhat confusing. If anyone
sees what I'm getting at and wants to try and help me out with another
explanation please do! Let me try again in the meantime:

Function depth is more of a tree depth in this circumstance. Some
functions take two parameters, some take one parameter. So depth of 0
would be either x or y. Depth 1 would be any of the following:

  (x + x)/2
  (x + y)/2
  sin(PI * x)
  sin(PI * y)
  cos(PI * x)
  ...

Depth 2 could be:

  (sin(PI * x) + x * y)/2

Part of the difficulty in this quiz is composing functions of
different arity. Hopefully this explanation clears things up a little.

Thanks for bringing this up and if you have any further questions
please continue to ask.

-- 
-Daniel
http://rubyquiz.strd6.com