mirror of
https://github.com/kristoferssolo/donut-rs.git
synced 2025-10-21 19:20:34 +00:00
Update gif url
This commit is contained in:
parent
483900258a
commit
e99d6416ab
@ -1,7 +1,7 @@
|
||||
# Donut
|
||||
|
||||
ASCII spinning donut rewrite in Rust.
|
||||

|
||||

|
||||
|
||||
Based on spinning ASCII Donut: [a1k0n.net/2011/07/20/donut-math](https://www.a1k0n.net/2011/07/20/donut-math.html)
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user