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.
ResourceFunction["RandomBSplineSurface"] does not use BSplineFunction directly.
ResourceFunction["RandomBSplineSurface"] has the same options as BSplineFunction and ParametricPlot3D.

Examples

Basic Examples (2) 

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 (1) 

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

Version History

  • 1.0.0 – 11 March 2019

License Information