mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-08 07:46:39 +02:00
add tiles_wfc
This commit is contained in:
@@ -6,15 +6,12 @@ use <util/slice.scad>;
|
|||||||
use <util/some.scad>;
|
use <util/some.scad>;
|
||||||
use <util/every.scad>;
|
use <util/every.scad>;
|
||||||
use <util/map/hashmap.scad>;
|
use <util/map/hashmap.scad>;
|
||||||
use <util/map/hashmap_len.scad>;
|
|
||||||
use <util/map/hashmap_put.scad>;
|
use <util/map/hashmap_put.scad>;
|
||||||
use <util/map/hashmap_get.scad>;
|
use <util/map/hashmap_get.scad>;
|
||||||
use <util/map/hashmap_del.scad>;
|
|
||||||
use <util/map/hashmap_keys.scad>;
|
use <util/map/hashmap_keys.scad>;
|
||||||
use <util/map/hashmap_values.scad>;
|
use <util/map/hashmap_values.scad>;
|
||||||
use <util/map/hashmap_entries.scad>;
|
use <util/map/hashmap_entries.scad>;
|
||||||
use <util/set/hashset.scad>;
|
use <util/set/hashset.scad>;
|
||||||
use <util/set/hashset_len.scad>;
|
|
||||||
use <util/set/hashset_has.scad>;
|
use <util/set/hashset_has.scad>;
|
||||||
|
|
||||||
sample = [
|
sample = [
|
||||||
@@ -319,11 +316,16 @@ function not_compatible_nbr_tile(tm, current_tiles, nbr_tile, dir) =
|
|||||||
function push(stack, elem) = concat([elem], stack);
|
function push(stack, elem) = concat([elem], stack);
|
||||||
function pop(stack) = [stack[0], slice(stack, 1)];
|
function pop(stack) = [stack[0], slice(stack, 1)];
|
||||||
|
|
||||||
|
function tiles_wfc(width, height, sample) =
|
||||||
|
tilemap_generate(tilemap(width, height, sample));
|
||||||
|
|
||||||
|
/*
|
||||||
width = 20;
|
width = 20;
|
||||||
height = 20;
|
height = 20;
|
||||||
|
|
||||||
tm = tilemap(width, height, sample);
|
tm = tilemap(width, height, sample);
|
||||||
echo(tilemap_generate(tm));
|
echo(tilemap_generate(tm));
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
wf = wave_function(width, height, weights);
|
wf = wave_function(width, height, weights);
|
||||||
|
Reference in New Issue
Block a user