Wolfram Research

Function Repository Resource:

RandomBSplineSurface

Source Notebook

Generate a random surface with B-splines

Contributed by: Enrique Zeleny

ResourceFunction["RandomBSplineSurface"][m,n]

generate a B-spline surface from a random m×n array.

Details and Options

B-spline surfaces are very popular in computer modeling. Start with a random array of size m×n to construct the spline surface and choose to leave it open, half close it or fully close it. Then adjust the other options to change the appearance of the mesh and the surface.
The program does not use BSplineFunction directly.
RandomBSplineSurface has the same options as BSplineFunction and ParametricPlot3D.

Examples

Basic Examples

Get a simple surface:

In[1]:=
ResourceFunction["RandomBSplineSurface"][3, 3]
Out[1]=

Generate a closed spline surface:

In[2]:=
ResourceFunction["RandomBSplineSurface"][3, 3, SplineClosed -> True]
Out[2]=

Options

Add options:

In[3]:=
ResourceFunction["RandomBSplineSurface"][5, 5, Mesh -> Automatic, MeshStyle -> {{RGBColor[1, 0, 0], Thickness[0.002`]}}, Boxed -> False, Axes -> False, Background -> Black, MaxRecursion -> 1, PlotStyle -> {Opacity[0.5`], Thickness[0.`], RGBColor[1, 1, 0]}, BoundaryStyle -> {RGBColor[1, 0, 0], Thickness[0.002`]}, SphericalRegion -> True]
Out[3]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information