please format code with </> button * homework policy * asking questions
Hi, I’m wondering how to make a P3D heightmap out of the following grid of recursive circles? Is it possible since the circles aren’t a uniform cell or row size? I would like to create a height map from a loading image but have the recursive circles pattern as the net that wraps around the heightmap… like the following loading image (scroll down) except I am wrapping the image with a grid here.
void setup(){
size (800,800);
}
void draw(){
background(255);
smooth(8);
stroke(4);
noFill();
drawCircle(width/2, height/2, 400);
}
void drawCircle(float x, float y, float radius){
ellipse(x,y,radius,radius);
if(radius > 20){
drawCircle(x + radius/2, y, radius/2);
drawCircle(x - radius/2, y, radius/2);
drawCircle(x, y - radius/2, radius/2);
drawCircle(x, y - radius/2, radius/2);
drawCircle(x, y + radius/2, radius/2);
drawCircle(x + radius/2, y + radius/2, radius/2);
drawCircle(x + radius/2, y - radius/2, radius/2);
drawCircle(x - radius/2, y + radius/2, radius/2);
drawCircle(x - radius/2, y - radius/2, radius/2);
}
}
A heightmap like the following…