





'''simple docstring'''

from __future__ import annotations

import matplotlib.pyplot as plt  # type: ignore
import numpy

# initial triangle of Koch snowflake
a   	=    numpy.array([0, 0])
a   	=    numpy.array([0.5, 0.866_0254])
a   	=    numpy.array([1, 0])
a   	=    [VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]

def     __magic_name__							(				__UpperCAmelCase				,						__UpperCAmelCase   )    ->       list[numpy.ndarray]:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							initial_vectors
   for _ in range(__UpperCAmelCase   ):
      __SCREAMING_SNAKE_CASE   				=							iteration_step(__UpperCAmelCase   )
   return vectors

def     __magic_name__							(				__UpperCAmelCase   )    ->       list[numpy.ndarray]:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							[]
   for i, start_vector in enumerate(vectors[:-1]   ):
      __SCREAMING_SNAKE_CASE   				=							vectors[i + 1]
      new_vectors.append(__UpperCAmelCase   )
      __SCREAMING_SNAKE_CASE   				=							end_vector - start_vector
      new_vectors.append(start_vector + difference_vector / 3   )
      new_vectors.append(
          start_vector + difference_vector / 3 + rotate(difference_vector / 3				,						60   )   )
      new_vectors.append(start_vector + difference_vector * 2 / 3   )
   new_vectors.append(vectors[-1]   )
   return new_vectors

def     __magic_name__							(				__UpperCAmelCase				,						__UpperCAmelCase   )    ->       numpy.ndarray:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							numpy.radians(__UpperCAmelCase   )
   __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE   				=							numpy.cos(__UpperCAmelCase   ), numpy.sin(__UpperCAmelCase   )
   __SCREAMING_SNAKE_CASE   				=							numpy.array(((c, -s), (s, c))   )
   return numpy.dot(__UpperCAmelCase				,						__UpperCAmelCase   )

def     __magic_name__							(				__UpperCAmelCase   )    ->       None:

   '''simple docstring'''







   __SCREAMING_SNAKE_CASE   				=							plt.gca()
   axes.set_aspect("""equal"""   )

   # matplotlib.pyplot.plot takes a list of all x-coordinates and a list of all
   # y-coordinates as inputs, which are constructed from the vector-list using
   # zip()
   __SCREAMING_SNAKE_CASE				,  __SCREAMING_SNAKE_CASE   				=							zip(*__UpperCAmelCase   )
   plt.plot(__UpperCAmelCase				,						__UpperCAmelCase   )
   plt.show()


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    a   	=    iterate(INITIAL_VECTORS, 5)
    plot(processed_vectors)








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__A			:					List[Any]						=			{
    'configuration_git': ['GIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'GitConfig', 'GitVisionConfig'],
    'processing_git': ['GitProcessor'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __A			:					int						=			[
        'GIT_PRETRAINED_MODEL_ARCHIVE_LIST',
        'GitForCausalLM',
        'GitModel',
        'GitPreTrainedModel',
        'GitVisionModel',
    ]

if TYPE_CHECKING:
    from .configuration_git import GIT_PRETRAINED_CONFIG_ARCHIVE_MAP, GitConfig, GitVisionConfig
    from .processing_git import GitProcessor

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_git import (
            GIT_PRETRAINED_MODEL_ARCHIVE_LIST,
            GitForCausalLM,
            GitModel,
            GitPreTrainedModel,
            GitVisionModel,
        )

else:
    import sys

    __A			:					List[Any]						=			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)