How to make vertical lines on boundary crv?

I want to draw a line that starts with a point! I want the line to go out vertically on each side as in the picture! Which algorithm should I use?

점으로 시작하는 선을 그리고 싶어요! 그림처럼 양쪽에 한 변에 수직된
선을 긋고 싶어요! 어떤 알고리즘을 사용해야 하나요?

Thank you so much!!