Randomized freeform surface using bicubic mesh

The attached file demonstrates a simple way to create a surface with a randomized profile using FRED's Bicubic Mesh surface. The Bicubic Mesh surface represents Z-surface sag for X,Y positions as provided by tabular data on a rectilinear grid in X and Y. This surface type provides a simple way to generate freeform surfaces.

	Dim surf As Long
	surf = FindFullName( "Geometry.Elem 1.Surf 1" )

	Dim i As Long, j As Long, xSamp As Long, ySamp As Long, zVal As Double

	GetSampledSurfSize surf, xSamp, ySamp
	For i = 0 To xSamp - 1
		For j = 0 To ySamp - 1
			zVal = Rnd()/10
			SetSampledSurfValue surf, i, j, zVal
		Next j
	Next i

	Update

FRED_RandomBiCubicMesh.frd

Still need help? Contact Us Contact Us