POV-Ray : Newsgroups : povray.general : Q: Bezier patch generation : Re: Q: Bezier patch generation Server Time
16 Nov 2024 03:22:46 EST (-0500)
  Re: Q: Bezier patch generation  
From: Marc Schimmler
Date: 16 Oct 1998 05:39:29
Message: <36270640.41C6@ica.uni-stuttgart.de>
Just to prove that Jerry is right (and that my quick guess was also ;) )
I made a small example by hand:


camera {
 rotate <0,180,0>
 location <7,5,3>
 look_at  <1.5,0,3>
 angle 60
}

light_source { <1.5,9,1.5> color rgb <1.0.0>}


plane {y,-4 pigment {checker rgb<1,1,1>, rgb <0.5,0.5,0.5>}}

//blue patch
bicubic_patch {
  type 1
  flatness 0.01
  u_steps 10
  v_steps 10
  <0.0, 0.0, 0.0>, <0.0, 0.5, 0.0>, <3.0, 0.5, 0.0>, <3.0, 0.0, 0.0>,
  <0.0, 0.5, 1.0>, <0.0, 3.0, 1.0>, <3.0, 3.0, 1.0>, <3.0, 0.5, 1.0>,
  <0.0, 0.5, 2.0>, <0.0, 3.0, 2.0>, <3.0, 3.0, 2.0>, <3.0, 0.5, 2.0>,
  <0.0, 0.0, 3.0>, <0.0, 0.5, 3.0>, <3.0, 0.5, 3.0>, <3.0, 0.0, 3.0>
  pigment {color rgb <0,0,1> }
  }


//red patch
bicubic_patch {
  type 1
  flatness 0.01
  u_steps 10
  v_steps 10
  <0.0, 0.0, 3.0>, <0.0, 0.5, 3.0>, <3.0, 0.5, 3.0>, <3.0, 0.0, 3.0>,
  <0.0, -0.5, 4.0>, <0.0, -2.0, 4.0>, <3.0, -2.0, 4.0>, <3.0, -0.5,
4.0>,
  <0.0, -0.5, 5.0>, <0.0, -2.0, 5.0>, <3.0, -2.0, 5.0>, <3.0, -0.5,
5.0>,
  <0.0, 0.0, 6.0>, <0.0, 0.5, 6.0>, <3.0, 0.5, 6.0>, <3.0, 0.0, 6.0>
  pigment {color rgb <1,0,0> }
  }

It works fine. BTW I had a lot of troubles with edges in the patches
until I used a flatness of 0.01 but you sure know that.


Your sincerely

Marc


-- 
Marc Schimmler
Institut fuer Computeranwendungen
Universitaet Stuttgart


Post a reply to this message

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