POV-Ray : Newsgroups : povray.general : Stepped function offset (attempt #2) Server Time
22 Dec 2024 16:42:09 EST (-0500)
  Stepped function offset (attempt #2) (Message 1 to 10 of 10)  
From: Mike Horvath
Subject: Stepped function offset (attempt #2)
Date: 20 Jan 2020 01:37:24
Message: <5e254aa4$1@news.povray.org>
Please see the "Stepped function offset (attempt #2)" thread in p.t.s-f.

Thanks!


Michael


Post a reply to this message

From: Melody
Subject: Re: Stepped function offset (attempt #2)
Date: 21 Jan 2020 00:45:01
Message: <web.5e268eadda4801839da690110@news.povray.org>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg


Post a reply to this message

From: Mike Horvath
Subject: Re: Stepped function offset (attempt #2)
Date: 21 Jan 2020 16:41:23
Message: <5e277003$1@news.povray.org>
On 1/21/2020 12:39 AM, Melody wrote:
>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg
> 
> 
> 
> 


I don't know what that is for. Can you link to the message/thread too?


Mike


Post a reply to this message

From: Melody
Subject: Re: Stepped function offset (attempt #2)
Date: 21 Jan 2020 18:00:01
Message: <web.5e278158da4801839da690110@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> On 1/21/2020 12:39 AM, Melody wrote:
> >
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg
> >
> I don't know what that is for. Can you link to the message/thread too?

That url minus the image *IS the thread.
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/

It's a hue palette, click a color, and buffer text to paste into POV project.

I assume you want hue colors. What is your end goal here?.

Your interest suggests I am on the right track.

colors.inc has the hsv/hsl functions.
Did you want usage example?


Post a reply to this message

From: Bald Eagle
Subject: Re: Stepped function offset (attempt #2)
Date: 21 Jan 2020 18:10:00
Message: <web.5e2783c0da4801834eec112d0@news.povray.org>
"Melody" <nomail@nomail> wrote:

> I assume you want hue colors. What is your end goal here?.
>
> Your interest suggests I am on the right track.
>
> colors.inc has the hsv/hsl functions.
> Did you want usage example?

Nope - he wants to model the color space just like as shown.  He does a fair
amount of Wikipedia work - just look at Wikipedia or search the forum.


Post a reply to this message

From: Melody
Subject: Re: Stepped function offset (attempt #2)
Date: 22 Jan 2020 01:25:00
Message: <web.5e27ea9fda4801839da690110@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> On 1/21/2020 12:39 AM, Melody wrote:
> >
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg
>
> I don't know what that is for. Can you link to the message/thread too?
>
>
> Mike

Sven, I want to type Seven, gave up a list of named POV, "farge" and Lego
colors.
Here is the JS setup for color grabbing; in late-enough-version browser to use
clipboard. use it to make any color scheme you want, add HSV HSL functions -
make a better world.

http://news.povray.org/povray.binaries.utilities/message/%3Cweb.5e2540e3f66b17949da690110%40news.povray.org%3E/#%3Cweb.
5e2540e3f66b17949da690110%40news.povray.org%3E

http://news.povray.org/povray.binaries.utilities/attachment/%3Cweb.5e2540e3f66b17949da690110%40news.povray.org%3E/povco
lorselect.zip


Post a reply to this message

From: Mike Horvath
Subject: Re: Stepped function offset (attempt #2)
Date: 24 Jan 2020 17:09:29
Message: <5e2b6b19$1@news.povray.org>
I am using functions. They are already stepped. I just need to nudge 
them outward by 1/2 step, which I can't figure how to do.

Here are examples:

#declare CSolid_HSLSphere_Saturation_stepped = function { floor(6 * 
f_r(x,y,z))/6};
#declare CSolid_HSLSphere_Lightness_stepped = function { floor(12 * 
f_ph(x,y,z)/pi)/12};


I guessed and tried this with no success:

#declare CSolid_HSLSphere_Saturation_stepped = function { floor(6 * 
f_r(x,y,z))/6 + 1/12};
#declare CSolid_HSLSphere_Lightness_stepped = function { floor(12 * 
f_ph(x,y,z)/pi)/12 + 1/24};



Michael



On 1/21/2020 5:59 PM, Melody wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> On 1/21/2020 12:39 AM, Melody wrote:
>>>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg
>>>
>> I don't know what that is for. Can you link to the message/thread too?
> 
> That url minus the image *IS the thread.
>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/
> 
> It's a hue palette, click a color, and buffer text to paste into POV project.
> 
> I assume you want hue colors. What is your end goal here?.
> 
> Your interest suggests I am on the right track.
> 
> colors.inc has the hsv/hsl functions.
> Did you want usage example?
> 
> 
> 
> 
> 
> 
> 
> 
> 
>


Post a reply to this message

From: Mike Horvath
Subject: Re: Stepped function offset (attempt #2)
Date: 24 Jan 2020 18:08:13
Message: <5e2b78dd$1@news.povray.org>
I am using functions. They are already stepped. I just need to nudge 
them outward by 1/2 step, which I can't figure how to do.

Here are examples:

#declare CSolid_HSLSphere_Saturation_stepped = function { floor(6 * 
f_r(x,y,z))/6};
#declare CSolid_HSLSphere_Lightness_stepped = function { floor(12 * 
f_ph(x,y,z)/pi)/12};


