POV-Ray : Newsgroups : povray.binaries.images : Patches for arbitrary topology shapes - 4 attachments Server Time
15 Oct 2026 17:38:34 EDT (-0400)
  Patches for arbitrary topology shapes - 4 attachments (Message 1 to 29 of 29)  
From: Tor Olav Kristensen
Subject: Patches for arbitrary topology shapes - 4 attachments
Date: 3 Jan 2004 23:08:31
Message: <3ff791bf@news.povray.org>
I have now looked into the problem of modelling shapes of
arbitrary topology by using POV-Ray's built-in bicubic patches.

For such shapes, it is often necessary to have more (or less)
than four such patches meet at a single point. How to do this
seems to be a non-trivial problem. (At least for me.)

But now I have rewritten my macros (again) to allow for such
topologies. To model a shape, one must put all the coordinates
for the control points in a 1-dimensional list. Then one must
put all the patches in another 1-dimensional list. Each patch
therein is defined by the numbers of the 4 control points, that
controls each patch. (These 4 numbers must be written in anti-
clockwise order.)

When the information above is given, the macros will calculate
the information that is needed to make the transitions between
the patches smooth. (Other macros will place all the patches.)

The patchwork shown in these images has a point were five bicubic
patches meet. (The macros will allow any number of patches to
meet at any point.)

You'll probably notice that the shape is not "perfect". But it
can be refined by setting the patch resolution higher; i.e. by
defining more control points (and thereby more patches) for the
same region of the shape.

The 2nd image is an orthographic top view and the 4th image shows
where the control points are located.


Any comments ?


Tor Olav


Post a reply to this message


Attachments:
Download 'FivePatches13.jpg' (28 KB) Download 'FivePatches14.jpg' (30 KB) Download 'FivePatches15.jpg' (26 KB) Download 'FivePatches16.jpg' (29 KB)

Preview of image 'FivePatches13.jpg'
FivePatches13.jpg

Preview of image 'FivePatches14.jpg'
FivePatches14.jpg

Preview of image 'FivePatches15.jpg'
FivePatches15.jpg

Preview of image 'FivePatches16.jpg'
FivePatches16.jpg


 

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment
Date: 4 Jan 2004 01:19:43
Message: <3ff7b07f@news.povray.org>
And here is a shape where six bicubic patches
meet at one of the control points.

Below is some code that show how the shape was
defined and how macros was called in order to
have the shape drawn.


Tor Olav


#declare A = 0.3;

#declare I = 1.0;
#declare J = 1.0;
#declare K = 1.0;

#declare P = 2.0;
#declare Q = 2.0;
#declare R = 2.0;

#declare Points =
  array[37] {
    < 0,  0,  0>, // 00
    < A, -J, -A>, // 01
    < I, -A,  A>, // 02
    < A,  A,  K>, // 03
    <-A,  J,  A>, // 04
    <-I,  A, -A>, // 05
    <-A, -A, -K>, // 06
    < I, -J,  0>, // 07
    < I,  0,  K>, // 08
    < 0,  J,  K>, // 09
    <-I,  J,  0>, // 10
    <-I,  0 ,-K>, // 11
    < 0, -J, -K>, // 12
    < A, -Q, -A>, // 13
    < P, -A,  A>, // 14
    < A,  A,  R>, // 15
    <-A,  Q,  A>, // 16
    <-P,  A, -A>, // 17
    <-A, -A, -R>, // 18
    < I, -Q,  0>, // 19
    < P, -J,  0>, // 20
    < P,  0,  K>, // 21
    < I,  0,  R>, // 22
    < 0,  J,  R>, // 23
    < 0,  Q,  K>, // 24
    <-I,  Q,  0>, // 25
    <-P,  J,  0>, // 26
    <-P,  0, -K>, // 27
    <-I,  0, -R>, // 28
    < 0, -J, -R>, // 29
    < 0, -Q, -K>, // 30
    < P, -Q,  0>, // 31
    < P,  0,  R>, // 32
    < 0,  Q,  R>, // 33
    <-P,  Q,  0>, // 34
    <-P,  0, -R>, // 35
    < 0, -Q, -R>  // 36
  }

