POV-Ray : Newsgroups : povray.programming : Bicubic patch bug (job000202) : Re: Bicubic patch bug (job000202) Server Time
28 Jul 2024 06:24:45 EDT (-0400)
  Re: Bicubic patch bug (job000202)  
From: Gleb
Date: 8 Nov 2002 12:04:11
Message: <3dcbee8b@news.povray.org>
Unfortunately, this patch is not enough, at least in some cases.
For the moment I am using brute force:
#define BEZIER_EPSILON 1.0e-20
in original povray-3.50 bezier.cpp,

but it should be a better way to cure this,
I'm not sure that this will always work.

Check this code for example, it works almost the same way
both with povray-3.50 and with your patch,
only with BEZIER_EPSILON=1.0e-20 it is OK.

Gleb

//----------------8<----------------
//640x480 AA 0.3

camera {
  location y-x-z
  look_at 0
}

#declare Object=
bicubic_patch{type 1 flatness 0 u_steps 4 v_steps 4
<-24.54,61.83,-41.23><-22.71,63.03,-43.12><-18.35,63.7,-45.4><-15.8,60.14,-4
4.2>
<-24.54,59.08,-52.08><-22.39,61.24,-51.29><-17.66,59.73,-60.16><-15.86,57.59
,-57.03>
<-10.85,58.23,-66.27><-12.70,60.62,-71.79><-6.52,53.89,-76.18><-9.01,51.02,-
77.93>
<0,55.05,-63.27><0,57.61,-70.18><0,54.61,-75.95><0,52.51,-77.30>
}


#declare Object=#object{Object
  #local vv=-(max_extent(Object)-min_extent(Object))/2;
  translate vv-min_extent(Object)
  scale .75/vlength(vv)
}

#object{Object
  scale 1/16
  pigment{color rgb 1}
  finish{ ambient 10}
}
//----------------8<----------------


Post a reply to this message

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