|
|
> Kirk,
>
> It appears that I need a little help on your "image as function" code. If I
> try to render the object (see below) POVray tells me this:
>
> {
> function
> {
> GateF(x,y,z)
> }
> Parse Error: Expected '.', } found instead
>
> Did I misunderstand your sample?
>
> -Allan
Pov is looking for "function {GateF(x,y,z).gray}" It will always require
..gray or .red etc. if you are using a pigment function (including a
bitmap).
Here's my whole code for the gate:
#declare PGate = //The bitmap pigment
pigment {
image_pattern {
jpeg "Gate/GateStructure4.jpg"
}
}
#declare GateF = //convert to function
function {
pigment {PGate scale 10000*z}
}
#declare Gbumps = //bumps applied
function {
pigment {
bumps
scale .01
color_map {
[0 rgb 0]
[1 rgb 1]
}
}
}
#declare GPlaneF = //the pigment function is infinite in the z direction.
This limits it and allows for some rounding of the edges when combined with
the bumps pigment
function {
pigment {
gradient z
color_map {
[0.0 rgb 0]
[0.1 rgb 1]
[0.9 rgb 1]
[1.0 rgb 0]
}
scale .1*z
}
}
#declare IsoGate =
isosurface {
function {(GateF(x,y,0).gray -.5 +
Gbumps(x,y,z).gray*.5)*GPlaneF(x,y,z).gray}
contained_by { box { 0, <1,.999,.05> } }
accuracy 0.001
max_gradient 35
scale 2*y
translate -1*x
translate 1*x
}
Post a reply to this message
|
|