Compare commits

...

5 Commits

Author SHA1 Message Date
Bauke f8eba44e4c
Add 2022-03-09. 2024-02-26 13:46:38 +01:00
Bauke 76bb398836
Add 2022-03-08. 2024-02-26 13:34:21 +01:00
Bauke cc535c7067
Add 2022-03-07. 2024-02-26 13:30:30 +01:00
Bauke 9964179467
Fix doc comment. 2024-02-26 13:23:16 +01:00
Bauke 997af2393a
Update indexmap. 2024-01-29 19:07:33 +01:00
4 changed files with 135 additions and 5 deletions

4
Cargo.lock generated
View File

@ -237,9 +237,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
[[package]]
name = "indexmap"
version = "2.1.0"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b"
dependencies = [
"equivalent",
"hashbrown",

View File

@ -17,7 +17,7 @@ path = "source/lib.rs"
workspace = true
[dependencies]
indexmap = "2.1.0"
indexmap = "2.2.1"
paste = "1.0.14"
[dev-dependencies]

View File

@ -6,5 +6,10 @@ pub mod year_2022;
/// Get all [`Project`]s in a single [`Vec`].
pub fn all_projects() -> Vec<Project> {
vec![year_2022::day_2022_03_06()]
vec![
year_2022::day_2022_03_06(),
year_2022::day_2022_03_07(),
year_2022::day_2022_03_08(),
year_2022::day_2022_03_09(),
]
}

View File

@ -1,4 +1,4 @@
//! The project made on 2022-03-06.
//! Projects made in 2022.
use {crate::Project, gegl::*};
@ -57,3 +57,128 @@ pub fn day_2022_03_06() -> Project {
turn_off_alpha: false,
}
}
/// The project made on 2022-03-07.
pub fn day_2022_03_07() -> Project {
Project {
create_input_image: false,
name: "2022-03-07".to_string(),
operations: vec![
Plasma::default()
.with_height(1080)
.with_seed(2_000_111_903.0)
.with_turbulence(1.0)
.with_width(1920)
.boxed(),
Mosaic::default()
.with_color_variation(1.0)
.with_tile_height(5.0)
.with_tile_neatness(1.0)
.with_tile_size(116.53)
.with_tile_surface(true)
.with_tile_type(MosaicTileType::Triangles)
.boxed(),
Waves::default()
.with_amplitude(2.9)
.with_clamp(true)
.with_sampler_type(WavesSamplerType::Cubic)
.boxed(),
Waves::default()
.with_amplitude(17.3)
.with_clamp(true)
.with_sampler_type(WavesSamplerType::Cubic)
.boxed(),
Mirrors::default()
.with_o_x(1.0)
.with_o_y(0.353)
.with_n_segs(2)
.boxed(),
Cartoon::default().boxed(),
Waterpixels::default()
.with_fill(WaterpixelsFill::Average)
.with_size(32)
.with_smoothness(1.0)
.boxed(),
Mirrors::default()
.with_o_x(0.01)
.with_o_y(0.01)
.with_n_segs(5)
.with_r_angle(342.0)
.boxed(),
MedianBlur::default().boxed(),
],
resolution: (1920, 1080),
turn_off_alpha: false,
}
}
/// The project made on 2022-03-08.
pub fn day_2022_03_08() -> Project {
Project {
create_input_image: false,
name: "2022-03-08".to_string(),
operations: vec![
DiffractionPatterns::default()
.with_height(1080)
.with_width(1920)
.boxed(),
TileSeamless::default().boxed(),
StereographicProjection::default().boxed(),
Newsprint::default()
.with_color_model(NewsprintColorModel::Cmyk)
.with_period(4.0)
.boxed(),
FocusBlur::default()
.with_blur_radius(9.72)
.with_blur_type(FocusBlurType::Lens)
.with_focus(0.0)
.with_highlight_factor(0.924)
.with_radius(1.173)
.with_shape(FocusBlurShape::Circle)
.boxed(),
],
resolution: (1920, 1080),
turn_off_alpha: false,
}
}
/// The project made on 2022-03-09.
pub fn day_2022_03_09() -> Project {
Project {
create_input_image: true,
name: "2022-03-09".to_string(),
operations: vec![
Maze::default().boxed(),
TileGlass::default().boxed(),
Waterpixels::default().boxed(),
Newsprint::default()
.with_angle2(-55.4)
.with_angle3(60.77)
.with_angle4(103.55)
.with_color_model(NewsprintColorModel::Rgb)
.boxed(),
Waves::default()
.with_amplitude(5.9)
.with_clamp(true)
.boxed(),
Oilify::default().boxed(),
TileSeamless::default().boxed(),
MedianBlur::default().with_percentile(2.35).boxed(),
Mirrors::default()
.with_n_segs(3)
.with_o_x(0.1)
.with_o_y(0.2)
.with_r_angle(330.0)
.boxed(),
FocusBlur::default()
.with_blur_radius(33.57)
.with_blur_type(FocusBlurType::Lens)
.with_focus(0.111)
.with_highlight_factor(0.529)
.with_radius(1.173)
.boxed(),
],
resolution: (1920, 1080),
turn_off_alpha: true,
}
}