POV-Ray : Newsgroups : povray.general : image map inside a cylinder? : Re: image map inside a cylinder? Server Time
5 Nov 2024 11:20:31 EST (-0500)
  Re: image map inside a cylinder?  
From: sascha
Date: 27 Apr 2003 09:23:46
Message: <3eabd9e2@news.povray.org>
A cylindrical height-field is not supported, but you could use a kind of 
displacement-map on a cylinder. POV can do this using iso-surfaces. Just 
take a cylinder function (e.g. x^2 + z^2 - 1 = 0) and add or subtract 
the "image". Here's a short code, the camera is actually inside the 
cylinder, the image is engraved on the inside. If you use text in the 
image bake it a bit blurry.

#default {
	pigment { color rgb <1,1,1> }
	finish { ambient 0.2 diffuse 0.8 }
}

camera {
	location <0,0.5,-0.9>
	look_at 0
	angle 120
}

light_source {
	<-0.5,0.9,-0.9>
	color rgb <1,1,1>
}

#declare f_pigm = function {
	pigment {
		image_map {
			png "f:/test.png"
			interpolate 2
			map_type 2
		}
	}
}

isosurface {
	function { x*x+z*z-1 + 0.1*f_pigm(x,y,z).grey }
	max_gradient 20
	no_shadow
}

-sascha

Alan Walkington wrote:
> Maybe not an image map.  I want to engrave initials and a date inside a
> wedding ring.  The ring is the difference between a torus and a cylinder.
> 
> Haven't a clue where to start ... I tried with an image map, but I've no
> idea how to get it inside, not outside, the cylinder.  Anyway, I really
> should change the image to a height map and use it to 'engrave' the date and
> initials inside the ring.
> 
> Any suggestions?
> 
> TIA
> Alan Walkington
> 
>


Post a reply to this message

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