Drawing lines in a pool game

hello friends, i need some help from you friends,im working with pool game in that i want to draw raycast line like below

See the example for LineRenderer.SetVertexCount which shows how to draw 20 lines.