-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a template for Blob and BeadFinder classes in beadfinder.py
accourding to the Atomic-Nature.pdf file
- Loading branch information
1 parent
40d4a4d
commit 79a90af
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import sys | ||
from stdlibrary import picture, color | ||
|
||
|
||
class Blob: | ||
pixels = [] | ||
|
||
def add(self, x, y): | ||
pass | ||
|
||
def mass(self): | ||
pass | ||
|
||
def distanceTo(self, c): | ||
pass | ||
|
||
def __str__(self): | ||
return str(len(self.pixels)) | ||
|
||
|
||
class BeadFinder: | ||
def __init__(self, pic, tau): | ||
pass | ||
|
||
def getBeads(self, min_pixels): | ||
pass | ||
|
||
|
||
def main(): | ||
min_pixels = int(sys.argv[1]) | ||
tau = float(sys.argv[2]) | ||
input_file = sys.argv[3] | ||
|
||
bf = BeadFinder(input_file, tau) | ||
|
||
for blb in bf.getBeads(min_pixels): | ||
print(blb) |