Sorry, your browser is not supported
To have the best experience using Skillshare, we recommend that you use one of these supported browsers.

Sam Randolph

http://littlehistories.net

80

2

Shadow People

import processing.pdf.*;

HDrawablePool pool;

void setup(){
size(800, 800);
H.init(this).background(#FFFFFF);
smooth();

final HPixelColorist colors = new HPixelColorist("background.jpg")
.fillOnly();

pool = new HDrawablePool(30000);
pool.autoAddToStage()

.add(new HShape("svg1.svg"))

.layout(
new HShapeLayout()
.target(
new HImage("shapeMap.png")
)
)

.onCreate(
new HCallback() {
public void run(Object obj) {
HShape d = (HShape) obj;
d
.enableStyle(false)
.noStroke()
.anchorAt(H.CENTER)
.size( (int)random(2, 10) )
.rotate( (int)random(360) )
;
colors.applyColor(d);
}
}
)
.requestAll()
;
saveVector();
noLoop();
}

void draw () {
H.drawStage();
}

void saveVector () {
PGraphics temp = null;
temp = beginRecord(PDF, "render-###.pdf");

if(temp == null) {
H.drawStage();
} else {
H.stage().paintAll(temp, false, 1); //PGraphics, uses3D, alpha
}

endRecord();
}

samrandolphdesign.com/blog/9/20/Yshadow-people

Comments

Please sign in or sign up to comment.