POV-Ray : Newsgroups : povray.general : How to find the maximum value of a function? : Re: How to find the maximum value of a function? Server Time
30 Jul 2024 16:19:02 EDT (-0400)
  Re: How to find the maximum value of a function?  
From: Mike Williams
Date: 15 Nov 2008 07:18:51
Message: <CjdvfyC$xrHJFw0J@econym.demon.co.uk>
Wasn't it SharkD who wrote:
>I have defined a function (function "fn_E", below) and would like to determine
>a. the maximum possible value of the function, and b. the coordinates where the
>maximum occurs. How can I accomplish this?

The general solution to such problems is to differentiate the function 
and solve that to find places where the differential is zero. The 
maxima, minima and turning points of the original function are at places 
where the differential is zero.

In the general case, that would require 3D calculus, but your particular 
example is symmetrical in y/z so you can probably get away with assuming 
that you can find the maxima and maxima on the line z=x or z=-x, and 
thereby reduce it to two 2D cases.

The approach would be to express fn_D in terms of x, y, and z, rather 
than by referencing the earlier functions, then substitute z=x, 
differentiate and solve.

My calculus is a bit rusty (I think I last did any about 32 years ago) 
so I wouldn't fancy attempting it.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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