Hi im doing some research into cell signalling in fly wings, and need to represent such cells in a hexagonal grid
now each hexagon (6 sides) has 6 neighbours, and these neighbours have 6 neighbours and so on...
ive began to design a class on paper to represent a Cell Wall, thus a class Cell will constitute 6 walls (the hexagon)
now comes the difficulty im having, i was trying to link cells into a linear data structure with corresponding pointers to all neighbours, and sofar i have something similar to below on paper:
key : cell = [X]
pointer ->
This seems to be the linear style data structure for 7 cells;
[0] <-> [1] <-> [2] <-> [3] <-> [4] <-> [5] <-> [6]
[6] <-> [0]
[5] <-> [0]
[4] <-> [0]
[3] <-> [0]
[2] <-> [0]
[1] <-> [0]
[7] <-> [6]
[7] <-> [1]
(think of a spiral to visualise what i mean)
This is quite overly complex and gets rather messy with 20+ cells, i was wondering if any1 has any ideas of arranging this sort of structure in a more simple way..?
it looks as if ill be dealing with a large number of pointers if i go this way .. which is quite daunting ... the only other way is if i come up with a complex algorithm to determine possible neighbours based upon the cell id number or something
Thanks in advance.



LinkBack URL
About LinkBacks



Thaat's gotta be a headache. If you want to propagate information between cells then you'll have to write some sort of cascading function that feeds values to the affected neighbouring cells You may want to work on your basic data structure(s) and their function(s) properly before you start coding this baby. I used to do some biochemistry but 's all past me now, but if ye need some help I'll quite happily lend a hand as I'm not entirely oblivious to the field of bio-sciences.