Tetra Oriented TetraHelix -TOT

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using ProceduralToolkit;
using VRTK;
using System.IO;
using System;

public class TetraHedron_4 : MonoBehaviour
    public GameObject tetra_Prefab;

    public float radius = 2;
    public float beam_length = 2;
    private VRTK_InteractableObject interact;
    private HMD_Ctrl_Tracking hmd_Ctrl_Tracking;

    private GameObject tetra1;
    private GameObject tetra2;
    private GameObject tetra3;
    private GameObject tetra4;
    private GameObject tetra5;

    private List<GameObject> tetra_List = new List<GameObject>();

    public float rotation = 0;

    List<Vector3> beam_List = new List<Vector3>(4);

    public bool bGenNext = false;
    public bool bRemoveLast = false;

    public int next_FB_Index = 0;
    public int next_face_Axis = 0;
    public float next_axis_angle = 0;

    StreamWriter sSequence;

    public class sequ_element
        public int fb_Idx;
        public int face_axis;
        public float axis_angle;

        public void set(int idx,int fa, float aa)
            fb_Idx = idx;
            face_axis = fa;
            axis_angle = aa;

    public List<sequ_element> sequence = new List<sequ_element>();
    public int cIdx =0;

    void Start ()

        hmd_Ctrl_Tracking = HMD_Ctrl_Tracking.Instance;

        Vector3 position = new Vector3(0, 0, 0);
        Quaternion q = Quaternion.identity;//Quaternion.Euler(new Vector3(0, 1, 0));
        tetra_List.Add(Instantiate(tetra_Prefab, position, q, transform));
        sequ_element sequence_el = new sequ_element();
        sequence_el.set(12, 12, 12);


        sSequence = new StreamWriter("TOT_SEQUENCE_001.txt");

        sSequence.WriteLine("// ");
        sSequence.WriteLine("// TOT_SEQUENCE - " + DateTime.Now.ToString("yyyy_MMdd_HHmmss"));
        sSequence.WriteLine("// ");


    void Update ()
        if (bGenNext)
            Quaternion q; 

            GameObject go = Instantiate(tetra_Prefab);

            go.transform.parent = tetra_List[cIdx].transform;

            q = Quaternion.FromToRotation(Vector3.up, beam_List[next_FB_Index]);

            if (next_FB_Index == 0)
                q *= Quaternion.Euler(new Vector3(0, 180, 0)); 

            q *= Quaternion.AngleAxis(rotation, beam_List[next_face_Axis]);

            go.transform.localRotation = q;
            go.transform.localPosition = beam_List[next_FB_Index] * beam_length;

            sequ_element sequence_el = new sequ_element();

            sequence_el.set(next_FB_Index, next_face_Axis, rotation);

            bGenNext = false;
            GameObject go = tetra_List[cIdx];
            bRemoveLast = false;

    private void OnApplicationQuit()
        sSequence.WriteLine("/////////////////////////////////////// ");
        sSequence.WriteLine("// ");

        for (int i = 0; i <= cIdx; i++)
            sSequence.WriteLine(i.ToString() + "\t FB_IDX = " + sequence[i].fb_Idx.ToString() 
                + "\t FACE_AXIS = " + sequence[i].face_axis.ToString() 
                + "\t Rotation  = " + sequence[i].axis_angle.ToString("F3"));


        sSequence.WriteLine("// ");
        sSequence.WriteLine("/////////////////////////////////////// ");


    private void setBeams()
        float tetrahedralAngle = Mathf.PI * -19.471220333f / 180;
        float segmentAngle = Mathf.PI * 2 / 3;
        float currentAngle = 0f;

        List<Vector3> vertices = new List<Vector3>(4) { new Vector3(0, radius, 0) };

        for (var i = 1; i < 4; i++)
            vertices.Add(PTUtils.PointOnSphere(radius, currentAngle, tetrahedralAngle));
            currentAngle += segmentAngle;

        beam_List.Add((vertices[1] + vertices[3] + vertices[2]) / 3);
        beam_List.Add((vertices[0] + vertices[2] + vertices[3]) / 3);
        beam_List.Add((vertices[0] + vertices[1] + vertices[2]) / 3);    
        beam_List.Add((vertices[0] + vertices[3] + vertices[1]) / 3);

    private void DoObjectTouched(object sender, InteractableObjectEventArgs e)
        VU_UI_MANAGER.Instance.Report_Touched(this.gameObject, e.interactingObject);

    private void DoObjectUntouched(object sender, InteractableObjectEventArgs e)
        VU_UI_MANAGER.Instance.Report_UnTouched(this.gameObject, e.interactingObject);

    private void DoObjectGrabbed(object sender, InteractableObjectEventArgs e)


    private void DoObjectUnGrabbed(object sender, InteractableObjectEventArgs e)



David W. Johnson <dj@argos.vu> Sun, Aug 27, 2017 at 4:35 PM
To: Joseph Matto <joematto14@gmail.com>


I’m using “TOT” as a name in some of the code structure. 🙂

The above all sound good. I like that you are an architect. It makes me focus on developing my organizational/visualization skills more than usual.

