POV-Ray : Newsgroups : povray.general : Latitude, longitude, radius pattern? : Re: Latitude, longitude, radius pattern? Server Time
1 Jun 2024 11:56:42 EDT (-0400)
  Re: Latitude, longitude, radius pattern?  
From: Nekar Xenos
Date: 22 Aug 2015 01:15:30
Message: <op.x3q7jxcnufxv4h@xena>
On Fri, 21 Aug 2015 07:37:17 +0200, Mike Horvath <mik### [at] gmailcom>  
wrote:

> I forgot I did this once before for an object collection item. I ended  
> up copying the code and re-using it.
>
> #declare latitude_pigment_1 = pigment
> {
> 	radial
> 	color_map
> 	{
> 		[0.5 color srgb <040,066,018>/255]
> 		[0.5 color srgb <067,084,029>/255]
> 	}
> 	frequency longitude_div/2
> }
> #declare latitude_pigment_2 = pigment
> {
> 	radial
> 	color_map
> 	{
> 		[0.5 color srgb <067,084,029>/255]
> 		[0.5 color srgb <040,066,018>/255]
> 	}
> 	frequency longitude_div/2
> }
> /*
> #declare radius_pigment = pigment
> {
> 	function {f_r(x,y,z)}
> 	pigment_map
> 	{
> 		[0 color srgb 1/2]
> 		[1 latitude_pigment_1]
> 	}
> }
> */
> #declare longitude_pigment = pigment
> {
> 	function {f_ph(x,y,z)/pi}
> 	pigment_map
> 	{
> 		[0.5 latitude_pigment_1]
> 		[0.5 latitude_pigment_2]
> 	}
> 	frequency longitude_div/4
> }
> #declare checker_sphere_pigment = pigment {longitude_pigment}

I was going to post something similar to this, but with a gradient map for  
the longitude pigment. Yours is more accurate anyway.

-- 
-Nekar Xenos-


Post a reply to this message

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