geometry concepts in ruby