@@ -146,75 +146,4 @@ def create_branch(self):
146146
147147
148148
149- @dataclass
150- class UFOSimulationConfig :
151- """Configuration for UFO trellis tree simulation parameters."""
152-
153- # Tying and Pruning
154- num_iteration_tie : int = 8
155- num_iteration_prune : int = 16
156-
157- # Display
158- label : bool = True
159-
160- # Support Structure
161- support_trunk_wire_point : tuple = (0.6 , 0 , 0.4 )
162- support_num_wires : int = 7
163- support_spacing_wires : int = 1
164-
165- # Point Generation
166- ufo_x_range : tuple = (0.65 , 3 )
167- ufo_x_spacing : float = 0.3
168- ufo_z_value : float = 1.4
169- ufo_y_value : float = 0
170-
171- # Energy and Tying Parameters
172- energy_distance_weight : float = 0.5 # Weight for distance in energy calculation (was hardcoded /2)
173- energy_threshold : float = 1.0 # Maximum energy threshold for tying
174-
175- # Pruning Parameters
176- pruning_age_threshold : int = 8 # Age threshold for pruning untied branches
177-
178- # L-System Parameters
179- derivation_length : int = 160 # Number of derivation steps
180-
181- # Growth Parameters
182- thickness_multiplier : float = 1.2 # Multiplier for internode thickness
183- bud_age_tolerance : float = 0.01 # Tolerance for age-based bud spacing
184-
185- # Visualization Parameters
186- attractor_point_width : int = 10 # Width of attractor points in visualization
187-
188- def generate_points_ufo ():
189- """
190- Generate 3D points for the UFO trellis wire structure.
191-
192- Creates a linear array of wire attachment points along the x-axis at a fixed
193- height (z) and depth (y). The points are spaced evenly within the configured
194- x-range and used to construct the trellis support structure.
195-
196- Returns:
197- list: List of (x, y, z) tuples representing wire attachment points,
198- where all points share the same y and z coordinates.
199-
200- Configuration parameters used:
201- - ufo_x_range: Tuple (min_x, max_x) defining the range of x coordinates
202- - ufo_x_spacing: Spacing between consecutive x coordinates
203- - ufo_z_value: Fixed z-coordinate (height) for all points
204- - ufo_y_value: Fixed y-coordinate (depth) for all points
205- """
206- x = np .arange (
207- simulation_config .ufo_x_range [0 ],
208- simulation_config .ufo_x_range [1 ],
209- simulation_config .ufo_x_spacing
210- ).astype (float )
211- z = np .full ((x .shape [0 ],), simulation_config .ufo_z_value ).astype (float )
212- y = np .full ((x .shape [0 ],), simulation_config .ufo_y_value ).astype (float )
213-
214- wire_attachment_points = []
215- for point_index in range (x .shape [0 ]):
216- wire_attachment_points .append ((x [point_index ], y [point_index ], z [point_index ]))
217-
218- return wire_attachment_points
219-
220149
0 commit comments