POV-Ray : Newsgroups : povray.general : bicubic patch flatness test : bicubic patch flatness test Server Time
3 Aug 2024 04:17:14 EDT (-0400)
  bicubic patch flatness test  
From: Sascha Ledinsky
Date: 21 May 2004 12:51:10
Message: <40ae337e@news.povray.org>
I'm not sure if this is a bug or just a side-effect of the flatness test 
for bicubic patches. Anyway, if a patch is flat (meaning planar) it is 
not being tesselated, even if the edges are rounded.

Here are three short test scenes:

1. flatness 0, how it IMHO should look like:

bicubic_patch { type 1 flatness 0 u_steps 4 v_steps 4
 
<0.0,5.0,0.0>,<-2.739125,5.0,0.0>,<-5.0,2.739125,0.0>,<-5.0,0.0,0.0>,<0.0,6.666667,0.0>,<-2.739125,6.666667,0.0>,<-6.666667,2.739125,0.0>,<-6.666667,0.0,0.0>,<0.0,8.333333,0.0>,<-5.47825,8.333332,0.0>,<-8.333332,5.47825,0.0>,<-8.333333,0.0,0.0>,<0.0,10.0,0.0>,<-5.47825,10.0,0.0>,<-10.0,5.47825,0.0>,<-10.0,0.0,0.0>
         pigment { color rgb <0.5,0.5,0.5> }
         finish { ambient 1 diffuse 0 }
}
camera { location <0,0,-30> look_at <0,0,0> }

---

2. flatness 0.001 - the same patch, but it doesn't get tesselated at all!


bicubic_patch { type 1 flatness 0.001 u_steps 4 v_steps 4
 
<0.0,5.0,0.0>,<-2.739125,5.0,0.0>,<-5.0,2.739125,0.0>,<-5.0,0.0,0.0>,<0.0,6.666667,0.0>,<-2.739125,6.666667,0.0>,<-6.666667,2.739125,0.0>,<-6.666667,0.0,0.0>,<0.0,8.333333,0.0>,<-5.47825,8.333332,0.0>,<-8.333332,5.47825,0.0>,<-8.333333,0.0,0.0>,<0.0,10.0,0.0>,<-5.47825,10.0,0.0>,<-10.0,5.47825,0.0>,<-10.0,0.0,0.0>
         pigment { color rgb <0.5,0.5,0.5> }
         finish { ambient 1 diffuse 0 }
}
camera { location <0,0,-30> look_at <0,0,0> }

---

3. flatness 0.001 - I've moved to first control point just a bit, so the 
patch isn't planar anymore, and it get's tesselated correctly...

bicubic_patch { type 1 flatness 0.001 u_steps 4 v_steps 4
 
<0.0,5.0,0.5>,<-2.739125,5.0,0.0>,<-5.0,2.739125,0.0>,<-5.0,0.0,0.0>,<0.0,6.666667,0.0>,<-2.739125,6.666667,0.0>,<-6.666667,2.739125,0.0>,<-6.666667,0.0,0.0>,<0.0,8.333333,0.0>,<-5.47825,8.333332,0.0>,<-8.333332,5.47825,0.0>,<-8.333333,0.0,0.0>,<0.0,10.0,0.0>,<-5.47825,10.0,0.0>,<-10.0,5.47825,0.0>,<-10.0,0.0,0.0>
         pigment { color rgb <0.5,0.5,0.5> }
         finish { ambient 1 diffuse 0 }
}
camera { location <0,0,-30> look_at <0,0,0> }

---

The only workaround I see is to always use flatness 0...

regards
-Sascha


Post a reply to this message

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