devNotes 4-26-16 fibonacci voronoi position list nb direction ordering

Using spherical trigonometry and the golden ratio to find the angles of the major node connectordgfhdgfhgfdhgnacci_1

nacci_2

dfghdfghgf

jojofjofjofib

    public void ArgosVoronoi(bool bDoNeighbors)
    {
        Vector3 vForce;
        Vector3 vAccumForce;
        float dist_sqd;
        float fMag = 0;

        float delta = 0.004f;

        foreach (GO_Tracker gActedUpon in lstHex_GO)
        {
            vAccumForce = Vector3.zero;
            foreach (GO_Tracker gPushing in lstHex_GO)
            {
                if (gActedUpon != gPushing)
                {
                    vForce = gActedUpon.aVNode.vPos - gPushing.aVNode.vPos;
                    dist_sqd = vForce.x * vForce.x + vForce.y * vForce.y + vForce.z * vForce.z;
                    vAccumForce += vForce.normalized / dist_sqd;

                    if (bDoNeighbors)
                    {
                        gActedUpon.aVNode.insNeighbor_One_Shot(dist_sqd, gPushing.aVNode);
                    }
                }
            }

            fMag = vAccumForce.magnitude;
            vAccumForce = vAccumForce.normalized;

            gActedUpon.aVNode.vForce = 3000f * vAccumForce;
            gActedUpon.aVNode.vPos += gActedUpon.aVNode.vForce * (delta * delta);
            gActedUpon.aVNode.vPos = gActedUpon.aVNode.vPos.normalized;
            gActedUpon.aVNode.vPos *= m_fRadius;
        }
    }

Fibinacci_Voronoi – 3:50am 4-26-16

Fib_Voronoi_3.50am

 

FTN_36.mp3

me100im3