POV-Ray : Newsgroups : povray.binaries.images : NURBS Server Time
17 May 2024 23:02:55 EDT (-0400)
  NURBS (Message 36 to 45 of 55)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: NURBS
Date: 1 Aug 2016 06:19:53
Message: <579f2249$1@news.povray.org>
Am 01.08.2016 um 01:51 schrieb Christian Froeschlin:
> On 24.07.2016 4:13, clipka wrote:
> 
>> What's been bothering me about POV-Ray's Bezier patches is that we don't
>> have some kind of bezier mesh to support non-union CSG. Do you think you
>> can throw together a nurbs mesh primitive?
> 
> From what I remember of B-splines I think a B-spline patch
> of degree d is essentially the same thing as a mesh of bezier
> patches of degree d (with the smoothest possible transition
> where the bezier control blocks are joined).
> 
> So I'm not sure an extra mesh object is needed since you can simply
> increase the number of control points. Or maybe I misunderstood?

You misunderstood indeed. While B-splines and Bezier splines are indeed
equivalent (in the sense that whatever you can model with one you can
also model with the other), this is not true for NURBS (non-uniform
rational B-splines), as they are a more general superset of B-splines.
As such they obviously need more parameters than plain vanilla B-splines
or Bezier splines, and are also more difficult to compute.

It is therefore reasonable to presume that a dedicated Bezier patch mesh
would be more performant than a NURBS patch mesh.


Post a reply to this message

From: Le Forgeron
Subject: Re: NURBS
Date: 1 Aug 2016 11:51:30
Message: <579f7002$1@news.povray.org>
Le 01/08/2016 à 12:19, clipka a écrit :
> Am 01.08.2016 um 01:51 schrieb Christian Froeschlin:
>> On 24.07.2016 4:13, clipka wrote:
>>
>>> What's been bothering me about POV-Ray's Bezier patches is that we don't
>>> have some kind of bezier mesh to support non-union CSG. Do you think you
>>> can throw together a nurbs mesh primitive?
>>
>> From what I remember of B-splines I think a B-spline patch
>> of degree d is essentially the same thing as a mesh of bezier
>> patches of degree d (with the smoothest possible transition
>> where the bezier control blocks are joined).
>>
>> So I'm not sure an extra mesh object is needed since you can simply
>> increase the number of control points. Or maybe I misunderstood?
> 
> You misunderstood indeed. While B-splines and Bezier splines are indeed
> equivalent (in the sense that whatever you can model with one you can
> also model with the other), this is not true for NURBS (non-uniform
> rational B-splines), as they are a more general superset of B-splines.
> As such they obviously need more parameters than plain vanilla B-splines
> or Bezier splines, and are also more difficult to compute.
> 
> It is therefore reasonable to presume that a dedicated Bezier patch mesh
> would be more performant than a NURBS patch mesh.
> 

for the time being, what I called "nurbs" object is actually a
non-uniform-rational-bezier :
* the order of the rational B-spline is the number of control point (it's an implict
value), so actually that a ration Bezier.

It is non-uniform before the also implicit (hard-coded) knot vectors are not uniform
(because bezier are clamped: passing through the first and last control point)
(knot vector would be something along 0{order), 1/n, 2/n, ..., n-1/n, 1{order} , not
something uniform as 0, 1, 2, ... m-1, m )
It is rational because there is a weight on control points.

