- Home /
Drawing a Mandelbrot Set problem
im trying to make the function of the Mandelbrot Set, and im not sure what im doing worng or right, heres the code: private void StartCircles() { float savePower = BlackCircle.anchoredPosition.x; GameObject[] AllCircles = new GameObject[itarations]; AllCircles[0] = BlackCircle.gameObject; for (int i = 1; i < itarations; i++) { GameObject Circle = Instantiate(BlackCircle.gameObject, Vector3.zero, Quaternion.identity); Circle.transform.SetParent(CanvasPerent); savePower = Mathf.Pow(savePower, 2); savePower += RedCircle.anchoredPosition.x; Circle.GetComponent().anchoredPosition = new Vector2(savePower, AllCircles[i - 1].GetComponent().anchoredPosition.y * -1);
AllCircles[i] = Circle;
}
CleanSqud = new GameObject[itarations];
CleanSqud = AllCircles;
}
Im not sure what the y position should be and how could the x position be < 0 if its power of 2, its automaticly > 0, pls help :P
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Get highest Vector3 from list (using Linq?) 1 Answer
How to get lateral normals of a bezier curve 1 Answer
Linear optimization 0 Answers
Hint joint how to configure 0 Answers