POV-Ray : Newsgroups : povray.general : Gravity well. Need iso-pigment help? : Re: Gravity well. Need iso-pigment help? Server Time
7 Aug 2024 17:24:18 EDT (-0400)
  Re: Gravity well. Need iso-pigment help?  
From: Alberto
Date: 30 Jul 2001 20:10:34
Message: <3B65F6D0.B17B8839@usb.ve>
I agree with Simen Kvaal that the exact solution to the problem involves
the calculation of the arc of length
 
>      int ( sqrt(1 + x^-4) ).

But using mathematica I could verify that this integral is written in
terms of elliptic functions. (what can we do? life is not so ease).
Worse than that I think that the inverse of this function is what is
needed to solve the problem.

Here is another approach. Take the function if(sin(h(x)),0,1) which
gives 0 if sin(h(x)) < 0 and 1 if sin(h(x)) > 0. Playing with the
function h one can obtain an approximate solution to the pigment.

Below is an example

#version unofficial MegaPov 0.7;
camera{location <0, .5, -5> look_at -2*y angle 60}

light_source{<0, .5, -5>  rgb 1  shadowless}

isosurface{
  function{y + (x*x + z*z)^(-1/2)}
  contained_by{box -<2,3,0> <2,2,2>} 
  pigment{
    function{ if(sin(exp(1.5*(y+3))),0,1)}
    scale 1
    color_map{[0 rgb x][1 rgb y]}
  }
}

Regards, Alberto.


Post a reply to this message

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