POV-Ray : Newsgroups : povray.general : Twist Warp Server Time
25 Dec 2024 01:12:25 EST (-0500)
  Twist Warp (Message 1 to 9 of 9)  
From: Nekar
Subject: Twist Warp
Date: 29 Jun 2006 10:20:52
Message: <44a3e1c4@news.povray.org>
Is there any way of twisting a texture? It would make galaxies easier if  I 
could just use a twist warp on a stretched spherical density for  galaxies 
because galaxies are more dens near the centre than on the outer arms.


-- 
-Nekar Xenos
"The truth is out there"


Post a reply to this message

From: Warp
Subject: Re: Twist Warp
Date: 29 Jun 2006 10:29:35
Message: <44a3e3cf$1@news.povray.org>
Nekar wrote:
> Is there any way of twisting a texture? It would make galaxies easier if  I 
> could just use a twist warp on a stretched spherical density for  galaxies 
> because galaxies are more dens near the centre than on the outer arms.

   You could try with a spiral texture map, or by developing a better
user-defined function (which you can then use as a pattern in the
texture map).


Post a reply to this message

From: Mike Williams
Subject: Re: Twist Warp
Date: 29 Jun 2006 10:53:08
Message: <gZx7JFAag+oEFwOM@econym.demon.co.uk>
Wasn't it Nekar who wrote:
>Is there any way of twisting a texture? It would make galaxies easier if  I 
>could just use a twist warp on a stretched spherical density for  galaxies 
>because galaxies are more dens near the centre than on the outer arms.

Do you mean like "warp {cylindrical}"?

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Twist Warp
Date: 29 Jun 2006 12:15:00
Message: <web.44a3fb7c49282b97c150d4c10@news.povray.org>
"Nekar" <ger### [at] rpmmagcoza> wrote:
> Is there any way of twisting a texture? It would make galaxies easier if  I
> could just use a twist warp on a stretched spherical density for  galaxies
> because galaxies are more dens near the centre than on the outer arms.
>
>
> --
> -Nekar Xenos
> "The truth is out there"

There is no warp option to do this.
But have a look at this function pattern and see if it can help do what you
want:

//START
camera{
  up y
  right x*image_width/image_height
  angle 45
  location y*4
  look_at  0
}

#local PolL=function (x,z){sqrt(x*x+z*z)}
#local PolA=function (x,z){degrees(acos(x/PolL(x,z)))*select(z,-1,1)}

#local A=360;//Rotate 'A' degrees/unit length from center

#local PSPHERE = function {pigment{spherical}}
#local PSPHERE2 = function {PSPHERE(x*2,y,z).gray}
#local PSPHERE3 = function
{PSPHERE2(cos(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z),y,sin(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z))}

plane{y 0 pigment{function{PSPHERE3 (x,y,z)}} finish{ambient 1}}

//END
-tgq


Post a reply to this message

From: Nekar
Subject: Re: Twist Warp
Date: 30 Jun 2006 04:44:32
Message: <44a4e470@news.povray.org>
is no warp option to do this.
> But have a look at this function pattern and see if it can help do what 
> you
> want:
>
> //START
> camera{
>  up y
>  right x*image_width/image_height
>  angle 45
>  location y*4
>  look_at  0
> }
>
> #local PolL=function (x,z){sqrt(x*x+z*z)}
> #local PolA=function (x,z){degrees(acos(x/PolL(x,z)))*select(z,-1,1)}
>
> #local A=360;//Rotate 'A' degrees/unit length from center
>
> #local PSPHERE = function {pigment{spherical}}
> #local PSPHERE2 = function {PSPHERE(x*2,y,z).gray}
> #local PSPHERE3 = function
>
{PSPHERE2(cos(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z),y,sin(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z))}
>
> plane{y 0 pigment{function{PSPHERE3 (x,y,z)}} finish{ambient 1}}
>
> //END

Can functions be used as media densities? If so then this might work.


-- 
-Nekar Xenos
"The truth is out there"


Post a reply to this message

From: Nekar
Subject: Re: Twist Warp
Date: 30 Jun 2006 04:48:35
Message: <44a4e563@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message 
news:gZx7JFAag+oEF### [at] econymdemoncouk...
> Wasn't it Nekar who wrote:
>>Is there any way of twisting a texture? It would make galaxies easier if 
>>I
>>could just use a twist warp on a stretched spherical density for  galaxies
>>because galaxies are more dens near the centre than on the outer arms.
>
> Do you mean like "warp {cylindrical}"?
>
> -- 
> Mike Williams
> Gentleman of Leisure
something that would give the effect of:
density{ spherical scale <1,0.01,0.1> warp{spiral} density_map{[0 colour rgb 
0][1 colour rgb 1]}}



-- 
-Nekar Xenos
"The truth is out there"


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Twist Warp
Date: 30 Jun 2006 04:54:21
Message: <44a4e6bd$1@news.povray.org>
Nekar wrote:
> something that would give the effect of:
> density{ spherical scale <1,0.01,0.1> warp{spiral} density_map{[0 colour rgb 
> 0][1 colour rgb 1]}}

Perhaps using MegaPOV displace warp instead a regular warp?

--
Jaime


Post a reply to this message

From: Alain
Subject: Re: Twist Warp
Date: 30 Jun 2006 11:55:07
Message: <44a5495b@news.povray.org>
Nekar nous apporta ses lumieres en ce 30/06/2006 04:44:
> is no warp option to do this.
>> But have a look at this function pattern and see if it can help do what 
>> you
>> want:
>>
>> //START
>> camera{
>>  up y
>>  right x*image_width/image_height
>>  angle 45
>>  location y*4
>>  look_at  0
>> }
>>
>> #local PolL=function (x,z){sqrt(x*x+z*z)}
>> #local PolA=function (x,z){degrees(acos(x/PolL(x,z)))*select(z,-1,1)}
>>
>> #local A=360;//Rotate 'A' degrees/unit length from center
>>
>> #local PSPHERE = function {pigment{spherical}}
>> #local PSPHERE2 = function {PSPHERE(x*2,y,z).gray}
>> #local PSPHERE3 = function
>>
{PSPHERE2(cos(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z),y,sin(radians(PolA(x,z)+PolL(x,z)*A))*PolL(x,z))}
>>
>> plane{y 0 pigment{function{PSPHERE3 (x,y,z)}} finish{ambient 1}}
>>
>> //END
> 
> Can functions be used as media densities? If so then this might work.
> 
> 
Sure can. Anything that you can use as a pigment or for an isosurface CAN be used for
media density. 
After all, all pigment pattern are realy built-in functions that return specific
values for specific 
coordinates.

-- 
Alain
-------------------------------------------------
WARNING: The consumption of alcohol may lead you to think people are laughing WITH
you.


Post a reply to this message

From: Nekar
Subject: Re: Twist Warp
Date: 1 Jul 2006 02:54:46
Message: <44a61c36@news.povray.org>
>> Can functions be used as media densities? If so then this might work.
>>
>>
> Sure can. Anything that you can use as a pigment or for an isosurface CAN 
> be used for media density. After all, all pigment pattern are realy 
> built-in functions that return specific values for specific coordinates.
>

Thanks Alain, I'll give it a try.



-- 
-Nekar Xenos
"The truth is out there"


Post a reply to this message

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