POV-Ray : Newsgroups : povray.newusers : How to create 4x4 grid using bicubic patch : How to create 4x4 grid using bicubic patch Server Time
9 Nov 2024 04:34:34 EST (-0500)
  How to create 4x4 grid using bicubic patch  
From: Aj
Date: 7 Dec 2022 01:20:00
Message: <web.63902f9a6bed5a30220064e63d902b29@news.povray.org>
Hello everyone,

I was trying to create a grid of 4x4 using bicubic_patch but unfortunately, I
was unable to figure out how to achieve that. I was able to follow up with the
documentation and created a 3x3 grid, Any suggestion on how that can be achieved
would be really helpful.

I have attached the rendered image of the 3x3 grid along with the code.

//code


global_settings {assumed_gamma 1.0}
background {rgb <1,0.9,0.9>}
camera { location <3.1,7,-8> look_at <3,-2,1.5> angle 40 }
light_source {<500,500,-500> rgb 1 }

#declare B11=<0,0,3>; #declare B12=<1,0,3>; #declare B13=<2,0,3>; #declare
B14=<3,0,3>;// row 1

#declare B21=<0,0,2>; #declare B22=<1,0,2>; #declare B23=<2,0,2>; #declare
B24=<3,0,2>; // row 2

#declare B31=<0,0,1>; #declare B32=<1,0,1>; #declare B33=<2,0,1>; #declare
B34=<3,0,1>; // row 3

#declare B41=<0,0,0>; #declare B42=<1,0,0>; #declare B43=<2,0,0>; #declare
B44=<3,0,0>; // row 4





bicubic_patch {
   type 1 flatness 0.001
   u_steps 128 v_steps 128
   uv_vectors
   <0,0> <1,0> <1,1> <0,1>
   B11, B12, B13, B14//, B14
   B21, B22, B23, B24//, B25
   B31, B32, B33, B34//, B35
   B41, B42, B43, B44//, B45
   uv_mapping
   texture {
      pigment {
         checker
         color rgbf <1,1,1,0.5>
         color rgbf <0,0,1,0.7>
         scale 1/3


      }
      finish {phong 0.6 phong_size 20}
   }
   no_shadow

}


Post a reply to this message


Attachments:
Download 'learning_patch.png' (18 KB)

Preview of image 'learning_patch.png'
learning_patch.png


 

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