POV-Ray : Newsgroups : povray.binaries.images : warp function test images (76k and 28k) Server Time
12 Aug 2024 09:19:10 EDT (-0400)
  warp function test images (76k and 28k) (Message 1 to 10 of 26)  
Goto Latest 10 Messages Next 10 Messages >>>
From: David Burnett
Subject: warp function test images (76k and 28k)
Date: 12 Oct 2003 09:51:30
Message: <3f895c62@news.povray.org>
Here's some test images from a quick patch I've created.

I've let warp take a function so

     warp {
         function{f_bozo(x,y,z)}
     }

is now legal, working syntax.

The attached images use the following function as a
pigment and isofunction.

#declare f_worley = function {
    pattern {
         crackle
         form <1,0,0>
	}
}

#declare worley_warped_bozo = function {
	pattern {
		bozo
		warp {
			function{f_worley(x,y,z)}
		}
		scale 0.2
	}
}

Dave


Post a reply to this message


Attachments:
Download 'warpg.png' (74 KB) Download 'warp_isog.png' (25 KB)

Preview of image 'warpg.png'
warpg.png

Preview of image 'warp_isog.png'
warp_isog.png


 

From:  Light Beam 
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 10:34:02
Message: <3f89665a@news.povray.org>
Really excellent pattern.


Post a reply to this message

From: Christoph Hormann
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 10:42:02
Message: <2g5o51-53p.ln1@triton.imagico.de>
David Burnett wrote:
> Here's some test images from a quick patch I've created.
> 
> I've let warp take a function so
> 
>     warp {
>         function{f_bozo(x,y,z)}
>     }
> 
> is now legal, working syntax.

Such a feature was already planned for MegaPOV but not yet implemented. 
  I don't really understand how you define a warp with a single float 
function though.  The planned feature was supposed to use a vector function.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: David Burnett
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 12:51:19
Message: <3f898687$1@news.povray.org>
Christoph Hormann wrote:
> David Burnett wrote:
> 
>> Here's some test images from a quick patch I've created.
>>
>> I've let warp take a function so
>>
>>     warp {
>>         function{f_bozo(x,y,z)}
>>     }
>>
>> is now legal, working syntax.
> 
> 
> Such a feature was already planned for MegaPOV but not yet implemented. 
>  I don't really understand how you define a warp with a single float 
> function though.  The planned feature was supposed to use a vector 
> function.
> 
> Christoph
> 

It's just a straight forward multiplication
of each part of the original point by the results
of the function, so for the example images its
equivalent to...

f_crackle(x*f_bozo(x,y,z), y*f_bozo(x,y,z), z*f_bozo(x,y,z))

if f_crackle used form <1,0,0>,  with the advantage of only
having to work out the function result once (and nicer syntax :0)).


In code term, the important bit is

     POVFPU_SetLocal(X, EPoint[X]);
     POVFPU_SetLocal(Y, EPoint[Y]);
     POVFPU_SetLocal(Z, EPoint[Z]);

     value = POVFPU_Run(*((FUNCTION_PTR)(Warp->Function.Fn)));

     EPoint[X] *= value;
     EPoint[Y] *= value;
     EPoint[Z] *= value;


Any one is welcome to the code, I just want to tidy it up first
in proper pov patch style.

Dave.


Post a reply to this message

From: David Burnett
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 15:55:21
Message: <3f89b1a9$1@news.povray.org>
The patch is now available at

http://www.vargolsoft.net/function_warp.zip

at about 43k


Post a reply to this message

From: Christoph Hormann
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 16:52:02
Message: <e7ro51-dfp.ln1@triton.imagico.de>
David Burnett wrote:
> 
> It's just a straight forward multiplication
> of each part of the original point by the results
> of the function, so for the example images its
> equivalent to...
> 
> f_crackle(x*f_bozo(x,y,z), y*f_bozo(x,y,z), z*f_bozo(x,y,z))
> 
> [...]

I don't think this is a very useful interpretation of a function as a 
warp, even if it leads to interesting results in this case.  The pattern 
gets scaled by the value of the function - to imagine how this 
influences a pattern seems quite difficult to me.

I think the most intuitive interpretation of a float function as a warp 
would be the gradient - like it is used in the type 1 displace warp.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: David Burnett
Subject: Re: warp function test images (76k and 28k)
Date: 12 Oct 2003 18:55:35
Message: <3f89dbe7@news.povray.org>
Christoph Hormann wrote:
> David Burnett wrote:
>> of the function, so for the example images its
>> equivalent to...
>>
>> f_crackle(x*f_bozo(x,y,z), y*f_bozo(x,y,z), z*f_bozo(x,y,z))
>>
>> [...]
> 
> 
> I don't think this is a very useful interpretation of a function as a 
> warp, even if it leads to interesting results in this case.  The pattern 
> gets scaled by the value of the function - to imagine how this 
> influences a pattern seems quite difficult to me.
 > I think the most intuitive interpretation of a float function as a
 > warp  would be the gradient - like it is used in the type 1 displace 
 >warp.
 >

Well I'd said is about as obvious as a 1 octave turbulence warp :-)
which I guess it is when it comes down to it. The direction of
movement isn't random, it's the same direction as the current
point is from <0,0,0> but the distance traveled past the current
point is the result of the function.

I choose multiplication as I'd already used it in
planetGenesis a little Java 'heightfield' generator
I occasionally attempt to program and got some nice
results, and I wanted to see how they would look as
isosurfaces.

Anyway, now I've put the source out there, give it
a try, you'll get some fun results, and maybe grow
to like it.

Dave





I haven't looked at that


> Christoph
>


Post a reply to this message

From: Roberto A 
Subject: Re: warp function test images (76k and 28k)
Date: 13 Oct 2003 09:16:18
Message: <3f8aa5a2@news.povray.org>
Is that true displacement? Because that's the one thing I miss in POV.


Post a reply to this message

From: David Burnett
Subject: Re: warp function test images (76k and 28k)
Date: 13 Oct 2003 14:50:20
Message: <3f8af3ec$1@news.povray.org>
Roberto A. wrote:
> Is that true displacement? Because that's the one thing I miss in POV.
> 

Not really.
It's an isosurface using the noise subtracted, from f_r(),
which is as close to displacement that POV gets.

I supposed you could argue its a limited version of
displacement, you need a function to derive the original
shape, rather than being able to displace anything.

Dave


Post a reply to this message

From: Christopher James Huff
Subject: Re: warp function test images (76k and 28k)
Date: 13 Oct 2003 19:17:48
Message: <cjameshuff-60FE99.19152913102003@netplex.aussie.org>
In article <3f8af3ec$1@news.povray.org>,
 David Burnett <var### [at] ntlworldcom> wrote:

> It's an isosurface using the noise subtracted, from f_r(),
> which is as close to displacement that POV gets.

I'd say true displacement is as close to true displacement as POV gets...
Combining functions in this way isn't really displacement, but you can 
do real displacement by modifying the coordinates given to the function. 
Common examples of this are scaling by dividing the coordinates or 
translation by subtraction. Just use something like:

originalFn(x - xDispFn(x, y, z),
           y - yDispFn(x, y, z),
           z - zDispFn(x, y, z)
)

Warping a function also qualifies as true displacement...
http://news.povray.org/povray.binaries.images/11612/

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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