POV-Ray : Newsgroups : povray.general : Gravity well. Need iso-pigment help? Server Time
7 Aug 2024 21:18:07 EDT (-0400)
  Gravity well. Need iso-pigment help? (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Michael Andrews
Subject: Re: Gravity well. Need iso-pigment help?
Date: 1 Aug 2001 11:51:34
Message: <3B6826F0.E7096D91@reading.ac.uk>
Hi Bill,

Here's my try at the function; not too complex, fairly easy to adapt for
different well widths and needed frequency.

Bye for now,
	Mike Andrews.


Bill DeWitt wrote:
> 
> 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...
> 
>     What I am trying to do is make the grid lines, that used to be a simple
> gradient with a high frequency. But as the slope of the isosurface reaches
> the horizontal, the apparent width of the grid line becomes much wider. So I
> have been trying to make my pigment get narrower as it rises. In a
> color_map, I used a loop and a declining variable to describe the width of
> the line but, as I said, only 64 entries and I need many more.
> 
>     So is there a good way to make a quasi-gradient in iso-surface
> function-to-pigment where I can control the decrease in the section of
> pigment that makes the grid line? (see pbi for example)

// start of code

#version unofficial Megapov 0.7;

global_settings { 
  max_trace_level 50
  assumed_gamma 1
  ambient_light 1
}

camera {
  location <-3,15,-10>
  direction 1.2*z  
  right     x*image_width/image_height
  look_at   0
}

background { color rgb 0.3 }

light_source { <10,30,-5> color rgb 1 }

#declare A = 16;  // square of width at y = -1
#declare F = 5;   // contour frequency per y
#declare C = 0.5; // coverage of surface at y = -inf

#declare fnGrav = function { y + A/max(0.1,sqr(x)+sqr(z)) }

#declare pigGrav = pigment { 
  function { 
    if(abs(F*y)-floor(abs(F*y))-C/sqrt(1+F*A*0.25/abs(y*y)), 1, 0) 
  } 
}

isosurface {
  function { fnGrav(x, y, z) }
  eval
  contained_by { box { -<10,5,10>,<10,0,10> } }
  pigment { pigGrav colour_map {[0 rgb 0][1 rgb 1]} }
}

// end of code


Post a reply to this message

From: Bill DeWitt
Subject: Re: Gravity well. Need iso-pigment help?
Date: 1 Aug 2001 13:47:45
Message: <3b6840c1@news.povray.org>
"Michael Andrews" <M.C### [at] readingacuk> wrote in message
news:3B6826F0.E7096D91@reading.ac.uk...
> Hi Bill,
>
> Here's my try at the function; not too complex, fairly easy to adapt for
> different well widths and needed frequency.


    That looks great, Thanks! Do you mind if I adapt it and repackage it for
distribution on this board as long as I retain your name in the file for
credit?


Post a reply to this message

From: Michael Andrews
Subject: Re: Gravity well. Need iso-pigment help?
Date: 2 Aug 2001 07:12:19
Message: <3B693701.AF756A7F@reading.ac.uk>
Hi Bill,

If it works for you, feel free to use it as you like.

Bye for now,
	Mike Andrews.


Bill DeWitt wrote:
> 
> "Michael Andrews" <M.C### [at] readingacuk> wrote in message
> news:3B6826F0.E7096D91@reading.ac.uk...
> > Hi Bill,
> >
> > Here's my try at the function; not too complex, fairly easy to adapt for
> > different well widths and needed frequency.
> 
>     That looks great, Thanks! Do you mind if I adapt it and repackage it for
> distribution on this board as long as I retain your name in the file for
> credit?


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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