-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.lua
205 lines (161 loc) · 6.49 KB
/
params.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
---------- RepulsionPak ----------
--- Title of the window
_window_title = "RepulsionPak";
------ folders ------
_container_file = "..\\..\\repulsionpak_data\\containers\\heart.path"; --- file of the container
_primary_elem_dir = "..\\..\\repulsionpak_data\\animals\\"; --- folder containing primary elements
_secondary_elem_dir = "..\\..\\repulsionpak_data\\small_cat\\"; --- folder containing secondary elements (the elements to fill the remaining empty space after the simulation ends)
--- A directory where we have to save output files
_output_folder = "..\\..\\repulsionpak_data\\output\\";
-- target of positive space area
_target_fill_ratio = 0.55;
---------------------------------------------------------------------
_do_shape_matching = false;
--- PAD
_pad_level = 3;
_pad_delta = 0.05;
---------------------------------------------------------------------
-- 0.349066 is 20 deg
_angle_cap = 0.3;
_alpha_outside = 1; -- for score function (protusion)
_beta_inside = 0.001;
_score_resample_num = 1000; -- for score function (instead of grid-based)
_num_nn = 10; -- number of nearest neighbors in the search space
_gaussian_smoothing = 2; -- size of kernel
_gaussian_smoothing_element = 1;
_resample_gap_float = 1.0;
_resample_num = 5000; --- curve resampling (how many points)
_container_salient_gap = 100;
_random_point_gap = 5; --- gap of random initial placement
---------------------------------------------------------------------
--- WARNING, should be no whitespace before/after commas
--- always add a # character (for splitting)
--- except the last one
---_colors = "190,221,244#" .. --- light blue
--- "58,162,219#" .. --- blue
--- "57,139,203#" .. --- darkblue
--- "251,192,45#" .. --- yellow
--- "244,124,32#" .. --- orange
--- "242,128,170#" .. --- pink
--- "157,156,158#" .. --- gray
--- "0,0,0#" .. --- black
--- "255,255,255"; --- white
--- background color
---_back_color = "255,255,255"
_show_container = false;
_show_elements = true;
_show_skins = true;
_show_triangles = false;
_show_bending_edges = false;
_show_shape_matching = false;
_output_files = true;
_screen_width = 1200;
_screen_height = 800;
_sleep_time = 20; --- when simulation isn't running
_should_rotate = true;
---------------------------------------------------------------------
--- _mouse_offset_x = 10;
--- _mouse_offset_y = 10;
--- random seed
_seed = 871709; --- negative means random
--- initial placement
--- density of random points inside the container
--- (not the actual number)
--- larger the number, more elements you get,
--- but the simulation time gets slower
_num_element_pos = 200;
_num_element_pos_limit = 30;
--- Time step for numerical integration (euler method)
_dt = 0.1; --- do not set this higher than 0.1
--- random animation
---_shrink_fill_ratio = 1.65;
---_shrink_transition_time = 100.0;
---_noise_factor = 1.0;
--- 1. random perlin 2D
--- 2. perlin 3D
--- 3. random perlin 2D + circular
--- _noise_type = 1;
--- _noise_frequency = 0.00001;
--- _noise_map_update_time = 10000000; --- in ms (disabled)
--- Force parameters
_k_edge = 5; --- edge force for filling elements
_k_neg_space_edge = 1; --- edge force for springs
_k_edge_small_factor = 12;
_k_repulsion = 25; --- repulsion force
_repulsion_soft_factor = 1.0; --- soft factor for repulsion force
_k_overlap = 5; --- overlap force
_k_boundary = 20; --- boundary force
_k_noise = 0;
_k_rotate = 0; --- 1
_k_dock = 100;
--- _fuk_this = 0.000001;
--- to find peaks where the filling elements should be placed
--- minimum height of the peak to be considered
_peak_dist_stop = 1000.0; --- set this really high to disable filling elements
_peak_gap = 25.0; --- any pair of peaks should be separated by this distance
--- capping the velocity
_velocity_cap = 5; -- [Do not edit]
--- Skin offset for focal elements
--- ignore this if you don't have focal elements
_focal_offset = 2;
--- for preprocessing
--- skin width
_skin_offset = 20;
--- density of random points inside the skin
--- if the density is higher, you get more triangles
_sampling_num = 100;
--- uniform sampling on the skin
_boundary_sampling_factor = 1.3; -- [Do not edit]
---_should_recalculate_element = true;
--- Grid for collision detection
--- size of a cell
_bin_square_size = 50.0;
--- cell gap for detection,
--- 1 means considering all cells that are 1 block away from the query (3x3)
--- 2 means considering all cells that are 2 block away from the query (5x5)
_collission_block_radius = 2;
--_max_cg_indices = 500; -- see ASquare.h
--- for growing
--- incremetal step for growing
_growth_scale_iter = 0.002;
--- initial scale after placing the elements inside the target container
_element_initial_scale = 0.05;
--- epsilon for halting the growth
_growth_min_dist = 1;
_growth_threshold_a = 0.02;
_growth_threshold_b = 0.0001;
_growth_scale_iter_2 = 0.00333;
--- initial placement
--- how far away from the boundary so that the protusion cannot be too far
_random_point_boundary_buffer = 300.0;
--- relaxation to avoid self intersection
--- how many iteration?
_relax_iter_num = 1;
_self_intersection_threshold = 0.3;
--- 0 as usual
--- 1 vary the skin widths
_create_bad_packing = 0;
--- artboard dimension (do not edit this)
--- the parameter below means the artboard size is 500x500
_upscaleFactor = 500.0;
_downscaleFactor = 1.0 / _upscaleFactor;
--- SVG capture time (in milisecond)
--- for example, if you set it to 1000,
--- it creates an SVG file every 1 second
_svg_snapshot_capture_time = 10000000;
_png_snapshot_capture_time = 5000000000; --- PNG capture time (in milisecond)
_sdf_capture_time = 1000000000; --- SDF (Signed distance function) capture time (in milisecond)
--- RMS (Root of mean square) capture time
_rms_capture_time = 1000; --- it is set to 1 second
_rms_window = 100; --- Window length is 50
_rms_threshold = 0.02; --- RMS stopping criteria
---------------------------------------------------------------------
--- metric
_container_offset = 0; -- for SCP
---------------------------------------------------------------------
-- THREADS
_num_threads = 16;
--_num_thread_cg = 12; -- collision grid
--_num_thread_springs = 12;
--_num_thread_c_pt = 12; -- closest point
--_num_thread_solve = 2;