



"""simple docstring"""
from __future__ import annotations



def        lowerCAmelCase_(   lowercase_     :							int							)	->       list[int]:
				_lowerCamelCase        =				2
				_lowerCamelCase        =				[]
				while i * i <= n:
								if n % i:
												i += 1
								else:
												n //= i
												factors.append(lowercase_							)
				if n > 1:
								factors.append(lowercase_							)
				return factors


if __name__ == "__main__":
			import doctest

			doctest.testmod()





"""simple docstring"""
from __future__ import annotations

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

# initial triangle of Koch snowflake
__SCREAMING_SNAKE_CASE  :						List[str]    							=      numpy.array([0, 0])
__SCREAMING_SNAKE_CASE  :						Optional[Any]    							=      numpy.array([0.5, 0.866_0254])
__SCREAMING_SNAKE_CASE  :						Tuple    							=      numpy.array([1, 0])
__SCREAMING_SNAKE_CASE  :						List[Any]    							=      [VECTOR_1, VECTOR_2, VECTOR_3, VECTOR_1]



def        lowerCAmelCase_(   lowercase_     :							list[numpy.ndarray]						,   lowercase_     :							int							)	->       list[numpy.ndarray]:
				_lowerCamelCase        =				initial_vectors
				for _ in range(lowercase_							):
								_lowerCamelCase        =				iteration_step(lowercase_							)
				return vectors



def        lowerCAmelCase_(   lowercase_     :							list[numpy.ndarray]							)	->       list[numpy.ndarray]:
				_lowerCamelCase        =				[]
				for i, start_vector in enumerate(vectors[:-1]							):
								_lowerCamelCase        =				vectors[i + 1]
								new_vectors.append(lowercase_							)
								_lowerCamelCase        =				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        lowerCAmelCase_(   lowercase_     :							numpy.ndarray						,   lowercase_     :							float							)	->       numpy.ndarray:
				_lowerCamelCase        =				numpy.radians(lowercase_							)
				_lowerCamelCase  ,     _lowerCamelCase        =				numpy.cos(lowercase_							), numpy.sin(lowercase_							)
				_lowerCamelCase        =				numpy.array(((c, -s), (s, c))							)
				return numpy.dot(lowercase_						,   lowercase_							)



def        lowerCAmelCase_(   lowercase_     :							list[numpy.ndarray]							)	->       None:
				_lowerCamelCase        =				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()
				_lowerCamelCase  ,     _lowerCamelCase        =				zip(*lowercase_							)
				plt.plot(lowercase_						,   lowercase_							)
				plt.show()


if __name__ == "__main__":
			import doctest

			doctest.testmod()

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