POV-Ray : Newsgroups : povray.general : Height fields in isos (3.5) Server Time
7 Nov 2024 15:35:45 EST (-0500)
  Height fields in isos (3.5) (Message 1 to 9 of 9)  
From: Tom Melly
Subject: Height fields in isos (3.5)
Date: 12 Feb 2002 07:05:30
Message: <3c69050a@news.povray.org>
have I imagined it, or can you use an hf as a pigment and then use that in an
iso-function?

If so, can someone post a quick example?

--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: Grey Knight
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:32:30
Message: <3C690B55.2AE3439C@namtar.qub.ac.uk>
I tried to use this in my IRTC entry, but it produces the blocky hf
effect we're all familiar with, plus you can't use the smooth keyword
anymore. On the upside, you can use non-flat blocks by adding a smooth
function...

Tom Melly wrote:
> 
> have I imagined it, or can you use an hf as a pigment and then use that in an
> iso-function?
> 
> If so, can someone post a quick example?
> 
> --
> #macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
> B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
> 2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
> }light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
> 146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

From: Tom Melly
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:36:30
Message: <3c690c4e$1@news.povray.org>
"Grey Knight" <s16### [at] namtarqubacuk> wrote in message
news:3C690B55.2AE3439C@namtar.qub.ac.uk...
> I tried to use this in my IRTC entry, but it produces the blocky hf
> effect we're all familiar with, plus you can't use the smooth keyword
> anymore. On the upside, you can use non-flat blocks by adding a smooth
> function...

Well, I'm already csg'ing my hf with an iso, so I assume the "smooth" keyword is
already defunct (assuming it's just a normal pertubation).


Post a reply to this message

From: Christoph Hormann
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:37:48
Message: <3C690C98.73644E17@gmx.de>
Tom Melly wrote:
> 
> have I imagined it, or can you use an hf as a pigment and then use that in an
> iso-function?

You obviously cannot use a heightfield in an isosurface, but of course you
can use an image_map/image_pattern is an isosurface function just like any
other pigment/pattern.  Make sure you use 'interpolate 2', otherwise you
will get problems with the gradient.

> 
> If so, can someone post a quick example?
> 

The following should give an idea (not tested)

#declare fn_Img=function {
  pigment {
    image_map {
      png "file.png"    
      map_type 0   
      interpolate 2    
      once  
    }                                                   
  }   
} 

#declare fn_iso=function {         
  z - fn_Img(x, y, 0).gray*0.1  
} 

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tom Melly
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:44:11
Message: <3c690e1b$1@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3C690C98.73644E17@gmx.de...
>
>

Many thanks...


Post a reply to this message

From: Warp
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:46:57
Message: <3c690ec1@news.povray.org>
Grey Knight <s16### [at] namtarqubacuk> wrote:
: I tried to use this in my IRTC entry, but it produces the blocky hf
: effect we're all familiar with

  Did you use 'interpolate 2'?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From:
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 07:49:49
Message: <343i6uggabpj4hd1vgrimssib8pq0hh5ol@4ax.com>
On Tue, 12 Feb 2002 12:05:25 -0000, "Tom Melly" <tom### [at] tomandlucouk> wrote:
> have I imagined it, or can you use an hf as a pigment and then use that in an
> iso-function?
> If so, can someone post a quick example?

Add this to command box:

Library_Path="C:\Program Files\POV-Ray for Windows v3.5\scenes\portfolio"
+Iallobjects.pov +KFI9 +KFF9

:-)

ABX


Post a reply to this message

From: Grey Knight
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 08:10:07
Message: <3C691425.2A3587C9@namtar.qub.ac.uk>
Warp wrote:
> 
> Grey Knight <s16### [at] namtarqubacuk> wrote:
> : I tried to use this in my IRTC entry, but it produces the blocky hf
> : effect we're all familiar with
> 
>   Did you use 'interpolate 2'?

Didn't play around with it for very long; I figured out a way to get the
same shape (sans blocks) procedurally, so...

> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

From: R  Suzuki
Subject: Re: Height fields in isos (3.5)
Date: 12 Feb 2002 16:58:53
Message: <3c69901d@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3c69050a@news.povray.org...
> have I imagined it, or can you use an hf as a pigment and then use that in an
> iso-function?
>
> If so, can someone post a quick example?

Here is another example.
http://news.povray.org/3bdbbdb2@news.povray.org

R. Suzuki


Post a reply to this message

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