I’d like to try to get the tetras generating via some list of axes/orientation pairs. With the idea of getting the RH as well as the LH helix to generate via code. Then get into the branching stuff to mimic lighting, root systems etc.
i.e. Each next fb/t is placed according to a designated axes from it’s parent and one of the 12 orientations (4axes x 3 angles each(some redundancy)) for fb/t.
I’m going to spend a bit of time next week working on an early access version of “The VU” so a general user can experience it without any hand holding.
As you know, EU 2017 was its first public introduction, I need a version that is understandable/usable for people in the VR industry to check out and potentially review.
I’ve got the beginnings of a user guide which needs some significant work as well. I’d be interested in your input at some point if you get the opportunity.
Thanks again.


Joseph Matto <joematto14@gmail.com> Sun, Aug 27, 2017 at 10:44 AM
To: “David W. Johnson” <dj@argos.vu>

Hey David……

These are great…..I like having the reference sheets in their completeness of each view relative to others….and your organization is coherent and understandable to me.
“Adjacency” means rotating around an edge to generate next “ fb/t ” ?
Suggesting following abbreviations….
“ t/h” = tetrahedron
“T/H” = tetra-helix
“ TOT “ – Tetrahelix Oriented Tetrahedron…(do you have another way to describe this?)
fb/t  = adjacent tetrahedron… fully “face-bounded” (Bucky’s nomenclature)
eb/t = edge bonded tetrahedron (only one edge congruent)
vb/t = tetrahedrons connected only by one vertices
Also – need to identify centroids as a point for relations
Also – need to ….
sorry gotta go, will continue later.
David W. Johnson <dj@argos.vu> Sun, Aug 27, 2017 at 8:51 AM
To: Joseph Matto <JoeMatto14@gmail.com>


Starting to put together some tetra adjacency code to try out some generating possibilities.
I put together a reference sheet of the local y rotations here:
and was reminded of a kind of Moire Pattern you can see in the Cube Point cloud:

Anyway, thought it was cool.
I’ll post these up on the rt2 page for reference.
Have a great day.



Joseph Matto <joematto14@gmail.com> Fri, Aug 25, 2017 at 8:44 PM
To: “David W. Johnson” <dj@argos.vu>

Hi David!

Wow you have been busy and having fun I see!
I like all the ways you are constructing it and the color coding.
A very long straight Helix chain is one of the things I had hoped you would do initially.
It is interesting to note that it is non-periodic……no matter how long the chain is…..no tetrahedron position in space can ever be achieved again in the same chain. A kind a spatial analogue to complete randomness.
You have created a Left Hand Helix. The direction is determined by the orientation of the first tetrahedron to the intended axis.
If you tilt the opposite way, you get a Right Hand Tetrahelix.
The amazing thing I discovered back in Haresh’s class was that a left hand and right hand helix crosses at exactly 90 degrees in terms of their axis.
I went crazy thing to see if there was a way to make a square or any other shape of these second order assemblies….jury still out on that.
One of the things I learned is that there are several types of helices running along the length depending on which edge you follow….and that there is a logical way …UP TO A POINT….to shorten of lengthen the edges so that the helix can bend.
I have only done this in one plane but I am sure it can be done in more so that the helix double-winds and triple winds on itself…..like a rubber band that is twisted and then jumps to double twisting.
The center channel formed by the interweaving oo the two Hypars I liken to the SUSHUMNA channel in kundalini yoga…the two hypars being magnetic fields and the center channel the actual “Juice” or electricity….
OR one field is electrical and one magnetic and the center channel, is Plasma, or consciousness.
The relevance to Bending is that center channel can be maintained up to a point and then it kinks or is constricted and the channel collapses.
So imagine you got half way down this T/H Chain and then they increased in frequency but not amplitude, as it were and the faces were subdivided by a smaller inverted triangle…creating 4 triangular faces each one 1/4th the area of the original hedral….and then the tetra helix continued but just out of one of those smaller faces…possible the center face….I would like to explore those branding patterns and see if there is any correlation to lighting discharge patterns or dendritic patterns from plasma discharges.
So those are some thoughts for now….some I have expressed before.
One of the main reasons I am interested in exploring the T/H is because it is so fundamental…and as everyone knows Nature is efficient and builds in a logical spatially coherent manner which is then constrained or influenced by environmental forces and mediums.
Thanks for doing all this work…I feel so guilty not being more available right now. But I have faith that there is some balance to be found in all this.
On another note, the Remote Viewing Training was amazing and I had some “8 Martini Results” as they say is this strange sub-culture. I will post some to the results in a couple of weeks.
By the way…should I be writing stuff into the workspace you created?
Oh here is an interested project I came across….. kind of relates to what Haresh is trying to do (although I think  Haresh is not the right path with the mapping….except for the 2nd part of what he is doing, similar to what this guy is taking about) …..
Kindest regards to You and Lukas!
On Aug 25, 2017, at 2:13 PM, David W. Johnson <dj@argos.vu> wrote:



Hope the seminar is going well.
I’m finding a lot of interesting stuff on tetra-helices. Pretty amazing. I’ve never run into them before. I’m quickly becoming a fan.
I put a sketch video together of what I’ve done in unity/VR.
If you get the chance, check out:
also added some material to:
same password: bucky
Hope all is well.



Hopf fibration

PolyChronic vs MonoChronic

Interesting Dual

Convergent Energy – Expansive Mind

Divergent Energy – Contractive Mind