|
3
|
|
edited Mar 10 '17 at 19:25
|
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
Examples
The following output is valid (starts at top-left):

The following output is valid:

The following output is invalid:

This breaks condition 5 (repeat use of top-left, middle, and middle-left).
The following output is also invalid:

This passes through the top left twice and the start point is not the same as the end point (breaks rule 5 twice).
Scoring
The program with the largest number of distinct outputs wins, with the shortest program being the tiebreak.
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
Examples
The following output is valid (starts at top-left):

The following output is valid:

The following output is invalid:

This breaks condition 5 (repeat use of top-left, middle, and middle-left).
The following output is also invalid:

This passes through the top left twice and the start point is not the same as the end point (breaks rule 5 twice).
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
Examples
The following output is valid (starts at top-left):

The following output is valid:

The following output is invalid:

This breaks condition 5 (repeat use of top-left, middle, and middle-left).
The following output is also invalid:

This passes through the top left twice and the start point is not the same as the end point (breaks rule 5 twice).
Scoring
The program with the largest number of distinct outputs wins, with the shortest program being the tiebreak.
|
|
|
2
|
|
edited Mar 10 '17 at 19:05
|
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
- Lines drawn should never be from one point to another with the same x or y value.
- i.e. a line drawn from (125, 125) would not go to (125, 250) because x is the same, nor would it go to (250, 125) as y is the same.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
ExampleExamples
The following output is valid (starts at top-left):

The following output is invalidvalid:
 
Note that there is a line which passes perfectly horizontally, breaking rule 5.
The following output is invalid:

This breaks conditions 4condition 5 (repeat use of top-left, middle, and middle-left) and 5.
The following output is also invalid:

This passes through the top left twice and the start point is not the same as the end point (two lines which have constant x or y valuesbreaks rule 5 twice).
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
- Lines drawn should never be from one point to another with the same x or y value.
- i.e. a line drawn from (125, 125) would not go to (125, 250) because x is the same, nor would it go to (250, 125) as y is the same.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
Example
The following output is valid (starts at top-left):

The following output is invalid:

Note that there is a line which passes perfectly horizontally, breaking rule 5.
The following output is invalid:

This breaks conditions 4 (repeat use of top-left, middle, and middle-left) and 5 (two lines which have constant x or y values).
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
Examples
The following output is valid (starts at top-left):

The following output is valid:

The following output is invalid:

This breaks condition 5 (repeat use of top-left, middle, and middle-left).
The following output is also invalid:

This passes through the top left twice and the start point is not the same as the end point (breaks rule 5 twice).
|
|
|
1
|
|
answered Mar 10 '17 at 18:32
|
Android Lock Screen Art
graphical-outputpermutationscode-golfgrid
Background
In the land of Android, there exists a password type that looks like this:

It's essentially a connect-the-dots for a password. Today, we'll be making art with it.
The Task
Your program should export as many distinct combinations of pattern lock as image files with the following specifications:
- Images should be 500x500 pixels large.
- Dots should be located at positions (x, y):
- (125, 125)
- (125, 250)
- (125, 375)
- (250, 125)
- (250, 250)
- (250, 375)
- (375, 125)
- (375, 250)
- (375, 375)
- Lines should be drawn with a circular brush head of radius 8px.
- The pattern should pass through all points ONCE, with the exception of the first point, which should be the first and last point drawn from/to.
- Lines drawn should never be from one point to another with the same x or y value.
- i.e. a line drawn from (125, 125) would not go to (125, 250) because x is the same, nor would it go to (250, 125) as y is the same.
- Background color and line color may be any color of your choosing, but must not be the same color and it must be consistent.
Example
The following output is valid (starts at top-left):

The following output is invalid:

Note that there is a line which passes perfectly horizontally, breaking rule 5.
The following output is invalid:

This breaks conditions 4 (repeat use of top-left, middle, and middle-left) and 5 (two lines which have constant x or y values).
|
|