#### Archived

This topic is now archived and is closed to further replies.

# How to draw bsplines

This topic is 5142 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, I would like to know how to draw bsplines if I am not using NURBS. Thanks!

##### Share on other sites
Look at

http://students.ou.edu/D/Eric.G.Diamond-1/

There''s an example app.

Scav.

##### Share on other sites
you can write some evaluator code to generate surface points of your bspline surface. foreach 4x4 patch of you control points iterate your s values between [0 and 1] and your t values between [0 and 1] (the step size here will determine the tesselation of your surface). Plug these values for s&t into your bspline equation (can be found in any good 3d math book) with the proper Basis Matrix. Use the 4x4 patch as ur geometry matrix. You can get the surface normals in a similar way using the first dirivitive of the bslpine equation (with respect to S and T) and cross product. You have to do more work to convert these vertices to a quad mesh (or whatever). The thing ends up being like 4 nested loop:
 for (control points in U direction)   for (control points in V direction)     for (s [0,1], inc by s-step)       for (t [0,1], inc by t-step)           {             apointofsurface = evaluate spline at s,t with Bspline Basis and patch(u,v)              apointsnormal = cross product of results of evaluation of first dirivitive (wrt s & t)          }

[edited by - _walrus on May 27, 2004 10:24:23 AM]

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 13
• 9
• 12
• 9
• ### Forum Statistics

• Total Topics
631438
• Total Posts
3000073
×