I guessed and tried this with no success:

#declare CSolid_HSLSphere_Saturation_stepped = function { floor(6 * 
f_r(x,y,z))/6 + 1/12};
#declare CSolid_HSLSphere_Lightness_stepped = function { floor(12 * 
f_ph(x,y,z)/pi)/12 + 1/24};



Michael



On 1/21/2020 5:59 PM, Melody wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> On 1/21/2020 12:39 AM, Melody wrote:
>>>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/hsvhslshift.jpg
>>>
>> I don't know what that is for. Can you link to the message/thread too?
> 
> That url minus the image *IS the thread.
>
http://news.povray.org/*/attachment/%3Cweb.5e11aa71340f43599da690110%40news.povray.org%3E/
> 
> It's a hue palette, click a color, and buffer text to paste into POV project.
> 
> I assume you want hue colors. What is your end goal here?.
> 
> Your interest suggests I am on the right track.
> 
> colors.inc has the hsv/hsl functions.
> Did you want usage example?
> 
> 
> 
> 
> 
> 
> 
> 
> 
>


Post a reply to this message

From: Bald Eagle
Subject: Re: Stepped function offset (attempt #2)
Date: 25 Jan 2020 08:20:00
Message: <web.5e2c4072da4801834eec112d0@news.povray.org>
just guessing, just woke up, but have you tried moving your nudge _inside_ the
floor function?

#declare Start = 6+(1/12);

 #declare CSolid_HSLSphere_Lightness_stepped = function { floor(Start *
 f_ph(x,y,z)/pi)/6};

When it gets complicated, break the calculations up into parts, and graph them
all.
I always use spreadsheets to help me out with things like this.

Another thing to try is adding or subtracting pi/12 from your f_ph funtion to
actually rotate the results


Post a reply to this message

From: Mike Horvath
Subject: Re: Stepped function offset (attempt #2)
Date: 27 Jan 2020 03:32:23
Message: <5e2ea017@news.povray.org>
On 1/25/2020 8:19 AM, Bald Eagle wrote:
> Another thing to try is adding or subtracting pi/12 from your f_ph funtion to
> actually rotate the results


Thank you! This was the correct solution.

For instance:

#declare CSolid_Div = 6;
#declare CSolid_HSLSphere_Lightness_stepped = function { 
floor(CSolid_Div * (f_ph(x,y,z)+pi/2/CSolid_Div)/pi)/CSolid_Div};
#declare CSolid_HSLSphere_Lightness = pigment
{
	function {CSolid_HSLSphere_Lightness_stepped(x,y,z)}
	pigment_map
	{
		[0/2 color srgb 1]
		[1/2 CSolid_HSLSphere_Saturation]
		[2/2 color srgb 0]
	}
}
#declare CSolid_HSLSphere_Pigment = pigment {CSolid_HSLSphere_Lightness}


Post a reply to this message


Attachments:
Download 'color_mind_sphere_render_test.png' (73 KB)

Preview of image 'color_mind_sphere_render_test.png'
color_mind_sphere_render_test.png


 

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