G0 ; G1 ; G2 ???
All  1  2-14

Previous
Next
 From:  Michael Gibson
290.2 In reply to 290.1 
Hi Bernard, I will try to break it down here.

The "G" in those terms refers to a math concept called "Geometric Continuity", which is a way of describing how two smooth curves meet up with one another.

G0 refers to "position continuity" which is a fancy way of saying whether two curves touch each other. Here is an example - the curves on the left are not G0 with each other because they do not touch. The 2 curves on the right have G0 continuity.





Another property of a curve is the tangent of a curve at any point. G1 means "tangent continuity" - that is that the 2 curves share the same tangent direction at their ends (in addition to being G0). The left curves here are only G0, the right curves have G1 continuity:

Ok, so that's all pretty straightforward up to that point. The next bit is a little bit less familiar. G0 means touching and G1 means shared tangent. So G1 means that the curves are smooth with regard to each other, right? Well, yes they are smooth but only to a certain amount. There are different qualities of a curve beyond just the tangent, there is also a quality called "curvature". Each point of a curve not only has a tangent direction, it also has a curvature value which is what radius of circle the curve resembles at that one point. So for instance when the curve is going around a tight bend, it resembles a small circle at that point. When a curve is broader and more shallow, it resembles a much larger radius circle at those points, all the way to having infinite curvature for a line segment.

When 2 curves share the same curvature at a point, then that is G2 continuity (which includes G1 and G0 continuity as well).

Here is kind of the classic example of G1 but not G2 continuity:

That is a circular arc on the left and a line on the right. They share the same tangent so they are G1. But the curvature is abruptly changed between them - the arc has a curvature of the circle that it is a part of, and the line has infinite curvature. This abrupt change has some consequences, most notably reflections and specular highlights will not cross in a smooth manner over this seam, you can see this in the real world on filleted parts, where the specular highlights will sort of bunch up near the edge of a fillet. When curvature is continuous between 2 pieces, then reflections and specular highlights will continue unbroken across those seams.

I have tried to minimize the use of these terms in MoI, but it is a bit difficult not to talk about them in blending.

The definition of G0, G1, G2, for surfaces is analagous to how it works for curves.

Please let me know if you would like additional information about any part of this.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jbshorty
290.3 In reply to 290.1 
it's pretty simple (parts of this were "borrowed" from Rhino glossary)

G0 = ends touch, but share no tangency
G1 = ends are tangent (imagine a ball sitting on the floor, the tangent point is where they touch)
G2 = Curvature continuous
G3 = Curvature continuous with a constant rate of change
G4 = Curvature continuous and constant rate of change of the rate of change

jonah
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
290.4 In reply to 290.2 
One other thing I forgot to mention is that the traditional-style 2D Bezier illustration (like Adobe Illustrator, Corel Draw, etc..) makes a string of Bezier curves that are only G1 with each other, not G2.

This is one reason why MoI doesn't use that type of "Bezier handle" approach for drawing - you actually don't get proper smooth curves with that method. For 2D outlines this is not really so terrible (although with a discerning eye you can see the discontinuities often times even there), but once you start building 3D surfaces and trying to render them with different surface qualities, it gets more noticeable.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Schbeurd
290.5 

Hi Michael and Jonah,

Thanks for the info. It's quite clear now (apart the terms "rate of change" in the explanation - from Rhino - for G3 and G4 which remain "obscure").
The comments on Bezier curves here and in another thread are very useful too.

Now, just for a better understanding of NURBS in general...
Very often I see mention of a degree for NURBS. Could you explain what that is ? Is there a relation between the "G value" of a curve and its degree or is this totally different stuff ?
No need for a deep technical explanation there but I think understanding what's "behing the engine" always permits a better understanding of the software and generally speaking why sometimes the results are not exactly what the user expected.
Thx

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  tyglik
290.6 In reply to 290.5 
Hi Bernard,

