class Hill extends Solid{ float rho=-PI*0.8, r=0; float heightScale; float noiseScale; //----------- Hill(){ super(); this.noiseScale = 3; this.heightScale = 1; } //----------- void parse(String[] strs, int s){ for( ; sTWO_PI) rho = random(-0.1,0); if(r>1){ rho += 0.005; r = random(0,0.1); } x = r*cos(rho); z = r*sin(rho); y = heightScale*voxel(x,z); return new Vector3D( x, y, z); } //----------- float voxel(float x, float y){ float L = 1 - mag(x,y); //float S = 1 - sq(mag(x,y)); //float R = 1 - sqrt(mag(x,y)); return L*noise(4711+noiseScale*x,17+noiseScale*y); } }