![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TinCanMan wrote:
>
> > Have a look at the 'vturbulence()' function.
>
> Thanks, but it appears to be the opposite of what I want (if I understand
> turbulence properly). The vector returned by vturbulence() for pt A is the
> original vector of the point that is essentially now located at A rather
> than where the point that was originally at A is now.
Have you tried it?
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 30 Jun. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Christoph Hormann wrote:
> TinCanMan wrote:
>>
>>> Have a look at the 'vturbulence()' function.
>>
>> Thanks, but it appears to be the opposite of what I want (if I
>> understand turbulence properly). The vector returned by
>> vturbulence() for pt A is the original vector of the point that is
>> essentially now located at A rather than where the point that was
>> originally at A is now.
>
> Have you tried it?
Well, it's pointless.
Turbulence in textures work backwards, so a turbulated texture can have
the same point turbulated to two or more locations. The vturbulence
function works forward and thus is incompatible with turbulence in
textures, and naturally a function can not return more than one result.
However, for very small amounts of turbulence, the results for forward
and backwards turbulence may be close enough that they won't be spotted
(because turbulence directions change gradually).
Rune
--
3D images and anims, include files, tutorials and more:
rune|vision: http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Fri, 12 Jul 2002 16:50:53 +0200, Christoph Hormann <chr### [at] gmx de>
wrote:
>
> Have you tried it?
If I would everything fine then tehere should be crossection at the center of
square.
#local Amount = 0.5;
#local Lambda = 1.5;
#local Omega = 0.8;
#local Octaves = 5.0;
#local Frequency = 3;
#local P=<0,0,0>;
#local P=P+Amount*vturbulence(Lambda,Omega,Octaves,P*Frequency);
box{
P-<.1,.1,0> P+<.1.1.1>
pigment{
checker color blue 1 color red 1
turbulence Amount
lambda Lambda
omega Omega
octaves Octaves
frequency Frequency
}
finish{ambient 1 diffuse 0}
translate -P
translate z
}
ABX
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> TinCanMan wrote:
> >
> > > Have a look at the 'vturbulence()' function.
> >
> > Thanks, but it appears to be the opposite of what I want (if I
understand
> > turbulence properly). The vector returned by vturbulence() for pt A is
the
> > original vector of the point that is essentially now located at A rather
> > than where the point that was originally at A is now.
>
> Have you tried it?
>
> Christoph
Yes, and it didn't work.
I couldn't get the function method to work either so I think I'm S.O.L.
As Rune pointed out, the problem with turbulence and vturbulence is that, by
the nature of the way they work, a single point can be turbulated to more
than one point. Turbulence doesn't move pt A by x,y,z but rather uses the
point x,y,z away at the location of A.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TinCanMan wrote:
>
> [...]
>
> Yes, and it didn't work.
> I couldn't get the function method to work either so I think I'm S.O.L.
> As Rune pointed out, the problem with turbulence and vturbulence is that, by
> the nature of the way they work, a single point can be turbulated to more
> than one point. Turbulence doesn't move pt A by x,y,z but rather uses the
> point x,y,z away at the location of A.
I know it isn't a precise solution of your problem, but as ABX pointed out
it can't be solved easily because you can't reverse turbulence. You can
try to iteratively approximate the solution and thereby gain better
results.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 30 Jun. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hooray! I macroed myself a method to translate by turbulence!
I don't guarantee how well this works, especially for large turbulence
values, but it will work for what I want to do. Thanks to Christoph for
pointing me to vturbulence() which was the key to making it work.
-tgq
Have a try at the following scene and play with the numbers if you want to
see it in action. The translated sphere is raised off the plane a bit
because of y direction turbulence.
//start
camera{
up y
right x*image_width/image_height
angle 45
location <30,30,-30>
look_at 0
}
light_source{y*1000 rgb 1}
#declare tTurb=0.50;
#declare tLamb=1.2;
#declare tOcta=5;
#declare tOmeg=0.25;
plane{y 0
pigment{checker rgb 1 rgb 0
translate -y/2
warp{
turbulence tTurb
octaves tOcta
lambda tLamb
omega tOmeg
}
scale 20
}
}
//P0 = Point to translate
//Acc = Accuracy
#macro turb_translate (tTurb,tOcta,tLamb,tOmeg,P0,Acc)
#local PC=P0;
#local Dir=<0,0,0>;
#local V0=vlength(vturbulence(tLamb, tOmeg, tOcta, P0)*tTurb);
#local Step=V0/2;
#macro AB(PC,Step,d,Dir,V0)
#local P1=PC+Step*d;
#local V1=vlength(P1+vturbulence(tLamb, tOmeg, tOcta, P1)*tTurb-P0);
#if (V1<V0 | d.x=1)
#local Dir=d;
#local V0=V1;
#end
#end
#while (V0>Acc)
#local DrP=Dir;
AB(PC,Step, x,Dir,V0)
AB(PC,Step,-x,Dir,V0)
AB(PC,Step, y,Dir,V0)
AB(PC,Step,-y,Dir,V0)
AB(PC,Step, z,Dir,V0)
AB(PC,Step,-z,Dir,V0)
#if (vlength(DrP+Dir)=0)
#local Step=Step/2;
#else
#local Step=V0/2;
#end
#local PC=PC+Step*Dir;
#end
PC
#end
#declare TPt=<0,0,0>;
sphere{TPt 1 pigment{rgb <1,0,0>}}
sphere{0 1 pigment{rgb <1,0,0>} translate
turb_translate(tTurb,tOcta,tLamb,tOmeg,TPt,0.001)*20}
//end
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |