My primary question is this:
Given a rational bspline surface, how do we express its boundaries in curv2/vp
notation?
Background:
I'm reading through the documentation of the .obj file format. I'm a little confused by the documentation for the curves that comprise trim loops around bspline surfaces. For a standard, four-sided patch, the boundary is specified by four curves of the following format:
curv2 vp1 vp2 vp3. . .
Free-form geometry statement.
Specifies a 2D curve on a surface and its control points. A 2D
curve is used as an outer or inner trimming curve, as a special
curve, or for connectivity.
vp is the parameter vertex reference number for the control point.
You can specify multiple control points. A minimum of two control
points is required for a 2D curve.
The control points are parameter vertices because the curve must
lie in the parameter space of some surface. For a non-rational
curve, the control vertices can be 2D. For a rational curve, the
control vertices can be 2D or 3D. The third coordinate (weight)
defaults to 1.0 if omitted.
The "parameter vertex reference number" refers to the "control points" specified in the (u,v,w) parameter space:
vp u v w
Free-form geometry statement.
Specifies a point in the parameter space of a curve or surface.
The usage determines how many coordinates are required. Special
points for curves require a 1D control point (u only) in the
parameter space of the curve. Special points for surfaces require a
2D point (u and v) in the parameter space of the surface. Control
points for non-rational trimming curves require u and v
coordinates. Control points for rational trimming curves require u,
v, and w (weight) coordinates.
u is the point in the parameter space of a curve or the first
coordinate in the parameter space of a surface.
v is the second coordinate in the parameter space of a surface.
w is the weight required for rational trimming curves. If you do
not specify a value for w, it defaults to 1.0.
NOTE: For additional information on parameter vertices, see the
curv2 and sp statements
These definitions yield two confusing issues for me:
- Each
vp
requires an additional coordinate for rational bspline trim curves: a weight, w. - The
vp
"control points" are specified in parameter space (u,v,w), but the control points for the surface are in physical space (x,y,z,w).
which raise the following, more specific questions.
Specific Questions:
- Is the value of w in (u,v,w) simply computed using the weight function from the rational bspline surface at the point (u,v)?
- If the parameter space is just a square, then why would we ever need to represent the boundary with anything but a straight line in parameter space--regardless of whether or not the physical boundary is a polynomial function of the parameters?
- If we have an exact representation of the boundary in terms of the physical-space control points that generate the surface, how do we infer what the parameter-space control points must be to exactly reproduce the same boundary?