@@ -48,14 +48,14 @@ Decomposes 3D shapes into tetrahedra and sums volumes using cross products.
4848
4949``` python
5050import numpy as np
51- from core .contraction_expansion import _area_2d_fast
51+ from pyeyesweb.low_level .contraction_expansion import _area_2d_fast
5252
5353# Define four corner points of a movement trajectory
5454trajectory_points = np.array([
55- [0.0 , 0.0 ], # Point 1
56- [1.0 , 0.0 ], # Point 2
57- [1.0 , 1.0 ], # Point 3
58- [0.0 , 1.0 ] # Point 4
55+ [0.0 , 0.0 ], # Point 1
56+ [1.0 , 0.0 ], # Point 2
57+ [1.0 , 1.0 ], # Point 3
58+ [0.0 , 1.0 ] # Point 4
5959])
6060
6161area = _area_2d_fast(trajectory_points)
@@ -105,26 +105,27 @@ for frame in motion_data:
105105### 3D Movement Analysis
106106
107107``` python
108- from core.contraction_expansion import _volume_3d_fast
108+ from pyeyesweb.low_level.contraction_expansion import _volume_3d_fast
109+
109110
110111# Analyze 3D movement volume changes
111112def analyze_3d_movement_volume (trajectory_data ):
112113 volume_timeline = []
113-
114+
114115 for frame in trajectory_data:
115116 # Extract key 3D points
116117 key_points = extract_key_3d_points(frame)
117-
118+
118119 if len (key_points) >= 4 : # Minimum for volume calculation
119120 volume = _volume_3d_fast(key_points)
120121 volume_timeline.append(volume)
121-
122+
122123 # Calculate expansion/contraction phases
123124 expansion_phases = []
124125 for i in range (1 , len (volume_timeline)):
125- if volume_timeline[i] > volume_timeline[i- 1 ]:
126+ if volume_timeline[i] > volume_timeline[i - 1 ]:
126127 expansion_phases.append(i)
127-
128+
128129 return {
129130 ' volume_timeline' : volume_timeline,
130131 ' expansion_frames' : expansion_phases,
@@ -217,8 +218,8 @@ Uses tetrahedron decomposition:
217218Combine spatial dynamics with movement smoothness:
218219
219220``` python
220- from core import Smoothness
221- from core .contraction_expansion import _area_2d_fast
221+ from pyeyesweb import Smoothness
222+ from pyeyesweb.low_level .contraction_expansion import _area_2d_fast
222223
223224smoothness_analyzer = Smoothness()
224225spatial_areas = []
@@ -227,7 +228,7 @@ for frame in motion_data:
227228 # Calculate spatial measure
228229 area = _area_2d_fast(extract_corners(frame))
229230 spatial_areas.append(area)
230-
231+
231232 # Analyze spatial smoothness
232233 if len (spatial_areas) >= smoothness_analyzer.min_length:
233234 spatial_smoothness = smoothness_analyzer(spatial_areas)
0 commit comments