POV-Ray : Newsgroups : povray.general : Stepped function offset (attempt #2) : Re: Stepped function offset (attempt #2) Server Time
25 Apr 2024 07:31:25 EDT (-0400)
  Re: Stepped function offset (attempt #2)  
From: Mike Horvath
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.