void Start() { square.Initialize(radius * 2); circle.Initialize(radius); points = SpawnRandomPoints.SpawnRandomPointCloud(numberOfPoints, radius * 2, transform, true); Debug.Log("Approximation of Pi: " + ApproximatePi()); }
void Start() { mainPoint = SpawnRandomPoints.SpawnRandomPoint(zoneSize, false); mainPoint.transform.localScale *= 4; mainPoint.GetComponent <Renderer>().material.color = Color.green; points = SpawnRandomPoints.SpawnRandomPointCloud(numOfPoints, zoneSize, transform, false); if (ReturnNearestPoint() != null) { GameObject nearestPoint = ReturnNearestPoint().gameObject; nearestPoint.GetComponent <Renderer>().material.color = Color.red; } }
void Start() { points = SpawnRandomPoints.SpawnRandomPointCloud(numOfPoints, zoneSize, transform, false); centroid = (GameObject)GameObject.Instantiate(Resources.Load("Prefabs/BigRedPoint"), CalculateCentroid(), Quaternion.identity); SetupWanderScripts(); }