POV-Ray : Newsgroups : povray.unofficial.patches : iso - ridged mf question Server Time
1 Sep 2024 16:18:11 EDT (-0400)
  iso - ridged mf question (Message 1 to 9 of 9)  
From: Tom Melly
Subject: iso - ridged mf question
Date: 12 Mar 2001 11:57:32
Message: <3aacfffc$1@news.povray.org>
I want a band of mountains on the horizon that drop to foothills and finally
a plane as z approaches 0.

#declare MountFunc = function {"ridgedMF" <1,5,3,1/3,50>}
with
function{ y + (MountFunc(x*z,0,z)*5)}  // (note the x*z)

doesn't work. While the mountains become less prounounced, the plane is at
the level of the highest peak rather than the foothills.

As a kludge, function{sqr(y) + sqr(z) + (MountFunc(x,0,z)*5)} is okay with a
separate shape for the plane, but I would prefer option a).

Any ideas?

BTW has anyone got any samples of good parameters for ridged mf?


Post a reply to this message

From: Vahur Krouverk
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 12:35:04
Message: <3AAD08EC.ED0A6178@aetec.ee>
Tom Melly wrote:
> 
> I want a band of mountains on the horizon that drop to foothills and finally
> a plane as z approaches 0.
> 
> #declare MountFunc = function {"ridgedMF" <1,5,3,1/3,50>}
> with
> function{ y + (MountFunc(x*z,0,z)*5)}  // (note the x*z)
> 
> doesn't work. While the mountains become less prounounced, the plane is at
> the level of the highest peak rather than the foothills.
> 

Try this:
function{ y - (MountFunc(x*z,0,z)*5)}


Post a reply to this message

From: Chris Huff
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 12:46:21
Message: <chrishuff-137A77.12421512032001@news.povray.org>
In article <3aacfffc$1@news.povray.org>, "Tom Melly" 
<tom### [at] tomandlucouk> wrote:

> I want a band of mountains on the horizon that drop to foothills and 
> finally a plane as z approaches 0.
> 
> #declare MountFunc = function {"ridgedMF" <1,5,3,1/3,50>}
> with
> function{ y + (MountFunc(x*z,0,z)*5)}  // (note the x*z)

Try: function {y - MountFunc(x,0,z)*5*min(0, z)}
You were multiplying the x coordinate by z, translating the function by 
an amount dependant on the distance along the x and z axis. The version 
I gave scales the values returned by the function by an amount dependant 
on the z axis, which is what I think you wanted. Also, you subtract from 
y to raise the height of the plane...your "mountains" were sinking below 
ground level, not rising above it.
The "min(0, z)" prevents "negative" mountains falling off in the -z 
direction.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Christoph Hormann
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 13:20:29
Message: <3AAD136A.E955EBF@gmx.de>
Tom Melly wrote:
> 
> I want a band of mountains on the horizon that drop to foothills and finally
> a plane as z approaches 0.
> 
> #declare MountFunc = function {"ridgedMF" <1,5,3,1/3,50>}
> with
> function{ y + (MountFunc(x*z,0,z)*5)}  // (note the x*z)
> 
> doesn't work. While the mountains become less prounounced, the plane is at
> the level of the highest peak rather than the foothills.
> 
> As a kludge, function{sqr(y) + sqr(z) + (MountFunc(x,0,z)*5)} is okay with a
> separate shape for the plane, but I would prefer option a).
> 
> Any ideas?

I have once used:

#declare RMFx=function{ "ridgedMF", <0.1, 3.1, 8, 0.7, 0.8> }         
     
#declare Mountains_01=        
isosurface{
   function{z-RMFx(x,y-0.15,0)*sqrt(1.1-y)*0.4}
   method 2    
   max_gradient 7 
   accuracy 0.0001  
   contained_by{box{<-1.7, -1.7, -0.1>, <1, 1, 1>}}                
}

Note that z is upwards in this case.  

> 
> BTW has anyone got any samples of good parameters for ridged mf?

something else I used sometime:

function{ "ridgedMF", <0.1, 2.7, 7, 0.75, 0.7> }  

found in this group and p.t.s-f:

function { "ridgedmf", <1,2,10,1.1,2> }
function { "ridgedMF", <1,2,5,0.5,10> }
function { "ridgedmf", <0.95,1.2,8,0.9,20> }
function { "ridgedmf", <0.3, 4, 6, 0.45, 1.9> }

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 13:57:19
Message: <3aad1c0f@news.povray.org>
Chris Huff schrieb in Nachricht ...
>In article <3aacfffc$1@news.povray.org>, "Tom Melly" 
><tom### [at] tomandlucouk> wrote:
>
>> I want a band of mountains on the horizon that drop to foothills and 
>> finally a plane as z approaches 0.
>> 
>> #declare MountFunc = function {"ridgedMF" <1,5,3,1/3,50>}
>> with
>> function{ y + (MountFunc(x*z,0,z)*5)}  // (note the x*z)
>
>Try: function {y - MountFunc(x,0,z)*5*min(0, z)}


Should be max(0,z), no? Else you would only get negative z.

Marc-Hendrik


Post a reply to this message

From: Chris Huff
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 14:48:59
Message: <chrishuff-B69D1A.14445412032001@news.povray.org>
In article <3aad1c0f@news.povray.org>, "Marc-Hendrik Bremer" 
<Mar### [at] t-onlinede> wrote:

> >Try: function {y - MountFunc(x,0,z)*5*min(0, z)}
> Should be max(0,z), no? Else you would only get negative z.

It should...and I *thought* "max(0, z)", I don't know why I typed that.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Tom Melly
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 15:15:12
Message: <3aad2e50@news.povray.org>
Many, many thanks to all for some extremely useful info, help and tips. God,
I love these groups.


Post a reply to this message

From: Vahur Krouverk
Subject: Re: iso - ridged mf question
Date: 12 Mar 2001 15:17:32
Message: <3AAD2F01.B12145A9@aetec.ee>
Tom Melly wrote:
> 
> Many, many thanks to all for some extremely useful info, help and tips. God,
> I love these groups.

Thanks isn't enough, show us image! ;o)


Post a reply to this message

From: Tom Melly
Subject: Re: iso - ridged mf question
Date: 13 Mar 2001 08:55:57
Message: <3aae26ed$1@news.povray.org>
"Vahur Krouverk" <vah### [at] aetecee> wrote in message
news:3AAD2F01.B12145A9@aetec.ee...

> Thanks isn't enough, show us image! ;o)

My pleasure - "For Vahur" in images ;)


Post a reply to this message

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