Ejemplo n.º 1
0
    // Run when object is created
    private void Start()
    {
        // Setup parent object
        SetupParent(true);
        // Begin drawing fractal
        DrawFractal DrawTetrahedronFractalCb = DrawTetrahedronFractal;

        BeginFractal(DrawTetrahedronFractalCb);
    }
    // Run when object is created
    protected void Start()
    {
        // Setup parent object
        SetupParent(false);
        // Begin drawing fractal
        DrawFractal DrawTridecahedronFractalCb = DrawTridecahedronFractal;

        BeginFractal(DrawTridecahedronFractalCb);
    }
Ejemplo n.º 3
0
    // Run when object is created
    protected void BeginFractal(DrawFractal DrawFractalCb)
    {
        Vector3 xyz = start_xyz.HasValue ? start_xyz.Value : new Vector3(0, 0, 0);

        start_xyz = xyz;
        float a = base_length.HasValue ? base_length.Value : UI.length;

        base_length = a;
        int n = max_iterations.HasValue ? max_iterations.Value : UI.iterations;

        max_iterations = n;
        int i = current_iteration.HasValue ? current_iteration.Value : 0;

        current_iteration = i;
        // Draw the fractal
        DrawFractalCb(xyz, a, n, i);
    }