-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathn4VesicaPiscis.cs
More file actions
109 lines (99 loc) · 3.9 KB
/
n4VesicaPiscis.cs
File metadata and controls
109 lines (99 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class n4VesicaPiscis : MonoBehaviour
{
public float Quartic;
public bool Vert;
public bool Horiz;
public bool Strips;
public bool Boxes;
public Transform QuarVert;
public Transform QuarHoriz;
// SCALE CHANGES
// Strips where scale = (1, (Cubic * TRI-Angular #s up to 2n-1)
// Rectangles(Cubic/2,(Odd numbers up to the (cubic)th odd number)
// or
// Tiles where only position is changed and all the scale matrices are the same.
void Awake()
{
}
void Start()
{
float Layers = (Quartic * 2) - 1;
int TriNum = 0;
//(1 UNIT BY (Cubic * Triangular NUmbers in palindromic form )) RECTANGLE SUB-DIVISIONS
if (Strips == true)
{
for (float x = (-Layers / 2); x < (Layers / 2); x++) //1,3,5,7,9 = number of additions in the Triangular Numbers 1, 1+2+1, 1+2+3+2+1, 1+2+3+4+3+2+1, 1+2+3+4+5+4+3+2+1
{
if (x < 0)
{
TriNum++;
}
else
{
TriNum--;
}
if (Vert == true)
{
GameObject Plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
//Plane.transform.rotation.eulerAngles = new Vector3(90,0,0);
Plane.transform.position = new Vector3(0, 0, 5 * Quartic * (2 * x + 1));
Plane.transform.localScale = new Vector3(Quartic * TriNum, 1, Quartic);
Plane.transform.SetParent(QuarVert);
}
if (Horiz == true)
{
GameObject Plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
//Plane.transform.rotation.eulerAngles = new Vector3(90,0,0);
Plane.transform.position = new Vector3(5 * Quartic * (2 * x + 1), 0, 0);
Plane.transform.localScale = new Vector3(Quartic, 1, Quartic * TriNum);
Plane.transform.SetParent(QuarHoriz);
}
}
}
int Odds = -1;
if (Boxes == true)
{
for (float z = -Quartic; z < Quartic; z++) //1,3,5,7,9 = number of additions in the Triangular Numbers 1, 1+2+1, 1+2+3+2+1, 1+2+3+4+3+2+1, 1+2+3+4+5+4+3+2+1
{
if (z < 0)
{
Odds += 2;
}
if (z > 0)
{
Odds -= 2;
}
if (Vert == true)
{
GameObject Plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
//Plane.transform.rotation.eulerAngles = new Vector3(90,0,0);
Plane.transform.position = new Vector3(0, 0, 5 * Quartic * z + Quartic * 5 / 2);
Plane.transform.localScale = new Vector3(Odds * Quartic, 1, Quartic / 2);
Plane.transform.SetParent(QuarVert);
}
if (Horiz == true)
{
GameObject Plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
//Plane.transform.rotation.eulerAngles = new Vector3(90,0,0);
Plane.transform.position = new Vector3(5 * Quartic * z + Quartic * 5 / 2, 0, 0);
Plane.transform.localScale = new Vector3(Quartic / 2, 1, Odds * Quartic);
Plane.transform.SetParent(QuarHoriz);
}
}
}
{
void Update()
{
if (Input.GetKeyDown(KeyCode.I))
{
}
if (Input.GetKeyDown(KeyCode.O))
{
}
}
}
}
}