[X3D-Public] reason / benefits of homogeneous coordinates in NURBS?

Vincent Marchetti vmarchetti at ameritech.net
Mon Aug 26 20:23:17 PDT 2013


Philipp, and other X3D-Public subscribers:

In my judgement, the X3D Spec for the NURBS Component is unclear in this regard. The question is, for the case of the nodes that represent a NURBS surface in 3-D space, what is the meaning of the coordinates as specified in the controlPoint field of the X3DNurbsSurfaceGeometryNode. The standard, at least up to v 3.2, does not make it clear whether the 3 coordinates for each point specified in this field should be the real coordinates in Euclidean space, or whether they should be the "wx,wy,wz" components of the points in 4-D rational (or homogeneous) space, with the final coordinate "w" in rational  space given in the weight field.

As M. Kamburelis explains on the web page you cite (http://castle-engine.sourceforge.net/x3d_implementation_nurbs.php) many browsers and applications have resolved this ambiguity in favor of the option of having the coordinates of the controlPoint field be the "wx,wy,wz" components in rational space. In practical terms, this might be justified as more efficient because the NURBS functions in OpenGL and other libaries work directly with the rational coordinates, so having these directly stored in the X3D file saves some floating point operations when preparing X3D data for use in OpenGL function calls. In the interest of making further developments of NURBS applications interoperable, I would urge you to use the same choice in any X3D or X3DOM implementations you develop. Of course, whatever internal representations of control points you use would be your decision as a designer; just when the coordinates are written to or read from an X3D file they should be interpreted as three components in rational (homogeneous) space. Perhaps the X3D community can formalize this choice in future versions of the standard.

The X3D wiki has a page ( http://www.web3d.org/wiki/index.php/X3D_NURBS ) with some resources related to NURBS in X3D, work inspired by the CAD working groups efforts to promote NURBS implementations. One of the resources on that page is a summary of browser support for NURBS nodes ( http://www.web3d.org/wiki/images/1/17/X3D_Browser_NURBS_Evaluation.pdf ; summary was prepared in Oct 2012, and is being updated). A conclusion of that summary is that the browsers which support the NurbsPatchSurface nodes (Octaga, BS Contact, view3dscene, InstantPlayer, SwirlX3d, and Xj3D ) all do so in a consistent way, and apparently using the "homogenous coordinates" choice. There is less consistent implementation of the trimming curves and NurbsTrimmedSurface nodes.

This is a very useful discussion to have, and I appreciate your questions as a way to spur interaction from other browser developers, who perhaps can discuss how or why they chose to interpret the standard in the way they did, and to share any test or example files they use to validate their work. 

Vince Marchetti


On Aug 26, 2013, at 3:04 AM, Philipp Serfling wrote:

> Hi, 
> i´m sorry to bother you again with my problems, but if anyone know some
> resources or reasons for my problem written underneath, i would be very
> thankful.
> 
> thx 
> .philipp
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Philipp Serfling [mailto:Philipp.Serfling at t-systems-mms.com] 
> Gesendet: Mittwoch, 14. August 2013 15:09
> An: 'x3d-public at web3d.org'
> Betreff: reason / benefits of homogeneous coordinates in NURBS?
> 
> hello,
> 
> I´ve noticed that in x3d the control points of a nurbs surface are
> represented in homogeneous coordinates 
> see:
> http://castle-engine.sourceforge.net/x3d_implementation_nurbs.php#section_ho
> mogeneous_coordinates
> 
> Is there any benefit in doing it that way compared to the "normal /
> intuitive way" (also explained in the link) ?
> 
> I´m asking for two reasons:
> 
> 1. White_dune, Instant Reality & BSContact  Player are using the homogeneous
> way.
>    But Octaga Player uses the "normal" way.
> 
> 2. I´m currently implementing NURBS Curves and PatchSurfaces in X3DOM and
> i´m not sure if i should implement the homogeneous
>  or the "normal way". Currently i´m developing both, but the homogeneous
> way is unintuitive and more complex and i really don´t see any advance.
> 
> thx for your help
> .philipp
> 
> 
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

Vincent Marchetti
vmarchetti at ameritech.net






More information about the X3D-Public mailing list