This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| error[E0433]: failed to resolve: use of undeclared type or module `vulkano` | |
| --> src/main.rs:180:5 | |
| | | |
| 180 | / nannou::vk::shaders::shader! { | |
| 181 | | ty: "compute", | |
| 182 | | src: " | |
| 183 | | #version 450 | |
| ... | | |
| 199 | | }" | |
| 200 | | } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //do a bad polygon | |
| let gfrac = ((app.elapsed_frames() % 300) as f32)/300.0; | |
| let mut points = Vec::new(); | |
| let s = 5; | |
| for k in 0..s { | |
| let frac = (k as f32)/(s as f32); | |
| let angle = frac*TAU; | |
| let r = (frac-0.5+gfrac).abs() * 300.0; | |
| points.push(pt2(r*angle.cos(), r*angle.sin())); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate nannou; | |
| use nannou::prelude::*; | |
| use nannou::prelude::Frame; | |
| use std::process::exit; | |
| use nannou::rand::*; | |
| const SEED: u64 = 3; | |
| fn main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //adapt to your framework | |
| val traceA = ArrayBuffer[Vec2]() | |
| val traceB = ArrayBuffer[Vec2]() | |
| val frac = frameCount%120 | |
| val frac2 = .7+.3*sin(frac*TWO_PI) | |
| val s = 700 | |
| val r = width*.01 | |
| for(k <- 0 until s){ | |
| val f = (k)*1.0/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //roughly like this | |
| function draw(){ | |
| var frac = (gCount%200)*1.0/(100) | |
| if(frac>1 ) frac = 2-frac | |
| var frac2 = (gCount%200)*1.0/(200) | |
| gFrac = 1-frac2 | |
| val s = 40 | |
| for(k <- 0 until s){ |