POV-Ray : Newsgroups : povray.general : Wrinkle free 3 point patch -or- Jpatch anticipation : Wrinkle free 3 point patch -or- Jpatch anticipation Server Time
5 Nov 2024 01:21:17 EST (-0500)
  Wrinkle free 3 point patch -or- Jpatch anticipation  
From: Breton Slivka
Date: 27 Jul 2003 19:58:19
Message: <Xns93C5B757F4075ZenPsychoyahoocom@204.213.191.226>
Most of us are aware of the phenomenon when it comes to bezier patches, and 
programs like spatch, which produce 3 point patches.

That is, they always have a wrinkle in one corner, because it's actually 
two corners scrunched together.

Well, The situation need not be the case!

As I understand, internally, bezier patches are converted by triangles by 
simply taking grid UV samples from the bicubic patch function.

suppose, the UV samples were altered, so that instead of taking a 13 by 13 
grid of samples, or 17 by 17 grid of samples as is the case now, the 
algorithem could detect when two points touch, and if that is the case, 
start at the edge where the two points touch, For example, if edge*1 is 
actually a point, start with one sample in V=0.5 when U=0, then two samples 
at V=0 and V=1 when U=1/16, then 3 samples at V=0,0.5 and 1 when U=2/16 
etc.... until U=16..

In the case of a 3 point patch, this should result in no wrinkles, as in 
this diagram I've prepared http://zenpsycho.com/wrinkle.gif

Perhaps this could either be implemented as a patch in povray itself, or as 
a feature of Jpatch, the promising new patch modeller written in java, 3 
point patches could simply be exported as a triangle mesh, using my UV 
sampling scheme. 

Discontinuities at the edges shouldn't be more of a problem than usual, 
since each edge will have the same amount of samples as connecting 4 point 
patches. 

I'd try and implement this stuff myself, but I'm afraid I'm not smart 
enough or have the time, but I figured that there should be a solution to 
this problem that I should share. 

anyways, thoughts? questions?


Post a reply to this message

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