POV-Ray : Newsgroups : povray.general : function question Server Time
6 Aug 2024 14:16:48 EDT (-0400)
  function question (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Shay
Subject: Re: function question
Date: 3 Apr 2002 17:30:48
Message: <3cab8298$1@news.povray.org>

>
><snip>
> should be rather
> <snip
>
> #local Z_Min = -100;

Z = -1000?

The only part of your process that I do not understand is the bounding
process. Are the bounds chosen arbitrarily, or is there a method for
assigning bounds?

 -Shay


Post a reply to this message

From: Shay
Subject: Re: function question
Date: 3 Apr 2002 17:33:17
Message: <3cab832d@news.povray.org>
Never mind. I just figured it out.


Shay <sah### [at] simcopartscom> wrote in message
news:3cab8298$1@news.povray.org...


Post a reply to this message

From:
Subject: Re: function question
Date: 3 Apr 2002 17:39:52
Message: <un0naussdera8t89o4n8gttvebm6gdk8m0@4ax.com>
On Wed, 3 Apr 2002 16:31:50 -0600, "Shay" <sah### [at] simcopartscom> wrote:
> The only part of your process that I do not understand is the bounding
> process. Are the bounds chosen arbitrarily, or is there a method for
> assigning bounds?

Bounding is necessary to rescale value from space to 0-1 entry for color map in
color component and then rescale back to original value. Every scaling requires
origin of scaling and scale value - here they are min and range value.

Presented values are randomly choosed without any important rule. My suggestion
is to use something like:

#local X_Max = 1e5;
#local X_Min = -X_Max;

and the same for Y and Z.
You have to remember that outside bounding results can be wrong.

ABX


Post a reply to this message

From: Shay
Subject: Re: function question
Date: 3 Apr 2002 17:59:31
Message: <3cab8953$1@news.povray.org>
I'm going to time this method tonight against <get_x, get_y, get_z> and
macro.
I will post the results tomorrow.

I understand why you are scaling the results to an appropriate range for the
color map, but is it really necessary. Can a pigment function not return
values greater than 1 for a hue? I know that Povray will accept {rgb
<100,30,80>} or even {rgb <-1,-1,-1>}. Does a pigment function behave
differently? I will test this tonight.



 -Shay



Post a reply to this message

From:
Subject: Re: function question
Date: 3 Apr 2002 18:33:28
Message: <664nau8q81a42tlo21afo1e6gal8ebjs49@4ax.com>
On Wed, 3 Apr 2002 17:00:25 -0600, "Shay" <sah### [at] simcopartscom> wrote:
> I understand why you are scaling the results to an appropriate range for the
> color map, but is it really necessary. Can a pigment function not return
> values greater than 1 for a hue?

Pigment can return values greater than 1. My methor return values greater than
1. Only problem is that map entries are placed along <0,1> range.

ABX


Post a reply to this message

From:
Subject: Re: function question
Date: 3 Apr 2002 18:36:45
Message: <9e4nau079sb1fsbc4ui4gbnnnr7mfc659m@4ax.com>
On Wed, 3 Apr 2002 17:00:25 -0600, "Shay" <sah### [at] simcopartscom> wrote:
> I understand why you are scaling the results to an appropriate range for the
> color map, but is it really necessary.

'6.7.1.3  Color Maps' second paragraph

ABX
--
disc{z,-z#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;5pigment{#local g=function(_){ceil(_)-_}function#local
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e)<O(),O()//35
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//ABX


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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