Well ordering is basically a "nice-to-have" but not a necessity so
long as it is enforced that all edge points are distinct per region.
Meaning there can not be two edges which share a point for
first-point.
The more I think about this though the more I realize that perhaps the
notion of edge is actually an un-necessary/clumbsy abstraction e.g.
there is no point recording the edge in datomic but rather it should
just contain an ordered set of points to define the shape of the
region. Otherwise there will always be duplicated data for no reason.
This would require that a region is initially defined with a minimum
of 3 points, some sort of triangle. After that I am thinking there
would be a method for adding a point after an existing one (thus
subdividing an edge). The potential issue I can see with this approach
though is that each time a point is added it would require updating
the order attribute of all subsequent points - unless the order
attribute is a float and thus having points w/ orders (1 2 3) and you
added one between 2 and 3 you would have (1 2 2.5 3). This feels
clever and bad at the same time which is usually a good clue that its
the Wrong Thing to do. This leads me back to the notion of
implementing a linked list structure within datomic itself so that
adding a point would only require adding one point and asserting the
tail of the prior point to refer to the new point. As all entities
have ids implicitly that is not explicitly represented but that is
what vertice/region and vertice/tail refer to (an id of another
entitiy - a region and another vertice in thei cse)
So now the current fractal realms schema is:
region
name string
vertice (btw going to adopt this from edgar as it better )
region ref
x float
y float
tail ref
actor
name string
x float
y float
This has been rad having people to bounce ideas off! Hopefully have
this working and committed later tonight -shaun
> --
>
>