#declare Patches =
  array[24] {
    array [4] {  0,  1,  7,  2 }, // 00
    array [4] {  0,  2,  8,  3 }, // 01
    array [4] {  0,  3,  9,  4 }, // 02
    array [4] {  0,  4, 10,  5 }, // 03
    array [4] {  0,  5, 11,  6 }, // 04
    array [4] {  0,  6, 12,  1 }, // 05
    array [4] {  1, 13, 19,  7 }, // 06
    array [4] {  2,  7, 20, 14 }, // 07
    array [4] {  2, 14, 21,  8 }, // 08
    array [4] {  3,  8, 22, 15 }, // 09
    array [4] {  3, 15, 23,  9 }, // 10
    array [4] {  4,  9, 24, 16 }, // 11
    array [4] {  4, 16, 25, 10 }, // 12
    array [4] {  5, 10, 26, 17 }, // 13
    array [4] {  5, 17, 27, 11 }, // 14
    array [4] {  6, 11, 28, 18 }, // 15
    array [4] {  6, 18, 29, 12 }, // 16
    array [4] {  1, 12, 30, 13 }, // 17
    array [4] {  7, 19, 31, 20 }, // 18
    array [4] {  8, 21, 32, 22 }, // 19
    array [4] {  9, 23, 33, 24 }, // 20
    array [4] { 10, 25, 34, 26 }, // 21
    array [4] { 11, 27, 35, 28 }, // 22 
    array [4] { 12, 29, 36, 30 }, // 23
  }


union {
  DrawAllPatches(
    Points,
    Patches,
    PointNormals(Points, Patches)
  )
  texture { ... }
}


Post a reply to this message


Attachments:
Download 'SixPatches.jpg' (31 KB)

Preview of image 'SixPatches.jpg'
SixPatches.jpg


 

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 4 Jan 2004 01:59:07
Message: <3ff7b9bb@news.povray.org>
For the curious: Here are the patch numbers in black
and the point numbers in white. (See the table entries
within my previous post.)


Tor Olav


Post a reply to this message


Attachments:
Download 'SixPatches_Numbers.jpg' (43 KB)

Preview of image 'SixPatches_Numbers.jpg'
SixPatches_Numbers.jpg


 

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 4 Jan 2004 02:14:06
Message: <3ff7bd3e@news.povray.org>
Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote in 
news:3ff7b07f@news.povray.org:

> #declare A = 0.3;
> 
> #declare I = 1.0;
> #declare J = 1.0;
> #declare K = 1.0;
> 
> #declare P = 2.0;
> #declare Q = 2.0;
> #declare R = 2.0;

The attached image is the result if these numbers are
changed to this:

#declare A = 0.10;

#declare I = 0.4;
#declare J = 0.4;
#declare K = 0.4;

#declare P = 2.0;
#declare Q = 2.0;
#declare R = 2.0;


Ok - Now I'll stop posting images to this thread.


Tor Olav


Post a reply to this message


Attachments:
Download 'SixPatches02.jpg' (29 KB)

Preview of image 'SixPatches02.jpg'
SixPatches02.jpg


 

From: Christoph Hormann
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 4 Jan 2004 05:02:04
Message: <dk4lc1-1p2.ln1@triton.imagico.de>
These all look very interesting, i wonder if this could be extended to a 
system to design shapes with smooth transits, with a few elements like 
this you could build a rounded version of any CSG made of axis-aligned 
boxes.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Jellby
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 4 Jan 2004 06:24:05
Message: <3ff7f7d4@news.povray.org>
Among other thigs, Christoph Hormann wrote:

> These all look very interesting, i wonder if this could be extended to a
> system to design shapes with smooth transits, with a few elements like
> this you could build a rounded version of any CSG made of axis-aligned
> boxes.

Indeed, interesting...

