The POV-Ray Cyclopedia

 Mike Varley asked: "I'm trying to make an image on to the 'end' of a prism but now matter what I do it always maps onto the 'side' of it. Basically, I'm trying to create a 7 sided coin with an image mapped on the 'heads' and 'tails' side..."

Part One
A quick answer
 Ron Parker provided this solution, which he derived from Chris Colefax:

#macro DoubleImage ( front,back )
  radial
  pigment_map {
    [ .5 front ]
    [ .5 back rotate 180*y ]
  }
#end

#declare f=pigment { image_map{ sys "heads.bmp" once } translate -.5 }
#declare b=pigment { image_map{ sys "tails.bmp" once } translate -.5 }

#declare coin = cylinder {
  -.1*z,.1*z,0.5
  texture { pigment { color rgb 1 } }
  texture { pigment { DoubleImage(f,b) } }
  scale <2,2,1> }
 I altered this to make the coin the same size as the image map, then scale the whole thing
Part Two
Trying the code

 Using images from the US Mint web page, I have animated the new $1 Sacagawea coin. Keep in mind that I have used image maps, and I did not convert them to bump maps, so the coin will not have accurate shadows, which is evident in the animation.

Front of Sacagawea coin
1. Front of coin
(Click for animation)

Front of Sacagawea coin
1. Front of coin
(Click for animation)


Send feedback, or head back to the Cyclopedia.

Thanks for watching.