## Surface Normal for Point on Bezier Surface?

### Surface Normal for Point on Bezier Surface?

Could someone please explain how to calculate the surface normal for any
arbitrary point on a Bezier Surface?

I'm trying to understand Bicubic Bezier Surfaces as described in the
Gamasutra article: http://www.gamasutra.com/features/19991027/deloura_01.htm
.

Thanks,
Brian

### Surface Normal for Point on Bezier Surface?

> Could someone please explain how to calculate the surface normal for any
> arbitrary point on a Bezier Surface?

You could just derive the Basis functions and use the new Basis
functions to interpolate between the control points. The Vector you get
is the normal. (Or am I wrong here? I remember having it done that way)

Quote:> I'm trying to understand Bicubic Bezier Surfaces as described in the
> Gamasutra article: http://www.gamasutra.com/features/19991027/deloura_01.htm

Timm Dapper

--
>\|/<

----------------o00-(_)-00o------------------
Timm Dapper
Gabelsberger Str. 26
47198 Duisburg
Germany
Tel: +49-2066-54357
---------------------------------------------
www:                http://www.mirage-3d.de

.ooO     0oo.
(   )   (   )
--------------- \ ( --- ) / -----------------
\_)   (_/

### Surface Normal for Point on Bezier Surface?

Hi,

If you know that you'll be using Bicubic patches (and you have time to spare
in your renderer) then you can calculate the normal by taking the cross
product of the two partial derivatives df/du and df/dv where f(u,v) is the
patch you're rendering.

Otherwise you can approximate it by calculating two vectors parallel to the
surface at that point by taking differences between nearby points, then take
the cross product of those two to give the normal.

HTH

Andrew Vidler

Quote:> Could someone please explain how to calculate the surface normal for any
> arbitrary point on a Bezier Surface?

> I'm trying to understand Bicubic Bezier Surfaces as described in the
> Gamasutra article:

http://www.gamasutra.com/features/19991027/deloura_01.htm
Quote:> .

> Thanks,
> Brian

### Surface Normal for Point on Bezier Surface?

Quote:

> Could someone please explain how to calculate the surface normal for any
> arbitrary point on a Bezier Surface?

> I'm trying to understand Bicubic Bezier Surfaces as described in the
> Gamasutra article: http://www.gamasutra.com/features/19991027/deloura_01.htm
> .

I have not read the gamasutra article, but ...

This is very simple.  I will first discuss 2D:  a point on a bezier
curve is found as

v = B(t),   t in 0,1

B(t) = [ t^3 t^2 t 1 ] * Bb * G,    Bb : Bezier basis matrix.
Gg : Geometry matrix

The first derivative (tangent slope) at B(t) is then:

B'(t) = [ 3t^2 2t 1 0 ] *Bb

Now, a point on a bezier surface is only slightly more difficult:

v = B(s,t),   s and t in 0,1

B(s,t) = [ t^3 t^2 t^1 1 ] * Bb * G * [ s^3 s^2 s^1 1 ](transpose)

[Here G is a 3D matrix, ie. one for each component of v.]

Now apply the first derivative of the t and s vectors and voila you have
the slope of the tangents in the s and t direction.

The cross product of the tangent vectors is the normal.

m

### Surface Normal for Point on Bezier Surface?

> Hi,

> If you know that you'll be using Bicubic patches (and you have time to spare
> in your renderer) then you can calculate the normal by taking the cross
> product of the two partial derivatives df/du and df/dv where f(u,v) is the
> patch you're rendering.

> Otherwise you can approximate it by calculating two vectors parallel to the
> surface at that point by taking differences between nearby points, then take
> the cross product of those two to give the normal.

Well, one good, stable technique for evaluating Beziers is by
subdivision. If you subdivide the patch into four at the desired
point, the control points at that point will define the tangent plane,
and thus the normal, exactly.

--
-Stephen H. Westin
Any information or opinions in this message are mine: they do not
represent the position of Cornell University or any of its sponsors.

I have a surface regularly spaced in X,Y, with Z defined at each vertex.
I would like to determine the Bezier control points needed to draw the
surface
with smoothly changing curvature (C^3 continuity) from the XYZ data.

I've looked at Foley/vanDam,etal, but their representation changing method
seems
to apply only to curves, not surfaces.

Help!