Could you extend the macros to automatically "patch" parametric shapes or 
isosurfaces (Something like Ingo's MMMM)?

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 4 Jan 2004 19:41:40
Message: <3ff8b2c4$1@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote in news:dk4lc1-
1p2### [at] tritonimagicode:

> 
> These all look very interesting, i wonder if this could be extended to a 
> system to design shapes with smooth transits, with a few elements like 
> this you could build a rounded version of any CSG made of axis-aligned 
> boxes.

Good idea.

It should certainly be possible, but I'll have to think
about it for a while to find out how to do it.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment - 1 attachment
Date: 4 Jan 2004 19:54:54
Message: <3ff8b5de@news.povray.org>
Jellby <jel### [at] M-yahoocom> wrote in news:3ff7f7d4@news.povray.org:

> Among other thigs, Christoph Hormann wrote:
> 
>> These all look very interesting, i wonder if this could be extended
>> to a system to design shapes with smooth transits, with a few
>> elements like this you could build a rounded version of any CSG made
>> of axis-aligned boxes.
> 
> Indeed, interesting...
> 
> Could you extend the macros to automatically "patch" parametric shapes
> or isosurfaces (Something like Ingo's MMMM)?

It is hard to do with the current version of the
macros, but the previous versions of them can easily
be used for this.

Here's an example image I rendered of a Moebious strip
defined as a parametric surface:

#declare xFn = function(u, v) { cos(u)*(1 + v*cos(u/2)) }
#declare yFn = function(u, v) { sin(u)*(1 + v*cos(u/2)) }
#declare zFn = function(u, v) { v*sin(u/2) }

The surface in the image is made with 33 bicubic patches.


Tor Olav


Post a reply to this message


Attachments:
Download 'MoebiusBicubicMesh.jpg' (46 KB)

Preview of image 'MoebiusBicubicMesh.jpg'
MoebiusBicubicMesh.jpg


 

From: Rune
Subject: Re: Patches for arbitrary topology shapes - 4 attachments
Date: 5 Jan 2004 09:26:05
Message: <3ff973fd@news.povray.org>
I have never been able to figure out how to completely smoothly have
another number than four bicubic patches meet at a point. What rules did
you use to accomplish it?

It would be nice if you gave all the patches the same color, and maybe a
little phong or specular, so the smoothness can be better examined. From
the posted images, it's impossible to tell if the surface really is
completely smooth.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Christoph Hormann
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 5 Jan 2004 10:46:24
Message: <2bdoc1-hpt.ln1@triton.imagico.de>
Tor Olav Kristensen wrote:
> 
>>These all look very interesting, i wonder if this could be extended to a 
>>system to design shapes with smooth transits, with a few elements like 
>>this you could build a rounded version of any CSG made of axis-aligned 
>>boxes.
> 
> 
> Good idea.
> 
> It should certainly be possible, but I'll have to think
> about it for a while to find out how to do it.

Thinking a bit more about it: There are possible special cases where 
things might get quite complicated - But it should not be too difficult 
to do for a difference between two boxes for example: check every corner 
  of the second box if it is inside the first box and trace along all 
edges.  This information should be enough to build the resulting shape.

The whole thing might be easier though if you start with a analytical 
tesselation algorithm (approach would be similar as drafted above with 
insideness tests and traces) and then apply a subdivision algorithm and 
forget about bicubic patches (and if you are even lazier you forget 
about POV-SDL and model your shape in Wings3D :-)).

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 5 Jan 2004 23:10:01
Message: <3ffa3519@news.povray.org>
"Rune" <run### [at] runevisioncom> wrote in news:3ff973fd@news.povray.org:

> I have never been able to figure out how to completely smoothly have
> another number than four bicubic patches meet at a point. What rules did
> you use to accomplish it?
> 
> It would be nice if you gave all the patches the same color, and maybe a
> little phong or specular, so the smoothness can be better examined. From
> the posted images, it's impossible to tell if the surface really is
> completely smooth.


I have rendered some images with specular highlights.

They show that the surface might not be completely
smooth around the "seems" between the patches.

My idea was to have all the 8 control points that
surrounds each "corner point" to lie in the same
plane.

It seems that the results are better if the star
around each of the corner points is regular.

But I now have a growing suspicion that it may not
be possible use bicubic Bezier patches to make such
a surface (that is completely smooth).


Does anyone know if I'm right about this ?

Or have anyone seen images that shows the contrary ?


Tor Olav


Post a reply to this message


Attachments:
Download 'SixPatches08.jpg' (52 KB) Download 'SixPatches07.jpg' (43 KB)

Preview of image 'SixPatches08.jpg'
SixPatches08.jpg

Preview of image 'SixPatches07.jpg'
SixPatches07.jpg


 

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments - 4 attachments
Date: 5 Jan 2004 23:12:27
Message: <3ffa35ab@news.povray.org>
Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote in 
news:3ffa3519@news.povray.org:

...
> I have rendered some images with specular highlights.
> 
> They show that the surface might not be completely
> smooth around the "seems" between the patches.
...


More "evidence" attached.


Tor Olav


Post a reply to this message


Attachments:
Download 'SixPatches04.jpg' (20 KB) Download 'SixPatches05.jpg' (19 KB) Download 'SixPatches06.jpg' (20 KB) Download 'SixPatches09.jpg' (49 KB)

Preview of image 'SixPatches04.jpg'
SixPatches04.jpg

Preview of image 'SixPatches05.jpg'
SixPatches05.jpg

Preview of image 'SixPatches06.jpg'
SixPatches06.jpg

Preview of image 'SixPatches09.jpg'
SixPatches09.jpg


 

From: Gilles Tran
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 6 Jan 2004 07:40:55
Message: <3ffaacd7@news.povray.org>
"Tor Olav Kristensen" <tor_olav_kCURLYAhotmail.com> a écrit dans le message
de news:3ffa3519@news.povray.org...
> Or have anyone seen images that shows the contrary ?

Look for Ron Parker's image "Borrow.jpg" and the corresponding zip file.
http://www.irtc.org/stills/1999-02-28/view.html
It contains code for stitching bezier patches but I can't say if it's ***
perfectly *** smooth.

G.

-- 

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: andrel
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 6 Jan 2004 11:59:05
Message: <3FFAE90B.50803@hotmail.com>
A couple of months ago I did some thinking and computations
on bicubic patches. If I remember correctly, you can get
bicubic patches 2nd order continuous in the vertices (or
any two points along the edge), but only zeroth order
along the edges. So, sorry, completely smooth surfaces
can not be made with bicubic pathes in general in this way.

     Andrel


Tor Olav Kristensen wrote:

> "Rune" <run### [at] runevisioncom> wrote in news:3ff973fd@news.povray.org:
> 
> 
>>I have never been able to figure out how to completely smoothly have
>>another number than four bicubic patches meet at a point. What rules did
>>you use to accomplish it?
>>
>>It would be nice if you gave all the patches the same color, and maybe a
>>little phong or specular, so the smoothness can be better examined. From
>>the posted images, it's impossible to tell if the surface really is
>>completely smooth.
> 
> 
> 
> I have rendered some images with specular highlights.
> 
> They show that the surface might not be completely
> smooth around the "seems" between the patches.
> 
> My idea was to have all the 8 control points that
> surrounds each "corner point" to lie in the same
> plane.
> 
> It seems that the results are better if the star
> around each of the corner points is regular.
> 
> But I now have a growing suspicion that it may not
> be possible use bicubic Bezier patches to make such
> a surface (that is completely smooth).
> 
> 
> Does anyone know if I'm right about this ?
> 
> Or have anyone seen images that shows the contrary ?
> 
> 
> Tor Olav
> 
>


Post a reply to this message

From: Daniel Nilsson
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 6 Jan 2004 16:22:21
Message: <3ffb270d@news.povray.org>
"Tor Olav Kristensen" <tor_olav_kCURLYAhotmail.com> wrote in message
news:3ffa3519@news.povray.org...
>
> They show that the surface might not be completely
> smooth around the "seems" between the patches.
>
> My idea was to have all the 8 control points that
> surrounds each "corner point" to lie in the same
> plane.
>
> It seems that the results are better if the star
> around each of the corner points is regular.
>
> But I now have a growing suspicion that it may not
> be possible use bicubic Bezier patches to make such
> a surface (that is completely smooth).
>
> Does anyone know if I'm right about this ?

I did some work with bicubic patches once and iirc I could get at least
tangent continuity between patches if the control points on both sides of
the edge is in a straight line. I found this mostly by my own
experimentation and have no mathematical proof.
To fix you patches try to make the points A, B and C in the attached image
be in one line (and similar for the other edges). That way your star will
actually become a pentagon.

-- 
Daniel Nilsson


Post a reply to this message


Attachments:
Download 'SixPatches.jpg' (6 KB)

Preview of image 'SixPatches.jpg'
SixPatches.jpg


 

From: Rune
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 09:26:55
Message: <3ffc172f$1@news.povray.org>
Tor Olav Kristensen wrote:
> But I now have a growing suspicion that it may not
> be possible use bicubic Bezier patches to make such
> a surface (that is completely smooth).

I strongly suspect that too.

This thread supports the suspicion:
http://news.povray.org/povray.general/3084/

That's why I was at one point so interested in bicubic patches with 3, 5
and 6 edges, which is another approach to solving the topology problem.
The promising result can be seen here:
http://news.povray.org/povray.binaries.animations/26690/

My ultimate goal was quite similar to yours: To be able to define a list
of points and a list of patches with corners in those points. Only
difference was that exactly four patches had to meet in a point, but
then the patches could have 3, 4, 5 or 6 edges. I abandoned it though -
the triangular bicubic patch was coded by Micha Riser and improved by
me. However, Micha Riser never coded similar patches for 5 and 6 edges,
and I didn't understand the scientific papers on which the special
bicubic patches were based, so I couldn't do it myself.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: andrel
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 11:54:08
Message: <3FFC3962.4090507@hotmail.com>
Rune wrote:


> My ultimate goal was quite similar to yours: To be able to define a list
> of points and a list of patches with corners in those points. Only
> difference was that exactly four patches had to meet in a point, but
> then the patches could have 3, 4, 5 or 6 edges. I abandoned it though -
> the triangular bicubic patch was coded by Micha Riser and improved by
> me. However, Micha Riser never coded similar patches for 5 and 6 edges,
> and I didn't understand the scientific papers on which the special
> bicubic patches were based, so I couldn't do it myself.

If you stich three 4-sided patched together you have a new patch with
6 edges all of which are cubic. (Actually you could do that with 2
but you lose some symmetry then).
If you need 5, you migth consider aligning 2 of these edges from 
neighbouring patches in such a way that they both are described
by the same cubic function. Then you can use that to connect a
single edge of another patch.
I did not have time to test that idea myself, but I suspect that
although the edges are seemless in mathematical space, there could
be cracks in POVRAY becouse of different approximations in the
neighbouring edges.

> Rune
> --
> 3D images and anims, include files, tutorials and more:
> rune|vision:  http://runevision.com **updated Dec 30**
> POV-Ray Ring: http://webring.povray.co.uk
> 
>


Post a reply to this message

From: Rune
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 15:23:37
Message: <3ffc6ac9@news.povray.org>
andrel wrote:
> If you stich three 4-sided patched
> together you have a new patch with
> 6 edges all of which are cubic.

The way you propose to make a 6-sided bicubic patch requires stitching
together 3 bicubic patches so their corners meet in a point. As you can
read in other posts in this thread, you can't do that and still have a
smooth surface.

There is no way to create smooth n-sided bicubic patches from 4-sided
bicubic patches.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: andrel
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 15:47:40
Message: <3FFC701E.3040803@hotmail.com>
Rune wrote:
> andrel wrote:
> 
>>If you stich three 4-sided patched
>>together you have a new patch with
>>6 edges all of which are cubic.
> 
> 
> The way you propose to make a 6-sided bicubic patch requires stitching
> together 3 bicubic patches so their corners meet in a point. As you can
> read in other posts in this thread, you can't do that and still have a
> smooth surface.

I know, I was one of the people to make that claim.

> There is no way to create smooth n-sided bicubic patches from 4-sided
> bicubic patches.
I take that as a challenge. The major problem with stitching together
of the patches is that the derivative for a point on the edge depend
on all 16 parameters of the patch. In your and Tor's scheme you have no
control over many of the other points because they have there own
constraints. But in this case you are completely free to choose any of
the constants, so perhaps in this case it is possible. Most of my week
is scheduled for triangles and general meshing around, so it has to wait
untill the weekend before I can do something on patches again :)
In the mean time I will post some patch-work ball I created earlier.

