Answer the question
In order to leave comments, you need to log in
Machine generated artistic patterns in vector fields?
I'm trying to rewrite this article:
Machine learning has just started to study, hence the following question arises: How to build a grid of corners and display it through PyCharm? I am at this stage:
import numpy as np
import math
import matplotlib.pyplot as plt
width = 100
height = 100
left_x = int(width * -0.5)
right_x = int(width * 1.5)
top_y = int(height * -0.5)
bottom_y = int(height * 1.5)
resolution = int(width * 0.01)
num_columns = int((right_x - left_x) / resolution)
num_rows = int((bottom_y - top_y) / resolution)
grid = np.random.random((num_columns, num_rows))
default_angle = math.pi * 0.25
for columns in range(num_columns):
for row in range(num_rows):
grid[columns][row] = default_angle
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question