POV-Ray : Newsgroups : povray.advanced-users : Q: smooth union of bezier patches : Re: Q: smooth union of bezier patches Server Time
30 Jul 2024 20:25:00 EDT (-0400)
  Re: Q: smooth union of bezier patches  
From: Marc Schimmler
Date: 29 Apr 1999 05:51:52
Message: <37281DA7.115C24F0@ica.uni-stuttgart.de>
ingo wrote:
> 
> While exploring the bezier patches, I can not find a way to attatch two, non
> flat, patches without a seam. To get an idea of what I'm trying run the included
> scene.
> 
> Have been looking at the output of sPatch, but I'm still clueless.
> 
> ingo
> --

In October last year Vidar Maddsen asked something similiar. I created a
small scene where I attached two patches. 
The most important thing to understand is that only the four cornerpoint
represent positions of the patch while the rest tells where the 'curve
(spline)' is heading to. In order to get a seamless connection all four
points of seam have to be the same for both patches. In the follwing
example this are the last line of the blue and the first line of the red
patch.
I hopt this one helps:


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> } 					      //   |
  }								      //   |s
								      //   |a
                           					      //   |m
//red patch							      //   |e
bicubic_patch {							      //   |  type 1							      	      //   |l
  flatness 0.01  						      //   |i
  u_steps 10							      //   |n
  v_steps 10							      //   |e
  <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> }
  }


Marc
-- 
Marc Schimmler


Post a reply to this message

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