POV-Ray : Newsgroups : povray.general : Gravity well. Need iso-pigment help? : Re: Gravity well. Need iso-pigment help? Server Time
7 Aug 2024 17:22:40 EDT (-0400)
  Re: Gravity well. Need iso-pigment help?  
From: Simen Kvaal
Date: 30 Jul 2001 18:46:02
Message: <3b65e3aa$1@news.povray.org>
"Bill DeWitt" <bde### [at] cflrrcom> wrote in message
news:3b65a599@news.povray.org...
> I am trying to make a texture for my gravity well grid and I cannot seem
to
> get it to work. Problem 1) regular color_maps can only seem to take 64
> entries in their "Blendmap".
>
>     So I thought I would try to make an iso-surface or megapov pigment
using
> a similar function as my isosurface. This is where I think I will need
some
> help...
>

I think this is a useable method: (At least for one well...)

You have an analytic expression for the depth, which goes as 1/r. You want
equally spaced lines in, say, unit intervals, and you want the lines to have
an approximately (if not exact) even width. Clearly, the interval in the
color_map where the line is (say, white as apposed to blue) must approach
zero as the potential approaces zero.

Make a graph of 1/x and mark some [n, n+1] intervals. The arc-length of the
graph of f(x) is

    L = int ( sqrt(1+f'(x)^2), x1, x2 )

between x1 and x2. Now, f'(x) = -1/x^2 ==> f'(x)^2 = 1/x^4, and

     int ( sqrt(1 + x^-4) ) = sqrt( -1/3 * x^-3 + x ) =def= g(x)

(did _you_ take that on the spot? Neither did I... integrator.wolfram.com.)

Now you can make a custom pigment in megapow using the arc-length function
g(x). The height at which you want to calculate the arc-length is 1/x or
something. The arc-length is the same at every point at a given height, due
to the rotational symmetry of the potential. Thus, you bring 1/y (=x) into
the arc-length function: g(1/y). this gives (I might do some errors here, as
I am doing this in Outlook... :)

g(1/y) = sqrt ( -1/3 * (1/y)^-3 + 1/y ) = sqrt(-1/3 * y^3 + 1/y).

You have to make some modulo-function to wrap g around every time y passes
some value, but that shouldn't be too difficult ... I guess. And just make
your color_map as before...

Hope this is useful! I'd be surprised, really ... :}

Regards,
Simen Kvaal.


Post a reply to this message

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