RE: nurbs sphere with hole

New Message Reply Date view Thread view Subject view Author view

From: Zitao Xu (zitao++at++magic-earth.com)
Date: 03/09/2002 16:00:28


Hi Christian,

One representation of an octant of a sphere can be a bi-quadratic
rational Bezier surface, containing 9 vertexes in 3 rows;
Both U-knot vector and V-knot vector can be: [0, 0, 0, 1, 1, 1];
(the rest 7 octants of the sphere can be built by just mirroring
the vertexes only, with the same knot vector, and same corresponding
weights) :

----------------------------------------------------------
  // 1st row: degenerated points
  vertex = {0.0, 0.0, radius}; w = 1.0;
  vertex = {0.0, 0.0, radius}; w = 0.707;
  vertex = {0.0, 0.0, radius}; w = 1.0;

  // middle row
  vertex = {0.0, radius, radius}; w = 0.707;
  vertex = {radius, radius, radius}; w = 0.5;
  vertex = {radius, 0.0, radius}; w = 0.707;

  // last row
  vertex = {0.0, radius, 0.0 }; w = 1.0;
  vertex = {radius, radius, 0.0 }; w = 0.707;
  vertex = {radius, 0.0, 0.0 }; w = 1.0;
----------------------------------------------------------
This will produce an accurate sphere.
Of course there can be many other representations for a sphere.

If you use higher level renderer, like Mac QuickDraw 3D, SGI Open Inventor,
make sure if you need to use homogenous coordinate or not, for vertexes
[i.e. use (x * w, y * w, z * w, w) versus (x, y, z, w)]

-zitao

-----Original Message-----
From: Christian Skluzacek [mailto:csklu_fs++at++yahoo.com]
Sent: Friday, March 08, 2002 11:26 AM
To: info-performer++at++sgi.com
Subject: nurbs sphere with hole

Hi Performers,

I have a few questions related to a geometry problem I
am trying to solve. I need to create a sphere with an
arbitrarily shaped hole cut out of it. The hole is
determined at run/load time and doesn't change
afterwards. One way I thought of doing this is the
following:

1. Create a NURBS sphere (with GLU)
2. trim out hole using gluBegin/EndTrim
3. Somehow get the generated triangles that OpenGL
uses
4. Build pfGeoSet from the obtained triangles.

Question 1: Does anyone know the knot sequence and
control points necessary for a sphere? I've only found
the sequence for a circle on the net. Not being a
NURBS expert myself I found the knot sequence for an
8th of a sphere in "Nurbs: From Projective Geometry to
Practical Use" by Farin but it is triangular in shape
and from what I understand from gluNurbs surfaces you
must specify two dimensions (u,v) so I am not sure how
the values that Farin describes shoould be mapped to
OpenGL. Alternatively, is it possible to convert a
GLUQuadric (i.e. from gluSphere) to a GLUnurbs object?

As an aside, will Performer ever support high level
data structures for Nurbs in it's pfGeoSet for
example? Will NURBS ever be supported in hardware (or
is it now supported?) so that they can be used in
real-time applications? This would be great for
something like continuous LODs (I'm sure these aren't
original thoughts).

Question 2: Once I do have a NURBS surface, how do I
get the triangles from it? I thought maybe something
like gluTess but (I think) that is only for polygons.
I know Inventor has a SoNurbsSurface node, how is this
converted (if converted) in the performer loader? Come
to think of it, maybe I could just create a
SoNurbsSurface object in the Performer program and
somehow render that directly by making a custom pfNode
or something?

Thanks for any help.

Chris

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
-----------------------------------------------------------------------
   List Archives, Info, FAQ: http://www.sgi.com/software/performer/
   Open Development Project: http://oss.sgi.com/projects/performer/
                Submissions: info-performer++at++sgi.com
            Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Mar 09 2002 - 16:02:40 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.