|
|
"mathfan" <iva### [at] c2inet> wrote in message
news:web.3e9fa89bec45937d30e3295f0@news.povray.org...
> I'm currently working on a scene that contains several bicubic pathces.
I've
> tried to use an image_map on them, but the image seems strangely stretched
> in some places while it's fine in other places.
> Is there something I can do about this?
>
> thanx
>
I just happened to have built what you described just yesterday. Here's what
I found;
1. I modified the bicubic patch sample in the POV Help docs so that it had
the same orientation as an image map (the XY plane from 0,0 to 1,1). I also
made it absolutely flat, so I could see the effects of the image mapping.
#declare B11=<0,0,0>; #declare B12=<1,0,0>; //
#declare B13=<2,0,0>; #declare B14=<3,0,0>; // row 1
#declare B21=<0,1,0>; #declare B22=<1,1,0>; //
#declare B23=<2,1,0>; #declare B24=<3,1,0>; // row 2
#declare B31=<0,2,0>; #declare B32=<1,2,0>; //
#declare B33=<2,2,0>; #declare B34=<3,2,0>; // row 3
#declare B41=<0,3,0>; #declare B42=<1,3,0>; //
#declare B43=<2,3,0>; #declare B44=<3,3,0>; // row 4
2. The bicubic sample is bigger by 3 so I scaled the image map by 3. I also
made sure the aspect ratio of the original image was factored into the final
scaling at the object stage.
3. The patch forms the basis for memos on a bulletin board in my virtual
office (see http://www.worldwins.net/~peter/images/wwins-notes.jpg )
Here's the code for the memos;
//--------------------------------------------------------------
#declare memo = bicubic_patch {
type 1
flatness 0.8 // flatness value 0-1
// flatness_value = 0.0 to 1.0, with higher = flatter
u_steps 3 // # of triangles to subdivide (1-5)
v_steps 3 // # of triangles to subdivide (1-5)
uv_vectors
<0,0> <1,0> <1,1> <0,1>
B11, B12, B13, B14
B21, B22, B23, B24
B31, B32, B33, B34
B41, B42, B43, B44
texture {notepage scale 3 } // to match the patch
translate <-1.5, -1.5, 0> // center the patch on origin to make further
transformations easier to predict.
}
object {memo scale <8.5, 11, 1>} // aspect ratio factored in for
letter-size memos
//---------------------------------------------------------------
I added a bit of page curl to the memos to make them look more natural
Hope this is clear enough
Post a reply to this message
|
|