| Crates.io | helixiser |
| lib.rs | helixiser |
| version | 0.4.2 |
| created_at | 2021-01-19 23:18:37.170729+00 |
| updated_at | 2021-01-24 00:01:22.972441+00 |
| description | A crate for the calculation of diffraction patterns of helical objects |
| homepage | |
| repository | https://github.com/NemoAndrea/helix-fft/tree/master/wasm/helixiser |
| max_upload_size | |
| id | 344193 |
| size | 55,157 |
A library for the calculation of diffraction patterns of helical objects
The helixiser rust crate serves as the backend for the Helixiser web application when compiled to WebAssembly.
You can try the web application at https://nemoandrea.github.io/helixiser/
Helixiser revolves around helix objects.
let strand_1 = Helix {
radius: 1.,
rise: 0.34,
frequency: 10.,
unit_size: 0.18,
offset: 0.,
rotation: 0.,
handedness: Handedness::Right,
};
let strand_2 = Helix {
rotation: 143.,
..strand_1 // copy remaining fields over from strand 1
};
let dna_helices: Vec<Helix> = vec![strand_1, strand_2];
// lets get an image (as a 1D array, with values in order (R,G,B,A) and then next pixel etc.
let my_diffraction: Wavefront = diff_analytic(dna_helices, 5, 1, 0.01, 512);
// use the [image] crate to save array as an image for image
my_diffraction.rescale(12.);
my_diffraction.save_image("B-DNA_diffraction.png");