This example program creates a multi-patch surface through the point coordinates contained in the text file "COORDS". The program prompts the user to enter the desired number of rows for the surface. The program then places the same number of points into each row and creates the surface through them.
$$
$$ Declarations
$$
NUMBER/ROW(50),NUM(3)
ENTITY/P(200), BS
$$
$$
$$ Geometry Definition
$$
L10:
PARAM/'ENTER # of rows','# OF ROWS',R,RESP
JUMP/L10:,TERM:,,RESP
$$
DOPEN
FETCH/TXT,1,'COORDS'
RESET/1
L20:
READ/1,IFEND,END:,NUM
K=K+1
P(K)=POINT/NUM
JUMP/L20:
END:
A=K/R
L30:
J=J+1
ROW(J)=A
IF/J==R,JUMP/CONT:
JUMP/L30:
CONT:
$$
$$ B-Surface Definition
$$
BS=BSURF/P(1..K),ROW(1..R)
$$
TERM:HALT
This is the B-surface created through 20 points defined in a text file. You specify four rows, and the system places five points in each row.