POV-Ray : Newsgroups : povray.general : Cylindrical HF Server Time
1 Nov 2024 17:22:42 EDT (-0400)
  Cylindrical HF (Message 1 to 7 of 7)  
From: Gena
Subject: Cylindrical HF
Date: 12 Aug 2004 23:56:54
Message: <411c3c06$1@news.povray.org>
I need a cylindrical heightfield from my bitmap.
The following code doesn't work:

#include "shapes.inc"

#declare F = function {
    pigment {
       image_map {
       	png "foo.png"
         map_type 0
       }
    }
}

object {
    HF_Cylinder (F, off, off,
<60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3)
    texture {
       pigment {color rgb 1}
    }
}

How can I make it work? Is there any other macro(s)
making cylindrical heightfield or cylindrical mesh
from bitmap?

Gena.


Post a reply to this message

From: Hughes, B 
Subject: Re: Cylindrical HF
Date: 13 Aug 2004 00:56:41
Message: <411c4a09$1@news.povray.org>
"Gena" <gen### [at] yahoocom> wrote in message
news:411c3c06$1@news.povray.org...
> The following code doesn't work:
>
> #include "shapes.inc"
>
> #declare F = function {
>     pigment {
>        image_map {
>        png "foo.png"
>          map_type 0
>        }
>     }
> }
>
> object {
>     HF_Cylinder (F, off, off,
> <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3)
>     texture {
>        pigment {color rgb 1}
>     }
> }

It would seem that the macro needs the addition of  .gray  to H variable, as
in:

         #declare PArr[J][K] = P + H.gray*Dir*Depth;

or added to each of the two instances of it before that line.

I'm not sure why this would be nonfunctional for image maps in usual usage,
since I had thought those macros already considered for images. Maybe
someone else can speak as to what is going on about that.

Bob H.


Post a reply to this message

From: Hugo Asm
Subject: Re: Cylindrical HF
Date: 13 Aug 2004 12:02:15
Message: <411ce607@news.povray.org>
There is a cylindrical HF macro distributed along with POV-Ray (at least
there used to be). Have you looked through the include library?

Regards,
Hugo


Post a reply to this message

From: Samuel Benge
Subject: Re: Cylindrical HF
Date: 13 Aug 2004 14:03:20
Message: <411D01C5.10401@hotmail.com>
Gena wrote:

> I need a cylindrical heightfield from my bitmap.
> The following code doesn't work:
> 
> #include "shapes.inc"
> 
> #declare F = function {
>    pigment {
>       image_map {
>           png "foo.png"
>         map_type 0
>       }
>    }
> }
> 
> object {
>    HF_Cylinder (F, off, off,
> <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3)
>    texture {
>       pigment {color rgb 1}
>    }
> }
> 
> How can I make it work? Is there any other macro(s)
> making cylindrical heightfield or cylindrical mesh
> from bitmap?
> 
> Gena.


I was just listing a bunch of things I thought _might_ be the problem, 
but I'm 99% sure what the problem is now. Where you have "HF_Cylinder (F 
", try making it "HF_Cylinder ( function{ F(x,y,z).grey } "

This macro demands you put the function inside a function{... } block. 
Since you have declared a pigment as a function, you have to add the 
".grey" to the end of the invoked function. I think that might be what 
Bob was saying....

Here's what it will actually look like, in case the above was confusing:

HF_Cylinder (
  function{ F(x,y,z).grey } , off, off,
  <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3
)


Hope this helps!

-Sam


Post a reply to this message

From: Hughes, B 
Subject: Re: Cylindrical HF
Date: 13 Aug 2004 17:45:41
Message: <411d3685$1@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote in message
news:411### [at] hotmailcom...
>  try making it "HF_Cylinder ( function{ F(x,y,z).grey } "
>
> Since you have declared a pigment as a function, you have to add the
> ".grey" to the end of the invoked function. I think that might be what
> Bob was saying....
>
> HF_Cylinder (
>   function{ F(x,y,z).grey } , off, off,
>   <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3
> )

Not really... :-) A much better answer, Samuel! I made the mistake of trying
F(x,y,z).gray without the function {} wrapper and then went about changing
the macro itself. Bad idea. So real glad you saved the day by replying with
this solution. I should have known to do this!

Bob H.


Post a reply to this message

From: Gena
Subject: Re: Cylindrical HF
Date: 14 Aug 2004 00:01:34
Message: <411d8e9e@news.povray.org>
Thank you! It works now.

Gena.

Samuel Benge wrote:
> Gena wrote:
> 
>> I need a cylindrical heightfield from my bitmap.
>> The following code doesn't work:
>>
>> #include "shapes.inc"
>>
>> #declare F = function {
>>    pigment {
>>       image_map {
>>           png "foo.png"
>>         map_type 0
>>       }
>>    }
>> }
>>
>> object {
>>    HF_Cylinder (F, off, off,
>> <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3)
>>    texture {
>>       pigment {color rgb 1}
>>    }
>> }
>>
>> How can I make it work? Is there any other macro(s)
>> making cylindrical heightfield or cylindrical mesh
>> from bitmap?
>>
>> Gena.
> 
> 
> 
> I was just listing a bunch of things I thought _might_ be the problem, 
> but I'm 99% sure what the problem is now. Where you have "HF_Cylinder (F 
> ", try making it "HF_Cylinder ( function{ F(x,y,z).grey } "
> 
> This macro demands you put the function inside a function{... } block. 
> Since you have declared a pigment as a function, you have to add the 
> ".grey" to the end of the invoked function. I think that might be what 
> Bob was saying....
> 
> Here's what it will actually look like, in case the above was confusing:
> 
> HF_Cylinder (
>  function{ F(x,y,z).grey } , off, off,
>  <60,60>, on, "", <0.5, 0.0, 0.5>, <0.5, 1.0, 0.5>, 0.4, 0.3
> )
> 
> 
> Hope this helps!
> 
> -Sam
> 
> 
> 
> 
> 
> 
> 
>


Post a reply to this message

From: Gena
Subject: Re: Cylindrical HF
Date: 14 Aug 2004 00:03:16
Message: <411d8f04$1@news.povray.org>
Yes, it's in shapes.inc
My code works now (thanks to Samuel).

Gena.


Hugo Asm wrote:

> There is a cylindrical HF macro distributed along with POV-Ray (at least
> there used to be). Have you looked through the include library?
> 
> Regards,
> Hugo
> 
>


Post a reply to this message

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