Connecting Lines to Ovals

Hey -- I am fairly new to Psych toolbox. I am try to connect ovals
with lines using the screen function so far I have:

bits = 5;

% Turn off warnings
warning('off','all');

% Open window
[window,windowRect] = screen(0,'OpenWindow');

% Fill background
bgCol = [25 25 50];
screen(window,'FillRect',bgCol,windowRect);

% Dot rect
dotRectSize = 40;
minDistance = 70;
dotRect = [0 0 dotRectSize dotRectSize];

% Number of dots
nDots = bits;

% Dot random positions
dotPos = rand(nDots,2) .* expand([windowRect(3)-minDistance
windowRect(4)-minDistance],1,nDots) + expand([minDistance/2
minDistance/2],1,nDots);

% Draw dots
for iDots = 1:nDots
currDotRect = centerRectOnPoint(dotRect,dotPos(iDots,1),dotPos
(iDots,2));
currDotCol = rand(1,3)*200+55; % pick a random color
screen(window,'DrawOval',currDotCol,currDotRect);
end

% Close window when key pressed
getChar;
screen('closeall');