I have been browsing a integrityware and npowersoftware websites for one hours. There is an astonishing gallery and video tutorial section about NURBS modeling. Considering that it might be a MoI's future, because the geometric kernel is the same.... whew...
The tutorial can be looked through this and this. One of them is about G1,G2,G3 continuity. Don't remember to switch on your speakers!

Petr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
290.7 In reply to 290.5 
> Thanks for the info. It's quite clear now (apart the terms "rate of change"
> in the explanation - from Rhino - for G3 and G4 which remain "obscure").

G3 and G4 do become increasingly more difficult, but I will try to tackle these here. Basically, when you see "rate of change", think of the tangent on a graph of something.

One common way to examine the curvature of a curve is by a "curvature graph". This is done by having a line stick out from the curve that shows the radius of curvature. Actually normally it shows the reciprocal (1/x) of the radius of curvature since it is nice to see magnified values in areas of tight curvature (where the radius actually is becoming smaller).

Here is an example:

Check out the indicated area - the curvature of each piece is equal there - there are actually two lines being displayed there, one for each side but it looks like one line because they have equal values. So the curve has a bend of the same radius at that point. That means it is G2.

But look at the curve formed by the outer points of those curvature hairs - if you imagine another curve going through those spots, it looks like it has a sharp kink in it right at that point. This is what determines G3 or not (which it is not in this case) - a G3 curve will have a curvature graph that is tangent continuous throughout with no kinks like that. G4 is a lot more difficult to show because typically there are not tools to display the additional calculated properties of that outside "curvature curve", but basically each "rate of change" means having a kink or lack of kinks in some additionally calculated curve.

G1 and G2 have some fairly distinct visual properties associated with them. However, by the time you get to G3 there is much, much less of a visually perceptive difference to that. Then G4 is extremely hard to detect. Basically G3 and G4 are used only by people who have an extreme obsession with the formation of reflection lines, most notably reflected lights off of a car body.

The other thing that is quite deceptive about these labels is that just because you have a G4 curve or surface does not in itself guarantee that you have a good quality overall curve or surface. For example you can have a G4 curve that has a bunch of little wiggles in it - G4 doesn't mean no wiggles in a curve, it means that two pieces are equal in "form" (tangent/curvature/etc) just at their juncture point.

These labels also don't measure how evenly curvature is distributed throughout a curve - in addition to wiggles, having curvature sort of "bunched up" in one area and then go through a rapid shift can be bad for quality, which the "G" measurement in itself won't tell you.


I'll handle the "degree" in an additional post, it is quite a bit by itself.


> but I think understanding what's "behing the engine" always permits a
> better understanding of the software and generally speaking why
> sometimes the results are not exactly what the user expected.

Certainly there are situations where it can help. But also I have been trying pretty hard to make it possible to run MoI successfully without having to know all of these specific technical details.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
290.8 In reply to 290.5 
> Very often I see mention of a degree for NURBS. Could you explain what that is ?

This one is a bit more difficult to explain.

Basically, the math behind NURBS curves uses a type of polynomial equation to blend between control points.

The way curves work, a point on the curve is calculated by blending together the values of a set of control points.



So for example the curve above is what is called a degree 2 or "quadratic" bezier curve.

Every point on this curve is calculated by a blending equation that takes in all 3 points as part of the equation and produces a point on the curve. But the blending is continuously shifting as you slide along the curve - at the very beginning of the curve the second and third points are contributing 0 (this is why the curve touches the first point), but as you move towards the middle of the curve, the blending is more of an average of all 3 points, then shifting to finally only the 3rd point at the end.


Anyway, I mention this blending-together of points because the degree of a curve has to do with how many points are used to calculate one section of the curve.

A degree 1 curve (linear) blends together 2 points.

A degree 2 curve (quadratic) blends together 3 points.

A degree 3 curve (cubic) blends together 4 points.

etc...

That's how bezier equations work. NURBS are similar, except NURBS provides a way to have a curve with more than just degree+1 points in it. Your curve is still made up of different sections, but each shares an overlapping set of points with each other. This sharing provides smoothness between each section.

