Skip to content

Commit

Permalink
added example
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lindemeier committed Apr 7, 2019
1 parent 7e524a2 commit 193baad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions SimplePainterlyRendering.pde
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ PGraphics canvas; // offscreen buffer, used to render strokes
PImage colorDistance; // the difference between canvas and source
PImage render; // image to render in the window

int[] brushRadii = new int[] {32, 32, 32, 16, 16, 8, 8, 8, 5, 5, 5}; // used brushes
int[] brushRadii = new int[] {32, 32, 32, 16, 16, 8, 8, 8, 5, 5, 5, 3, 3}; // used brushes
int brushIndex = -1;
int brushRadius = -1; // the radius of the brush
final int areaError = 30; // the error threshold for the grid cells
final int areaError = 20; // the error threshold for the grid cells
final float FC = 0.5; // weight factor of the current direction vector used to integrate stroke
final int maxLength = 32; // max number of points in a stroke
final int minLength = 6;
Expand Down Expand Up @@ -300,5 +300,5 @@ void keyPressed()
if (key == '2') render = canvas;
if (key == '3') render = colorDistance;
if (key == '4') render = blurred;
if (key == 's') canvas.save("result.jpg");
if (key == 's') canvas.save("data/result.jpg");
}
Binary file added data/result.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions error_region.pde
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

/**
*
*
* University of Constance-
* Department for Computergraphics
*
* @author Thomas Lindemeier
* @date 28.10.2012
*
*/

class ErrorRegion
{
Expand Down Expand Up @@ -48,4 +57,4 @@ class ErrorRegion
}
ae /= totalPixels;
}
}
}
3 changes: 0 additions & 3 deletions stroke.pde
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@



/**
*
*
Expand Down

0 comments on commit 193baad

Please sign in to comment.