This is a demo of the Hough transform in JavaScript.
If you write shapes on the left canvas you can see what it looks like in a Hough space on the right. Try writing parallel lines - Theta should be the same.
When you have sufficient points, the best fit Hough line will be indicated with a red dot in Hough space and a red line in the original drawing.