> Rune
> --
> 3D images and anims, include files, tutorials and more:
> rune|vision:  http://runevision.com **updated Dec 30**
> POV-Ray Ring: http://webring.povray.co.uk
> 
>


Post a reply to this message

From: Rune
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 16:32:42
Message: <3ffc7afa$1@news.povray.org>
andrel wrote:
> Rune wrote:
>> There is no way to create smooth n-sided
>> bicubic patches from 4-sided bicubic patches.
>
> I take that as a challenge.

Sounds good to me. I'm skeptical, but if you do succeed, I'd be
interested in the result.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 1 attachment - 1 attachment
Date: 7 Jan 2004 17:32:05
Message: <3ffc88e5@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote in
news:2bd### [at] tritonimagicode: 

> Tor Olav Kristensen wrote:
>> 
>>>These all look very interesting, i wonder if this could be extended
>>>to a system to design shapes with smooth transits, with a few
>>>elements like this you could build a rounded version of any CSG made
>>>of axis-aligned boxes.
>> 
>> 
>> Good idea.
>> 
>> It should certainly be possible, but I'll have to think
>> about it for a while to find out how to do it.
> 
> Thinking a bit more about it: There are possible special cases where 
> things might get quite complicated - But it should not be too
> difficult to do for a difference between two boxes for example: check
> every corner 
>   of the second box if it is inside the first box and trace along all 
> edges.  This information should be enough to build the resulting
> shape. 

