Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local p1 = vector.new(tArgs[1],tArgs[2],tArgs[3])
- local p2 = vector.new(tArgs[4],tArgs[5],tArgs[6])
- local p3 = vector.new(tArgs[7],tArgs[8],tArgs[9])
- local function interpolate(p1x,p1y,p2x,p2y,x)
- return p1y + ( ((p2y-p1y)/(p2x-p1x)) * (x-p1x) )
- end
- term.clear()
- for y = p2.y, p1.y do
- for x = interpolate(p1.x,p1.y,p2.x,p2.y,y), interpolate(p1.x,p1.y,p3.x,p3.y,y) do
- term.setCursorPos(x,y)
- term.write("#")
- end
- end
Add Comment
Please, Sign In to add comment