Here is a cubic (degree 3) NURBS curve with 6 control points. This makes a curve that actually has 3 internal segments to it - every 4 points defines a segment which I have illustrated here:



So a higher degree means that more points are used to make a single polynomial segment of the curve.


> Is there a relation between the "G value" of a curve and its degree or is this
> totally different stuff ?

There is a relation because the degree determines how many internal segments the curve will have, and there is a G value where segments meet (just as there is where 2 separate curves meet). Also the degree of the curve can limit the maximum G value - for instance the common cubic curve will only have inherently G2 smoothness, but if you go to a higher degree curve it means that there are a larger number of points shared in common between different sections and this means that there is a higher amount of built-in continuity between the segments (the segments are often referred to as "spans" of a curve).

There are some other effects of high degree - the greater averaging makes a kind of slightly more melted effect. By which I mean that a higher degree curve kind of gradually melts a bit farther and farther away from its control points as you go to higher and higher degree.

Some specialized applications want to reduce the number of internal spans to a curve, which is one effect of increasing the degree.

I have thought a little bit about maybe changing the curve tool to draw curves of degree 5 instead of degree 3 as it currently does - the slightly-more-melty effect of degree 5 is kind of nice.

It's not too practical to go too high in degree since a lot of processes go through loops of work depending on the degree, so there is also an increased calculation time issue with very high degree - that's why everything doesn't just go up to degree 100 or something like that.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Schbeurd
290.9 
@ Michael : Thanks for the explanations. Limpid as usual and very interesting !

@ Petr : There seems to be a lot of informations there. Thanks for posting the links.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dej (DEJULE)
290.10 
Is it important to build surfaces with single span curves?..because it can introduce knots or added isoparms? Is this important when creating surface that are attached together to maintain good curvature?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dej (DEJULE)
290.11 In reply to 290.10 
What was confusing to me using Alias..was if I ensure all my curves g1...why do I have to set, through another option box that the surfaces are g1 also. Shouldn't this be automatic or simplified? Maybe Moi could be more intuitive that way.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
290.12 In reply to 290.10 
Hi dejule,

> Is it important to build surfaces with single span curves?

Not necessarily... It totally depends on what your goal is and what you are trying to do.

Many kinds of primitive surfaces for example a sphere or a cylinder are made up of surfaces made up of multiple spans.

Just having multiple spans does not in itself automatically mean there is a problem.


There really isn't a good answer to your question without putting it in some more context - what are you intending to do with these surfaces, what is their final goal, are they going to be turned into polygons or sliced into sections for manufacturing that will render any worries about super high degrees of continuity to be meaningless?

Is there some particular problem with multiple span curves that you are trying to avoid?


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
290.13 In reply to 290.11 
Hi dejule,

> What was confusing to me using Alias..was if I ensure
> all my curves g1...why do I have to set, through another
> option box that the surfaces are g1 also.

Are you talking about a tool in Alias or a tool in MoI here?

If so, then which tool?

It is hard to know what you are mentioning here without some more context.


Due to the nature of how NURBS surfaces work, it is not unusual though for there to be different qualities to a surface in the U and V directions.

For example a surface can be of degree 1 in U and degree 3 in V.

Just because you have a certain structure in one direction does not necessarily mean that the other direction which is formed during construction must have the exact same kind of structure to it. That's why there can be some options like that in some construction tools - they are basically referring to the new direction that is being created, not to the direction of the existing curves.


> Shouldn't this be automatic or simplified? Maybe Moi
> could be more intuitive that way.

In which tool?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  ArianDesign (ARIANSHAMIL)
290.14 
Michael thanks for this infos...i'm new to nurbs world and Moi is my first nurbs based program....so...i'm learning them with Moi and with all the notions that i'm learning here on the forum :)
;)
--------

Arian DESIGN

--------

www.arianshamil.com
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-14