Basically, I have a terrain, and at specific points on the terrain, I want a hill(s) to grow out of it.
Creates a hill, right up to the magic terrain constant 1.0, which tapers off nicely:-
And I've wangled and wangled, but I still cannot get the maths to add up.
The effect I'm after is much like the first populas (Sega) effect when raising a terrain, the higher the hill, the wider the base etc etc
Anyone got any pointers as it has me stumped!?!
Tar ;)
Dabz
Creates a hill, right up to the magic terrain constant 1.0, which tapers off nicely:-
;x and y equals position on terrain ;radius equals hill base size For xx=-radius To radius For zz=-radius To radius x1=xx+x z1=zz+z e#=Sqr(xx*xx+zz*zz) h#=1.0-(e/Sqr( (radius)*(radius) + (radius)*(radius) ) ) If h# > TerrainHeight(terra,x1,z1) h1#=-Cos(h*180.0)/2.0+0.5 If h1<0.0 Then h1=0.0 If h1>1.0 Then h1=1.0 ModifyTerrain terra,x1,z1,h1 End If Next Next
And I've wangled and wangled, but I still cannot get the maths to add up.
The effect I'm after is much like the first populas (Sega) effect when raising a terrain, the higher the hill, the wider the base etc etc
Anyone got any pointers as it has me stumped!?!
Tar ;)
Dabz