javascript grid. need to generate lines and hexs