|
|
Cris Williams wrote:
>
> I seem to recall someone describing a way to wrap a heightfield around a
> cylinder. Does anyone else remember this, or was I just dreaming?
There's a HF_Cylinder macro in Povray 3.5 shapes.inc that generates a
mesh. Apart from that you can also use an isosurface with an image
map/image_pattern function.
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
|
|
|
|
"Cris Williams" wrote:
> I seem to recall someone describing a way to wrap a
> heightfield around a cylinder. Does anyone else
> remember this, or was I just dreaming?
Technically you can't wrap a height_field object around a cylinder, but you
can create a mesh object that is just like it.
With POV-Ray 3.5 is an include file "shapes.inc" which has a macro to do
just that. (POV-Ray 3.5 is currently in the beta stage. You can download a
time-limited beta from www.povray.org for windows or mac.)
Rune
--
3D images and anims, include files, tutorials and more:
Rune's World: http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk
Post a reply to this message
|
|
|
|
Wasn't it Cris Williams who wrote:
>I seem to recall someone describing a way to wrap a heightfield around a
>cylinder. Does anyone else remember this, or was I just dreaming?
You may not be able to wrap a height_field round a cylinder, but you can
wrap an image_map pigment around a cylinder (using map_type 2). In v3.5
any pigment can be used as an isosurface function, so we can combine the
cylindrical image_map function with a cylindrical isosurface.
Note: I've applied a scaling of y/pi to the HF function in this example,
so that a square heightfield image looks correctly proportioned when
stretched round a cylinder. Alternatively create a heightfield image
that is pi times wider than it is high.
camera { location <0, 2, -6> look_at <0, 0, 0>}
light_source {<-100,200,-100> colour rgb 1}
light_source {<100,-200,-100> colour rgb 1}
// ----------------------------------------
#declare Cyl = function {x^2 + z^2 -1}
#declare HF = function {pigment {image_pattern {jpeg "foo.jpg"
map_type 2 interpolate 2}}}
#declare F=function{Cyl(x,0,z) - HF(x,y/pi,z).grey} // See Note
isosurface {
function { F(x,y,z) }
max_gradient 20
contained_by{box{-1.5,1.5}}
pigment {rgb 1}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|