POV-Ray : Newsgroups : povray.newusers : image_map on more than x-y plane? : Re: image_map on more than x-y plane? Server Time
6 Oct 2024 02:41:18 EDT (-0400)
  Re: image_map on more than x-y plane?  
From: rob-p
Date: 22 Jul 2009 16:55:00
Message: <web.4a677bef1645fb935b19dea50@news.povray.org>
Hi Warp, thanks for the suggestion. I'm currently using 3.6, but I checked the
documentation on uv_mapping and it looks like what I want. However, since I use
a superellipsoid for my rounded cube, it won't work in 3.6. Does the cubic warp
in 3.7 support superellipsoids?

In the mean time I found some kind of work-around by defining 3 cubes that are
slightly shifted with respect to each other (see code below). Although it's
just a work-around, I can proceed with my project.

Here is my work-around:

#macro my_cube(x_rot, y_rot, z_rot)
  superellipsoid {
    <0.3, 0.3>
    texture {
      pigment {
        image_map {
          gif "animal.gif"
          filter all 0.6
        }
        scale 2
        translate 1*x
        translate 1*y
        rotate x_rot*x
        rotate y_rot*y
        rotate z_rot*z
      }
      finish {
        phong 1.0
        phong_size 10
        ambient 0.2
        diffuse 0.8
      }
    }
  }
#end

union {
  object { my_cube( 0,  0,  0) }
  object { my_cube( 0, 90,  0) translate -0.01*x translate  0.01*z }
  object { my_cube(90,  0,  0) translate  0.01*y translate  0.01*z }
  rotate -45*x
  rotate -45*y
}


Post a reply to this message

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