Hi Guys - Totally new user here hoping to become an established community member, nice to meet you all.
I’m hoping to create a project which has randomly rotated scalene triangles (or acute triangles) that are barely visible at the center of the canvas and get bigger as they approach the edges of the canvas.
I’d also like to be able to put an object e.g. a circle at the center of the canvas and the triangles only start from the edge of the circle and I can change the size of the circle. Creating a tunnel effect.
Can anyone assist me with this? Many thanks
Here is my code but just random positioning so far
colors = new HColorPool(#FFFFFF, #808080);
pool = new HDrawablePool(9000);
pool.autoAddToStage()
.add(new HShape("svg2.svg"))
.layout(
new HGridLayout()
.startX(50)
.startY(50)
.spacing(50,50)
.cols(11)
)
.onCreate(
new HCallback() {
public void run(Object obj) {
HShape d = (HShape) obj;
d
.stroke(#808080)
.fill(#FFFFFF)
.size( (int)random(50,60) )
.rotate( (int)random(360) )
.loc( (int)random(width), (int)random(height) )
.anchorAt(H.CENTER)
;
}
}
)
.requestAll()
;
H.drawStage();
}