Sorry for the false joy, maybe I should rename it to "nurbz" (Non Uniform Rational
BeZier) and try to provide a real nurbs.
But for the time being, all I could provide easily for nurbs would be a function to
compute the vertex for any u,v value. Even that would apply to only the clamped on
each side of nurbs. (and "easily" is not really the right term)
(nurbs can be clamped, opened or closed; and while "closed" on a direction apply to
both ends, the alternative clamped or opened could be different for each extremity (or
they can be the same).
I cannot so far even compute the normal at a u,v value for a nurbs.
And having a solver for ray intersection seems even more difficult.


Post a reply to this message

From: LanuHum
Subject: Re: NURBS
Date: 1 Aug 2016 16:25:01
Message: <web.579fafe66d1ce2047a3e03fe0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> I cannot so far even compute the normal at a u,v value for a nurbs.
> And having a solver for ray intersection seems even more difficult.


Sorry, I do not quite understand your conversations


Post a reply to this message


Attachments:
Download 'splinemesh.java.txt' (51 KB)

From: Le Forgeron
Subject: Re: NURBS
Date: 1 Aug 2016 17:15:56
Message: <579fbc0c$1@news.povray.org>
Le 01/08/2016 à 22:24, LanuHum a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> I cannot so far even compute the normal at a u,v value for a nurbs.
>> And having a solver for ray intersection seems even more difficult.
> 
> 
> Sorry, I do not quite understand your conversations
> 

Thanks for that code, but the computed normal is an approximation, not the real value.

It's like computing the derivative of a polynomial expression by sampling values
around the point of interest, instead of actually performing the derivation of the
equation: you get an approximated value, but no formula.


Post a reply to this message

From: Le Forgeron
Subject: Re: NURBS
Date: 1 Aug 2016 17:24:59
Message: <579fbe2b$1@news.povray.org>
Le 01/08/2016 à 11:08, Mr a écrit :
> At one point, Blender NURBS were implemented from an external open source
> library : libNurbana
> https://sourceforge.net/projects/nurbana/?source=directory
> Don't know if it's still the case.

thanks for the link, I will have a look later.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: NURBS
Date: 1 Aug 2016 19:17:38
Message: <579fd892@news.povray.org>
On 01.08.2016 17:51, Le_Forgeron wrote:

> for the time being, what I called "nurbs" object is actually a
non-uniform-rational-bezier :
> * the order of the rational B-spline is the number of control point (it's an implict
value), so actually that a ration Bezier.

Thanks for the clarification that makes sense.


Post a reply to this message

From: Mr
Subject: Re: NURBS
Date: 3 Aug 2016 05:00:01
Message: <web.57a1b2656d1ce20416086ed00@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 01/08/2016 à 11:08, Mr a écrit :
> > At one point, Blender NURBS were implemented from an external open source
> > library : libNurbana
> > https://sourceforge.net/projects/nurbana/?source=directory
> > Don't know if it's still the case.
>
> thanks for the link, I will have a look later.

A blender dev told me it's no longer the case, the Blender NURBS code is now
specific. but both code sources are probably good references.


Post a reply to this message

From: LanuHum
Subject: Re: NURBS
Date: 3 Aug 2016 15:45:00
Message: <web.57a247cf6d1ce2047a3e03fe0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> Thanks for that code, but the computed normal is an approximation, not the real
value.
>
> It's like computing the derivative of a polynomial expression by sampling values
around the point of interest, instea
d of actually performing the derivation of the equation: you get an approximated
value, but no formula.

polynom bernstein no?


Post a reply to this message


Attachments:
Download 'beziermesh.java.txt' (10 KB)

From: Le Forgeron
Subject: Re: NURBS
Date: 15 Aug 2016 14:10:53
Message: <57b205ad@news.povray.org>
Le 30/07/2016 à 13:13, LanuHum a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> I would need a few more round tuits and my stock is low.
> 
> :))))))
> And who is now easy to live?
> 
> 
> 

A bit of progress.

The number on the image is the order (aka degree+1) of the curve used in the Nurbs.

I hope you are ready to handle the knot vectors, because I gave up the
user-friendliness of opened/clamped/closed

nu7 is similar to the rational bezier that was previously available. (because with 7
control points, at order 7, the nurbs (with the knot vectors that were provided) is a
single rational bezier)

nu3 is more similar to your provided picture, or it could be nu4.



Still to do: implement the computation of normal (I found a nice formula, but I lack
the time to code it), not used so far.

Also attached is the SDL scene with what is the equivalent of Jar-Jar in front of the
Chamber:
I do not know yet who is Palpatine, but there is a big step towards the dark side of
the Force.

Because the nurbs is transformed into a mesh (in the SDL so far).


Post a reply to this message


Attachments:
Download 'nu7.png' (40 KB) Download 'nu6.png' (43 KB) Download 'nu5.png' (45 KB) Download 'nu4.png' (47 KB) Download 'nu3.png' (56 KB) Download 'nu2.png' (79 KB) Download 'nurbsmesh.inc.txt' (2 KB) Download 'nu.pov.txt' (4 KB)

Preview of image 'nu7.png'
nu7.png

Preview of image 'nu6.png'
nu6.png

Preview of image 'nu5.png'
nu5.png

Preview of image 'nu4.png'
nu4.png

Preview of image 'nu3.png'
nu3.png

Preview of image 'nu2.png'
nu2.png

From: LanuHum
Subject: Re: NURBS
Date: 15 Aug 2016 15:25:00
Message: <web.57b215d86d1ce2047a3e03fe0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

>
> Also attached is the SDL scene with what is the equivalent of Jar-Jar in front of
the Chamber:
> I do not know yet who is Palpatine, but there is a big step towards the dark side of
the Force.
>

Deep Purple:
Child in time
"Sweet child in time
You'll see the line
The line that's drawn between
Good and bad

See the blind man
Shooting at the world
Bullets flying
Ohh taking toll

If you've been bad
Oh Lord I bet you have
And you've not been hit
Oh by flying lead

You'd better close your eyes
Ooohhhh bow your head
Wait for the ricochet"


> Because the nurbs is transformed into a mesh (in the SDL so far).

In the universe there are objects with sharp corners. I'm glad you saw them.

:)))))))))


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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