mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-09-12 08:08:30 +02:00
Start setting things out to implement erosion
First up, we're going to attempt to implement a snowballs-based algorithm. Reference: https://jobtalle.com/simulating_hydraulic_erosion.html
This commit is contained in:
parent
de6ea49d6f
commit
20ccf321ce
@ -23,7 +23,7 @@ dofile(worldeditadditions.modpath.."/lib/walls.lua")
|
|||||||
dofile(worldeditadditions.modpath.."/lib/replacemix.lua")
|
dofile(worldeditadditions.modpath.."/lib/replacemix.lua")
|
||||||
dofile(worldeditadditions.modpath.."/lib/maze2d.lua")
|
dofile(worldeditadditions.modpath.."/lib/maze2d.lua")
|
||||||
dofile(worldeditadditions.modpath.."/lib/maze3d.lua")
|
dofile(worldeditadditions.modpath.."/lib/maze3d.lua")
|
||||||
dofile(worldeditadditions.modpath.."/lib/conv/convolution.lua")
|
dofile(worldeditadditions.modpath.."/lib/conv/conv.lua")
|
||||||
|
|
||||||
dofile(worldeditadditions.modpath.."/lib/count.lua")
|
dofile(worldeditadditions.modpath.."/lib/count.lua")
|
||||||
|
|
||||||
|
3
worldeditadditions/lib/erode/erode.lua
Normal file
3
worldeditadditions/lib/erode/erode.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
worldeditadditions.erode = {}
|
||||||
|
|
||||||
|
dofile(worldeditadditions.modpath.."/lib/erode/snowballs.lua")
|
9
worldeditadditions/lib/erode/snowballs.lua
Normal file
9
worldeditadditions/lib/erode/snowballs.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
--[[
|
||||||
|
2D erosion algorithm based on snowballs
|
||||||
|
Note that this *mutates* the given heightmap.
|
||||||
|
@source https://jobtalle.com/simulating_hydraulic_erosion.html
|
||||||
|
|
||||||
|
]]--
|
||||||
|
function worldeditadditions.erode.snowballs(heightmap, heightmap_size, erosion_params)
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user