



"""simple docstring"""

from __future__ import annotations

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

# initial triangle of Koch snowflake
lowercase__					:						int												=			numpy.array([0, 0])
lowercase__					:						Tuple												=			numpy.array([0.5, 0.8660254])
lowercase__					:						List[Any]												=			numpy.array([1, 0])
lowercase__					:						List[Any]												=			[VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]




def __lowercase    (							_a	,    _a					):
				snake_case_				:  Any       =			initial_vectors
				for _ in range(_a					):
								snake_case_				:  Dict       =			iteration_step(_a					)
				return vectors




def __lowercase    (							_a					):
				snake_case_				:  int       =			[]
				for i, start_vector in enumerate(vectors[:-1]					):
								snake_case_				:  List[str]       =			vectors[i + 1]
								new_vectors.append(_a					)
								snake_case_				:  Union[str, Any]       =			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 __lowercase    (							_a	,    _a					):
				snake_case_				:  Any       =			numpy.radians(_a					)
				snake_case_				:  Union[str, Any]       =			numpy.cos(_a					), numpy.sin(_a					)
				snake_case_				:  List[str]       =			numpy.array(((c, -s), (s, c))					)
				return numpy.dot(_a	,    _a					)




def __lowercase    (							_a					):
				snake_case_				:  Any       =			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()
				snake_case_				:  List[str]       =			zip(*_a					)
				plt.plot(_a	,    _a					)
				plt.show()


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					lowercase__					:						str												=			iterate(INITIAL_VECTORS, 5)
					plot(processed_vectors)










"""simple docstring"""

def __lowercase    (							_a					):
    snake_case_				:  Optional[Any]       =			int(_a					)
    if decimal in (0, 1):  # Exit cases for the recursion
        return str(_a					)
    snake_case_,			snake_case_				:  Optional[int]       =			divmod(_a	,    2					)
    return binary_recursive(_a					) + str(_a					)




def __lowercase    (							_a					):
    snake_case_				:  Dict       =			str(_a					).strip()
    if not number:
        raise ValueError('''No input value was provided'''					)
    snake_case_				:  List[str]       =			'''-''' if number.startswith('''-'''					) else ''''''
    snake_case_				:  Optional[Any]       =			number.lstrip('''-'''					)
    if not number.isnumeric():
        raise ValueError('''Input value is not an integer'''					)
    return f"{negative}0b{binary_recursive(int(_a					)					)}"


if __name__ == "__main__":
     from doctest import testmod

     testmod()





