93 write_points(format!("{PREFIX}/data"), points.iter())?; |
93 write_points(format!("{PREFIX}/data"), points.iter())?; |
94 write_points(format!("{PREFIX}/origin"), std::iter::once(&origin))?; |
94 write_points(format!("{PREFIX}/origin"), std::iter::once(&origin))?; |
95 |
95 |
96 let f = Sum::new(points.into_iter().map(DistToSquaredDiv2)); |
96 let f = Sum::new(points.into_iter().map(DistToSquaredDiv2)); |
97 //let g = ZeroFn::new(); |
97 //let g = ZeroFn::new(); |
98 let g = Scaled::new(0.5, DistTo(origin)); |
98 let g = Scaled::new(2.5, DistTo(origin)); |
99 let τ = 0.05; |
99 let τ = 0.05; |
100 |
100 |
101 std::fs::create_dir_all(PREFIX)?; |
101 std::fs::create_dir_all(PREFIX)?; |
102 for face in Face::all() { |
102 for face in Face::all() { |
103 write_face_csv(format!("{PREFIX}/{face}"), face, 32, |x| f.apply(x) + g.apply(x))?; |
103 write_face_csv(format!("{PREFIX}/{face}"), face, 32, |x| f.apply(x) + g.apply(x))?; |