POV-Ray : Newsgroups : povray.general : Latitude, longitude, radius pattern? Server Time
1 Nov 2024 15:25:21 EDT (-0400)
  Latitude, longitude, radius pattern? (Message 1 to 5 of 5)  
From: Mike Horvath
Subject: Latitude, longitude, radius pattern?
Date: 21 Aug 2015 00:19:17
Message: <55d6a6c5$1@news.povray.org>
How would I create a checker pattern that wraps around a globe? I would 
like the checker to alternate between latitude, longitude, etc. Thanks!


Mike


Post a reply to this message

From: clipka
Subject: Re: Latitude, longitude, radius pattern?
Date: 21 Aug 2015 01:04:22
Message: <55d6b156$1@news.povray.org>
Am 21.08.2015 um 06:19 schrieb Mike Horvath:
> How would I create a checker pattern that wraps around a globe? I would
> like the checker to alternate between latitude, longitude, etc. Thanks!

"Checker pattern and a spherical warp" would be my first thought.


Post a reply to this message

From: Le Forgeron
Subject: Re: Latitude, longitude, radius pattern?
Date: 21 Aug 2015 01:19:44
Message: <55d6b4f0$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 21/08/2015 07:04, clipka a écrit :
> Am 21.08.2015 um 06:19 schrieb Mike Horvath:
>> How would I create a checker pattern that wraps around a globe? I
>> would like the checker to alternate between latitude, longitude,
>> etc. Thanks!
> 
> "Checker pattern and a spherical warp" would be my first thought.
> 

sphere { 0,av_ra
texture {
checker texture { pigment { color rgb <1,1,0> } },texture { pigment
{color rgb 0.5} }
 scale 1/4 warp { spherical orientation y } } }

you can adjust the frequency of alternating by tuning the scale 1/4 to
your need, even with a non uniform scale.

av_ra is the radius of your globe.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlXWtO8ACgkQhKAm8mTpkW08CwQArMiLp2P1MnvfGZku14Ajnc3m
MjdceqGAAKPAyUJAm55d1trNbovtY5rnSpGNgMljji5ruI92Eq85ti9S7hCcXTK0
WTjN16Tcjhs5kljCkMVdoYTQNhe9eB55kY4V8BzUrNfoKiCCV/wvYvw/BC7Y0nXZ
FSQZnqlXqqVo/8C/Tjc=
=7G3o
-----END PGP SIGNATURE-----


Post a reply to this message

From: Mike Horvath
Subject: Re: Latitude, longitude, radius pattern?
Date: 21 Aug 2015 01:37:08
Message: <55d6b904$1@news.povray.org>
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}


Post a reply to this message

From: Nekar Xenos
Subject: Re: Latitude, longitude, radius pattern?
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.