Honeycombs: Difference between revisions

Content added Content deleted
(J)
Line 1,872:
uof=: %:2.3 3
 
shape=: 4 5
scale=: 50
scorn=: scale*ucorn
centers=: scale*(((%:0 0.75)*/~2|{:"1)+uof*"1 1:+|."1)shape#:i.shape
Line 1,883:
pshow;
}}{{
sel=: 0"0 grid=: shape$u:65+(*/shape)?26
txt=:''
wd m
Line 1,899:
 
hex=: {{
coord=. <shape#:y
center=. coord{centers
glbrush glrgb (-coord{sel)|.255 255 0
Line 1,912:
 
select_character=: {{
if. -. y{,sel do. NB. the selected character has been determined
txt=:txt, y{,grid
end.
Line 1,919:
 
honeycomb_hex_char=: {{
ch=. toupper {.sysdata
if. ch e. ,grid do. select_character (,grid)i.ch end.
}}
 
honeycomb_hex_mbldown=:{{
xy=. 2{.".sysdata
k=. (i.<./)dist=.,+/&.:*:"1 centers-"1 xy
if. scale > k{dist do.select_character k end.
}}