function dt(x) return fv(sub+2,x) end
function rho(x) return fv(sub+1,x) end 
function angle(x)  return fv(sub+3,x) end

function rhodivdt(x)
if( dt(x) < 0.01 ) then return 0 end
return math.max( rho(x)/dt(x) , 0 )
end

function rhoratio(x)
if( dt(x) < 0.01 ) then return 0 end
local rhomin = ( math.pi * dt(x) ) * (angle(x) / 180) 
if( rhomin < 0.01 ) then return 0 end
return rho(x) / rhomin 
end

function rhominmaxrho(x)
if( rho(x) < 15 )  then return 0 end
return rho(x) - 0.5 * math.pi * dt(x) * math.cos(angle(x) / 180.0)
end

function Scripted(x) 
return math.pow( fv(sub,x), 0.2 ) * 100 + 0.001

-- return rhodivdt(x)

-- return math.atan( (fv(sub+1,x) / 2.0) / fv(sub+3,x) )

-- return (fv(sub+1,x) / 2.0) / math.tan(angle(x) * 0.5 * math.pi / 180.0)

-- return rhodivdt(x) / (angle(x) / 180.0)

-- return 0
end

