Update gif url

This commit is contained in:
Kristofers Solo 2022-08-28 18:42:39 +03:00
parent 483900258a
commit e99d6416ab
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# Donut
ASCII spinning donut rewrite in Rust.
![donut-gif](https://media.giphy.com/media/YoQydgnatGOLZHZUVL/giphy.gif)
![donut-gif](https://imgur.com/qGgFMxP)
Based on spinning ASCII Donut: [a1k0n.net/2011/07/20/donut-math](https://www.a1k0n.net/2011/07/20/donut-math.html)

View File

@ -32,7 +32,7 @@ fn main() {
let t: f32 = sin_i * cos_j2 * cos_a - sin_j * sin_a;
// 40 is the left screen shift
let x: i32 = (40.0 + 30.0 * mess * (cos_i * cos_j2 * cos_b - t * sin_b)) as i32;
// 12 is the down screen shift
// 12 is the bottom screen shift
let y: i32 = (12.0 + 15.0 * mess * (cos_i * cos_j2 * sin_b + t * cos_b)) as i32;
let o: usize = (x + WIDTH * y) as usize;
// multiplying by 8 to bring in range 0-11 as 8*(sqrt(2))=11