Yes I think that would work.

I don't know if this would easier to implement, but here's
what I thought of:

Divide space into cubes and only then allow each box to
occupy exactly one cube. Then let macros find out which
sides, edges and cornes need to be rendered. (If a box has
a neighboring box at one of their sides, then their common
side, edges and corners should not be rendered. It would
be more difficult to make rules for boxes that are neigh-
bours only at edges or corners.)


> The whole thing might be easier though if you start with a analytical 
> tesselation algorithm (approach would be similar as drafted above with
> insideness tests and traces) and then apply a subdivision algorithm
> and forget about bicubic patches (and if you are even lazier you
> forget about POV-SDL and model your shape in Wings3D :-)).


Hehe...

Yes, but I love solving geometric problems in POV-SDL =)

I have tried to force myself to not look into tesselation
algorithms and surface subdivision before I'm have studied
surface modelling with splines in greater detail.
(And that may take a while.)

Btw.: I suspect there to be strong relations between the
math used for tesselation and the math used when modelling
with splines.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 17:37:18
Message: <3ffc8a1e$1@news.povray.org>
"Gilles Tran" <tra### [at] inapginrafr> wrote in
news:3ffaacd7@news.povray.org: 

> "Tor Olav Kristensen" <tor_olav_kCURLYAhotmail.com> a écrit dans le
> message de news:3ffa3519@news.povray.org...
>> Or have anyone seen images that shows the contrary ?
> 
> Look for Ron Parker's image "Borrow.jpg" and the corresponding zip
> file. http://www.irtc.org/stills/1999-02-28/view.html
> It contains code for stitching bezier patches but I can't say if it's
> *** perfectly *** smooth.

