POV-Ray : Newsgroups : povray.general : Nurbs ? : Re: Nurbs ? Server Time
7 Aug 2024 21:22:28 EDT (-0400)
  Re: Nurbs ?  
From: James Tonkin
Date: 1 Jun 2001 22:28:38
Message: <3b184f56$1@news.povray.org>
In article <3b18336b@news.povray.org>,
Rune <run### [at] mobilixnetdk> wrote:
>Ok, so nurbs are much more powerful than bicubic patches.

In fact, bicubic/bezier patch/curves are just special cases of
nurbs objects.  (Although I can't tell you offhand what the knot
vector would have to be)

>Bicubic patches always have 4 corners. Can nurbs have 3 or 5 corners?

Well, for quick and dirty results, you can space the control points in
a bicubic in such a way as to generate a triangular patch.  
Alternatively, why not just clip the patch between diagonal corners?

But in general, any of the patches are just a method to convert from 
a two-coordinate (u,v) system into a three-coordinate (x,y,z) one.

Typically, for a patch, u and v represent distances parallell to the
edges of the (non-deformed) patch, however, any two-coordinate system
could be used.  For example, it would be possible to have u,v 
correspond to angle, radius.  So your default patch shape would be a
wedge-shape.

(Hmm, on further consideration, there could be a few difficulties with
 this, as all the radius=0 points overlap.  But it should be codeable-
 around)

So, any number of corner figure can be used as the base shape, provided
you can find a nice way of representing it using two co-ordinates.  The
tricky part is finding the 'nice' way, or even what constitutes nice.

For example, one of the properties of the square bicubic patch is that
curve along the edges depends only on the control points along that edge.
This is because moving along any edge of the patch involves a change in
only one parameter.  ( You change u as you move along the top or bottom
edges, and v as you move along the sides).  I consider this a 'nice'
property, so any triangular-based u-v system should preserve this.  
Other people may disagree.

Nurbs are mathematically a bit more complicated to generate, but the
same theory applies... they're a mapping from (u,v) to (x,y,z)

>used for objects with very simple topology. I presume any number of nurbs
>can be joined up smoothly (typically 3, 4 or 5) ...?

Nope.  Not unless someone comes up with a good method of representing
n-sided figures as (u,v) paramter pairs.

>Would it be possible to implement nurbs in POV-Ray? Would it be reasonable?
>If so, what would a possible syntax look like?

Ugly.  Very ugly.  A nurb patch requires a fair chunk of data to specify it.
There's the N x M array of control points.  A weight for each point, and the
two knot vectors (each of which has N or M, plus degree, plus 1 (I think))
elements.  Oh, and understanding what the knot vector does is not pleasant.

Jamie


Post a reply to this message

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