Hi all !
I’m a student in computer science, and some days ago, my teacher tells me that I’ve to learn about fragmentation. But I don’t know how to use it. there are some pages in the red book about it, but it’s not explained really how to use it.
Frangmentation is well used for making union, intersection and substraction of objects.
Can anyone help me ?
Adrien D.

Fragmentation ? In which context ?

I do not know any “fragmentation” in OpenGL… what you seem to describe with unions/intersections/substractions is called CSG operations. I think these can be emulated with the stencil buffer in OpenGL. Is that what you want ?


do you mean “tesselation” ?

I’m sorry but i don’t know exactly what it is… My teacher just explained me that it allows you to make an object which is the result of a substraction or union or intersection of two objects, like you do in mathematics.
Can you tell me more ???

Google for “constructive solid geometry” or “boolean operations”.

Here are two good links:


That’s Constructive Solid Geometry (CSG) which Ysaneya mentioned. Look it up in Google.
I don’t know what fragmentation has got to do with it. The only mention of it in the Red Book that I can find refers to memory fragmentation, which isn’t anything to do with what you describe.

I think it’s what he was looking for. Thank you very much ! It’s very nice !
C ya soon !

Hi ! It’s me again !
In fact, what you’ve explained me was exactly what I was looking for.
But now, I need a ready-to-use sample of this csg method.
Is anybody knows where can I find such a sample ?

Originally posted by duran065:

Is anybody knows where can I find such a sample ?


Thx, but it’s not exactly what I’m looking for…
In the red book, chapter 11, it’s written that :
“Given two or more polygons of the preceding form, CSG operations can be implemented as follows.
UNION - To calculate the union of several contours, draw all input contours as a single polygon. The winding number of each resulting region is the number of original polygons that cover it. The union can be extracted by using the GLU_TESS_WINDING_NONZERO or GLU_TESS_WINDING_POSITIVE winding rules. Note that with the nonzero winding rule, we would get the same result if all contour orientations were reversed.
INTERSECTION - This only works for two contours at a time. Draw a single polygon using two contours. Extract the result using GLU_TESS_WINDING_ABS_GEQ_TWO.
DIFFERENCE - Suppose you want to compute A diff (B union C union D). Draw a single polygon consisting of the unmodified contours from A, followed by the contours of B, C, and D, with their vertex order reversed. To extract the result, use the GLU_TESS_WINDING_POSITIVE winding rule. (If B, C, and D are the result of a GLU_TESS_BOUNDARY_ONLY operation, an alternative to reversing the vertex order is to use gluTessNormal() to reverse the sign of the supplied normal.”

Is there any example of THAT (exactly that) on the Internet ? Can you help me please ?

Thx a lot !

[This message has been edited by duran065 (edited 11-24-2003).]