Thank you for the link Gilles.

I'll have a look into his code.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 17:48:15
Message: <3ffc8caf@news.povray.org>
andrel <a_l### [at] hotmailcom> wrote in news:3FF### [at] hotmailcom:

> A couple of months ago I did some thinking and computations
> on bicubic patches. If I remember correctly, you can get
> bicubic patches 2nd order continuous in the vertices (or
> any two points along the edge), but only zeroth order
> along the edges. So, sorry, completely smooth surfaces
> can not be made with bicubic pathes in general in this way.

Thank you for your input.

Maybe I too will have delve into the polynomials used
for these patches, so that I can convince myself that
your conclusion is correct.

I have a (diminishing) hope that you are wrong  :(


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 17:59:37
Message: <3ffc8f59$1@news.povray.org>
"Daniel Nilsson" <dan### [at] daniel-nilssoncom> wrote in
news:3ffb270d@news.povray.org: 

> "Tor Olav Kristensen" <tor_olav_kCURLYAhotmail.com> wrote in message
> news:3ffa3519@news.povray.org...
>>
>> They show that the surface might not be completely
>> smooth around the "seems" between the patches.
>>
>> My idea was to have all the 8 control points that
>> surrounds each "corner point" to lie in the same
>> plane.
>>
>> It seems that the results are better if the star
>> around each of the corner points is regular.
>>
>> But I now have a growing suspicion that it may not
>> be possible use bicubic Bezier patches to make such
>> a surface (that is completely smooth).
>>
>> Does anyone know if I'm right about this ?
> 
> I did some work with bicubic patches once and iirc I could get at
> least tangent continuity between patches if the control points on both
> sides of the edge is in a straight line. I found this mostly by my own
> experimentation and have no mathematical proof.
> To fix you patches try to make the points A, B and C in the attached
> image be in one line (and similar for the other edges). That way your
> star will actually become a pentagon.

I too had some thoughts about doing it that way. But I
thought that it would probably not work. So I wouldn't
spend any time modifying my macros in order to try it.

But now that you suggest this too, I will give it a try.

(I was afraid that I had to change the locations of the
corner points so that the shapes became less rectangular.
Now I hope that it is only necessary to move the two
control points in the middle of each edge.)

Thank you for your suggestion.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 18:09:40
Message: <3ffc91b4$1@news.povray.org>
"Rune" <run### [at] runevisioncom> wrote in news:3ffc172f$1@news.povray.org:

> Tor Olav Kristensen wrote:
>> But I now have a growing suspicion that it may not
>> be possible use bicubic Bezier patches to make such
>> a surface (that is completely smooth).
> 
> I strongly suspect that too.
> 
> This thread supports the suspicion:
> http://news.povray.org/povray.general/3084/
> 
> That's why I was at one point so interested in bicubic patches with 3, 5
> and 6 edges, which is another approach to solving the topology problem.

I recall a faint memory of such a discussion in p.a.u.
But I didn't follow that thread very closely.

Maybe now would be a good time to read through it.

For you others, I found it here:
http://news.povray.org/povray.advanced-users/26671/


> The promising result can be seen here:
> http://news.povray.org/povray.binaries.animations/26690/

Yes, it looks good.


> My ultimate goal was quite similar to yours: To be able to define a list
> of points and a list of patches with corners in those points. Only
> difference was that exactly four patches had to meet in a point, but
> then the patches could have 3, 4, 5 or 6 edges. I abandoned it though -
> the triangular bicubic patch was coded by Micha Riser and improved by
> me. However, Micha Riser never coded similar patches for 5 and 6 edges,
> and I didn't understand the scientific papers on which the special
> bicubic patches were based, so I couldn't do it myself.


Can you please point me to thoses papers ?


Tor Olav


Post a reply to this message

From: Rune
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 7 Jan 2004 19:51:05
Message: <3ffca979@news.povray.org>
Tor Olav Kristensen wrote:
> "Rune" <run### [at] runevisioncom> wrote:
>> That's why I was at one point so interested
>> in bicubic patches with 3, 5 and 6 edges,
>> which is another approach to solving the
>> topology problem.
>
> I recall a faint memory of such a discussion
> in p.a.u. But I didn't follow that thread
> very closely.
>
> Maybe now would be a good time to read through it.
>
> For you others, I found it here:
> http://news.povray.org/povray.advanced-users/26671/

> Can you please point me to thoses papers ?

The link to them is in the first post in the thread you just linked to.
http://zhengjj.freeyellow.com/html/publications.html
The publication "Control point surfaces over non-four-sided surfaces"
explain exactly how to implement 3, 5 and 6-sided bezier patches.

The direct link to that article is:
http://zhengjj.freeyellow.com/archive/ZhengBall97.zip

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Dec 30**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 8 Jan 2004 21:32:41
Message: <3ffe12c9$1@news.povray.org>
"Rune" <run### [at] runevisioncom> wrote in news:3ffca979@news.povray.org:

> Tor Olav Kristensen wrote:
>> "Rune" <run### [at] runevisioncom> wrote:
>>> That's why I was at one point so interested
>>> in bicubic patches with 3, 5 and 6 edges,
>>> which is another approach to solving the
>>> topology problem.
>>
>> I recall a faint memory of such a discussion
>> in p.a.u. But I didn't follow that thread
>> very closely.
>>
>> Maybe now would be a good time to read through it.
>>
>> For you others, I found it here:
>> http://news.povray.org/povray.advanced-users/26671/
> 
>> Can you please point me to thoses papers ?
> 
> The link to them is in the first post in the thread you just linked to.
> http://zhengjj.freeyellow.com/html/publications.html
> The publication "Control point surfaces over non-four-sided surfaces"
> explain exactly how to implement 3, 5 and 6-sided bezier patches.


Ooops.
- I should have glanced at your post before asking...


> The direct link to that article is:
> http://zhengjj.freeyellow.com/archive/ZhengBall97.zip

Thank you.


Toor Olav


Post a reply to this message

From: andrel
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 10 Jan 2004 19:55:40
Message: <40009EBD.4030600@hotmail.com>
This is not yet an answer to the n-sided polygon question,
but something more fundametal on bicubic patches.
I studied the math involved again over the last few days
and reached some conclusions.
1) you can stich bicubic patches seemlessly together.
  you can follow the rule of thumb on having controlpoints
  in one plane (though it is somewhat more subtle than
  that). I can even explain it, but that would
  make a very long post, with some math in it.
  If anybody is interested, he/she must point out what is
  the right way (e.g. newsgroup) to publish that.
  I withdraw hereby my former claim that you can not have
  continues normals along the entire length of the edge.
  I apologize for causing confusion. I mixed up control
  points and actual surface points when I was thinking about
  it before. The math for bicubic patches is relatively simple
  but sometimes tricky (especially when you expect the wrong
  answer :( ).
2) I (and probably others) have been fooled by the way
  POV-Ray renders these patches. For the moment I think
  that there is something wrong with the normals.

