Modified to include the approach detailed in the posts immediately above. Thanks Sniped!
-- for each point, draw all its lines
for i = 0,numberofpoints do
-- we need to calculate how many lines this point is part of
linenumber = -1
for numberoflinescheck = 0,100 do
if lines[i][linenumber] ~= nil then
linenumber = linenumber + 1
else
break
end
end
-- we now know this point is connected to "linenumber" other points by lines
for j = 0,linenumber do
-- Only draw the line if the opposing vertex's ID is greater than this vertex's ID
if lines[i][j] > i then
-- now we take each of the other points...
destinationpoint = lines[i][j]
-- and retrieve the coordinates of that point
destX = pointX[destinationpoint]
destY = pointY[destinationpoint]
-- then we draw the line from the current point to the stored point.
DrawLine(pointX[i], pointY[i], destX, destY, 1,1,1,1,1,1,1,1,10)
end
end
end