Skip to content

Commit

Permalink
"Auto commit number 30"
Browse files Browse the repository at this point in the history
  • Loading branch information
lat-murmeldjur committed Mar 24, 2024
1 parent fab287a commit 1dbe814
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chronicl.dt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29
30
2 changes: 1 addition & 1 deletion featuring.dt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29
30
1 change: 1 addition & 0 deletions ohio.note
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Year::2024::|::Month::03::|::Day::20::|::Hour::17::|::Minute::16::|::Second::54:
Year::2024::|::Month::03::|::Day::21::|::Hour::14::|::Minute::51::|::Second::35::
Year::2024::|::Month::03::|::Day::22::|::Hour::16::|::Minute::32::|::Second::41::
Year::2024::|::Month::03::|::Day::24::|::Hour::19::|::Minute::16::|::Second::53::
Year::2024::|::Month::03::|::Day::24::|::Hour::19::|::Minute::34::|::Second::50::
17 changes: 14 additions & 3 deletions src/magma_ocean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn petrify(flow: Magma) -> Stone {
let mut rng = rand::thread_rng();
let points_diff = sbtr_f32_3(flow.positions[1].position, flow.positions[0].position);
let planes_normal: [f32; 3] = nrmlz_f32_3(points_diff);
let planes_number = rng.gen_range(8..16);
let planes_number = rng.gen_range(64..128);

let mut points_of_plane: u32 = 3;
let reference_orthogonal = gen_rthgnl_f32_3(planes_normal, &mut rng);
Expand Down Expand Up @@ -141,11 +141,21 @@ pub fn petrify(flow: Magma) -> Stone {
&mut plane.positions,
);

let mut normal_origin = *plane_point;
if pln == 0 {
normal_origin = planes_points[1];
}
if pln == planes_number - 1 {
normal_origin = planes_points[(planes_number - 2) as usize];
}

for i in 0..points_of_plane {
stone.positions.push(Position {
position: plane.positions[(i as usize)].position,
});
let normal = find_points_normal(plane.positions[(i as usize)].position, *plane_point);
let normal = //nrmlz_f32_3(gen_f32_3(0.0, 1.0, &mut rng));
// find_points_normal(plane.positions[(i as usize)].position, *plane_point);
find_points_normal(plane.positions[(i as usize)].position, normal_origin);
stone.normals.push(Normal { normal: normal });
}

Expand Down Expand Up @@ -197,7 +207,8 @@ pub fn petrify(flow: Magma) -> Stone {
if previous_plane[0] == planes_number - 2 {
points_of_plane = 3;
} else {
points_of_plane = rng.gen_range(32..64);
points_of_plane =
3 + spherical_progress(125.0, pln as f32, planes_number as f32 - 1.0) as u32;
};
}

Expand Down

0 comments on commit 1dbe814

Please sign in to comment.