Attached are two images. Both of four patches stitched together.
The wide angle picture suggests that there are kinks (cracks, bends?)
in the surface on the left going upwards crossing the middle and
on top going from left to right. I also included a lot of markers
where the surface should be, and it is precisely there.
In the closeup view of the green line you can clearly see that
the shadows have sometimes little to do with the curvature of
the surface.

Can anybody with access to the source explain the shape of the
shadows, or point out where I am wrong?

	Andrel

Rune wrote:
> andrel wrote:
> 
>>Rune wrote:
>>
>>>There is no way to create smooth n-sided
>>>bicubic patches from 4-sided bicubic patches.
>>
>>I take that as a challenge.
> 
> 
> Sounds good to me. I'm skeptical, but if you do succeed, I'd be
> interested in the result.
> 
> Rune
> --
> 3D images and anims, include files, tutorials and more:
> rune|vision:  http://runevision.com **updated Dec 30**
> POV-Ray Ring: http://webring.povray.co.uk
> 
>


Post a reply to this message


Attachments:
Download 'testpatch.jpg' (40 KB) Download 'testpatch_close.jpg' (27 KB)

Preview of image 'testpatch.jpg'
testpatch.jpg

Preview of image 'testpatch_close.jpg'
testpatch_close.jpg


 

From: Christopher James Huff
Subject: Re: Patches for arbitrary topology shapes - 4 attachments - 2 attachments
Date: 11 Jan 2004 15:17:59
Message: <cjameshuff-4B44AD.15181211012004@netplex.aussie.org>
In article <400### [at] hotmailcom>,
 andrel <a_l### [at] hotmailcom> wrote:

> Attached are two images. Both of four patches stitched together.
> The wide angle picture suggests that there are kinks (cracks, bends?)
> in the surface on the left going upwards crossing the middle and
> on top going from left to right. I also included a lot of markers
> where the surface should be, and it is precisely there.
> In the closeup view of the green line you can clearly see that
> the shadows have sometimes little to do with the curvature of
> the surface.
> 
> Can anybody with access to the source explain the shape of the
> shadows, or point out where I am wrong?

I'm not entirely sure what you're talking about...I see some things that 
could be rendering or JPEG artifacts, but they aren't in the closeup. 
There are rather strong vertical and horizontal lines in the shading, 
one of them vertically splitting the closeup, but it looks like you used 
a noise function to displace the surface, and the Perlin noise used in 
POV produces such artifacts.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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