-
Notifications
You must be signed in to change notification settings - Fork 2
Update 15.py #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update 15.py #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your contribution!
The code is almost correct, while there are some programming issues. Please fix them accordingly.
We format our code with Black and lint them with Flake8 in this project. Please checkout here (offline code linting) and here (coding style) for details. Thank you!
@@ -0,0 +1,36 @@ | |||
import pylab | |||
import numpy as np | |||
from random import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent using from ... import *
.
from random import * | |
from random import random |
map=[[0x8,0x8,0x7f,0x49,0x7f,0x8,0x8],[0x8,0x8,0x3e,0x2a,0x7f,0x14,0x63]] | ||
R,C=7,7 | ||
ds=5 | ||
#m=int(input("> ")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused code.
a=2*pi*random() | ||
sina=np.sin(a) | ||
cosa=np.cos(a) | ||
ra=(1/m)*(0.8+0.2*random()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#m=int(input("> ")) | ||
m = 1 | ||
ds=20 | ||
pylab.axis("off") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding pylab.axis("equal")
for isometric scaling.
pylab.axis("off") | |
pylab.axis("off") | |
pylab.axis("equal") |
No description provided.