// FUNCTIONS // Use this for initialization void Start() { // Read the image width and height width = seedImage.width; length = seedImage.height; height = timeEnd; //Setup GOL Rules rule1.setupRule(1, 2, 2, 2); rule2.setupRule(1, 2, 3, 3); //kill rule ! rule3.setupRule(1, 2, 3, 4); rule4.setupRule(1, 3, 3, 3); rule5.setupRule(1, 3, 3, 6); rule6.setupRule(2, 3, 3, 3); rule7.setupRule(2, 3, 3, 4); rule8.setupRule(3, 3, 2, 2); rule9.setupRule(3, 4, 1, 1); rule10.setupRule(3, 4, 3, 4); rule11.setupRule(3, 6, 3, 3); rule12.setupRule(4, 5, 2, 2); rule13.setupRule(5, 5, 1, 1); deathrule.setupRule(0, 0, 0, 0); //Layer Densities layerDensities = new float[timeEnd];//layerDensities Array // Create a new CA grid CreateGrid(); SetupNeighbors3d(); Debug.Log(voxelGrid.Length); Debug.Log(totalAliveCells); }
// FUNCTIONS // Use this for initialization void Start() { // Read the image width and height width = seedImage.width; length = seedImage.height; height = timeEnd; //Setup GOL Rules rule1.setupRule(2, 3, 3, 3); rule2.setupRule(1, 3, 3, 6); rule3.setupRule(2, 6, 4, 5); rule4.setupRule(4, 4, 1, 2); rule5.setupRule(2, 3, 2, 4); rule6.setupRule(1, 2, 6, 8); ruleVN.setupRule(1, 6, 1, 6); deathrule.setupRule(0, 0, 0, 0); ruleNew.setupRule(1, 2, 3, 3); lastRule.setupRule(9, 9, 9, 9); //Layer Densities layerDensities = new float[timeEnd]; // Create a new CA grid CreateGrid(); SetupNeighbors3d(); }
// Use this for initialization void Start() { //Setup GOL Rules conditionDensity = new float[12]; for (int i = 0; i < 4; i++) { conditionDensity[i] = 0.01f * (i + 1); } for (int i = 4; i < 12; i++) { conditionDensity[i] = 0.05f * (i - 3); } rule1.setupRule(1, 2, 2, 2); rule2.setupRule(1, 2, 3, 3); rule3.setupRule(1, 2, 3, 4); rule4.setupRule(1, 3, 3, 3); rule5.setupRule(1, 3, 3, 6); rule6.setupRule(2, 3, 3, 3); rule7.setupRule(2, 3, 3, 4); rule8.setupRule(3, 3, 2, 2); rule9.setupRule(3, 4, 1, 1); rule10.setupRule(3, 4, 3, 4); rule11.setupRule(3, 6, 3, 3); rule12.setupRule(4, 5, 2, 2); rule13.setupRule(5, 5, 1, 1); ruleStore[0] = rule1; ruleStore[1] = rule2; ruleStore[2] = rule3; ruleStore[3] = rule4; ruleStore[4] = rule5; ruleStore[5] = rule6; ruleStore[6] = rule7; ruleStore[7] = rule8; ruleStore[8] = rule9; ruleStore[9] = rule10; ruleStore[10] = rule11; ruleStore[11] = rule12; ruleStore[12] = rule13; getStructureData(); CreateInvisibleStructure(); CreateVisibleStructure(); ConnectJoints(); CacheMaterials(); StartCoroutine(UpdateBodyColors()); }
// FUNCTIONS // Use this for initialization void Start() { // Read the image width and height width = seedImage.width; length = seedImage.height; height = timeEnd; //Setup GOL Rules rule1.setupRule(2, 3, 3, 3); rule2.setupRule(1, 3, 3, 6); deathrule.setupRule(0, 0, 0, 0); //Layer Densities layerDensities = new float[timeEnd]; // Create a new CA grid CreateGrid(); SetupNeighbors3d(); }
// Use this for initialization void Start() { PopulateDropdownList(); rule1.setupRule(2, 3, 2, 2); rule2.setupRule(2, 3, 3, 3); rule3.setupRule(2, 6, 4, 7); rule4.setupRule(3, 4, 3, 5); rule5.setupRule(4, 5, 3, 4); rule6.setupRule(4, 5, 3, 6); rule7.setupRule(6, 7, 2, 7); rule8.setupRule(6, 7, 2, 2); //deathrule.setupRule(0, 0, 0, 0); ruleStore[0] = rule1; ruleStore[1] = rule1; ruleStore[2] = rule2; ruleStore[3] = rule3; ruleStore[4] = rule4; ruleStore[5] = rule5; ruleStore[6] = rule6; ruleStore[7] = rule7; ruleStore[8] = rule8; }
// Use this for initialization void Start() { // Read the image width and height //VoxelGridList.Add(test ); ShowLayerSection.gameObject.active = false; ShowLayerSection2.gameObject.active = false; populateSeedImageList(); populateFrameNAgeCON(); //toLayerDensity.AddOptions(SelecetLayer); //Setup GOL Rules rule1.setupRule(1, 2, 2, 2); rule2.setupRule(1, 2, 3, 3); rule3.setupRule(1, 2, 3, 4); rule4.setupRule(1, 3, 3, 3); rule5.setupRule(1, 3, 3, 6); rule6.setupRule(2, 3, 3, 3); rule7.setupRule(2, 3, 3, 4); rule8.setupRule(3, 3, 2, 2); rule9.setupRule(3, 4, 1, 1); rule10.setupRule(3, 4, 3, 4); rule11.setupRule(3, 6, 3, 3); rule12.setupRule(4, 5, 2, 2); rule13.setupRule(5, 5, 1, 1); deathrule.setupRule(0, 0, 0, 0); //store rules in array ruleStore[0] = rule1; ruleStore[1] = rule2; ruleStore[2] = rule3; ruleStore[3] = rule4; ruleStore[4] = rule5; ruleStore[5] = rule6; ruleStore[6] = rule7; ruleStore[7] = rule8; ruleStore[8] = rule9; ruleStore[9] = rule10; ruleStore[10] = rule11; ruleStore[11] = rule12; ruleStore[12] = rule13; populateRuleList(); //Layer Densities //layerDensities = new float[timeEnd]; // Create a new CA grid }
// FUNCTIONS // Use this for initialization void Awake() { // Read the image width and height width = seedImage.width; length = seedImage.height; height = timeEnd; //Setup GOL Rules //rule1.setupRule(2, 1, 3, 2); //rule2.setupRule(1, 2, 4, 5); //deathrule.setupRule(0, 0, 0, 0); /// /// //rule1.setupRule(1, 1, 2, 6); //rule2.setupRule(1, 1, 4, 5); //deathrule.setupRule(0, 0, 0, 0); /// /// //rule1.setupRule(2, 1, 2, 1); //rule2.setupRule(1, 2, 1, 5); //deathrule.setupRule(0, 0, 0, 0); /// /// //rule1.setupRule(1, 1, 2, 1);////////////////////////////////// stepping behaviour //rule2.setupRule(1, 1, 1, 1);////////////////////////////// //rule3.setupRule(1,2,1,2); //densityrules.setupRule(1,1,1,1); //deathrule.setupRule(0, 0, 0, 0);////////////////// /// rule1.setupRule(1, 1, 3, 1); ////////////////////////////////// stepping behaviour rule2.setupRule(2, 5, 7, 1); ////////////////////////////// rule3.setupRule(1, 2, 0, 1); densityrules.setupRule(1, 0, 0, 1); deathrule.setupRule(0, 0, 0, 0); ////////////////// /// /// //rule1.setupRule(8, 4, 3, 2); //rule2.setupRule(4, 2, 1, 5); // rule3.setupRule(4,2,3,2); //deathrule.setupRule(0, 0, 0, 0); /// /// /// //rule1.setupRule(8, 4, 3, 2); //rule2.setupRule(4, 2, 1, 5); //deathrule.setupRule(0, 0, 0, 0); /// /// //rule1.setupRule(1, 3, 3, 4); //rule2.setupRule(1, 2, 4, 5); //deathrule.setupRule(0, 0, 0, 0); //Layer Densities layerDensities = new float[timeEnd]; // Create a new CA grid CreateGrid(); SetupNeighbors3d(); popCount = 0; //popText.text = "Population: " + totalAliveCells.ToString(); }