Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e7579b90
Commit
e7579b90
authored
Mar 22, 2011
by
Ethan Rublee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding better support for asymmetric patterns.
parent
2a5fde0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
gen_pattern.py
doc/pattern_tools/gen_pattern.py
+4
-9
No files found.
doc/pattern_tools/gen_pattern.py
View file @
e7579b90
...
...
@@ -34,16 +34,11 @@ class PatternMaker:
def
makeACirclesPattern
(
self
):
spacing
=
self
.
square_size
r
=
spacing
/
5.0
row_shift
=
0
for
y
in
range
(
1
,
self
.
rows
+
1
):
for
x
in
range
(
1
,
self
.
cols
+
1
):
dot
=
SVG
(
"circle"
,
cx
=
(
x
+
row_shift
/
2.0
)
*
spacing
,
cy
=
y
*
spacing
,
r
=
r
,
fill
=
"black"
)
for
i
in
range
(
0
,
self
.
rows
):
for
j
in
range
(
0
,
self
.
cols
):
dot
=
SVG
(
"circle"
,
cx
=
((
j
*
2
+
i
%
2
)
*
spacing
)
+
spacing
,
cy
=
self
.
height
-
(
i
*
spacing
+
spacing
),
r
=
r
,
fill
=
"black"
)
self
.
g
.
append
(
dot
)
#this makes the pattern asymetric
if
row_shift
is
0
:
row_shift
=
1
else
:
row_shift
=
0
def
makeCheckerboardPattern
(
self
):
spacing
=
self
.
square_size
r
=
spacing
/
5.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment