|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|