POV-Ray : Newsgroups : povray.general : Twist Warp : Re: Twist Warp Server Time
1 Aug 2024 00:21:42 EDT (-0400)
  Re: Twist Warp  
From: Trevor G Quayle
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

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