More phone-cord-looking very stress-testy nested examples
This commit is contained in:
parent
3c707aff9b
commit
6857fb6aee
@ -62,3 +62,5 @@
|
|||||||
- Take a square. Wrap it around to a torus. Now add a twist (about
|
- Take a square. Wrap it around to a torus. Now add a twist (about
|
||||||
the axis that is normal to the square). This is simple, but it looks
|
the axis that is normal to the square). This is simple, but it looks
|
||||||
pretty cool.
|
pretty cool.
|
||||||
|
- How can I take tangled things like the cinquefoil and produce more
|
||||||
|
'iterative' versions that still weave around?
|
||||||
|
|||||||
@ -165,7 +165,9 @@ pub fn twisty_torus() -> Rule<TorusCtxt> {
|
|||||||
|
|
||||||
let rad = 1.0;
|
let rad = 1.0;
|
||||||
let rad2 = 8.0;
|
let rad2 = 8.0;
|
||||||
let dx = 0.01;
|
let rad3 = 24.0;
|
||||||
|
let rz3 = 0.0004;
|
||||||
|
let dx = 0.00;
|
||||||
let rx = 0.01;
|
let rx = 0.01;
|
||||||
let rz = 0.30;
|
let rz = 0.30;
|
||||||
let ang = 0.1;
|
let ang = 0.1;
|
||||||
@ -181,10 +183,9 @@ pub fn twisty_torus() -> Rule<TorusCtxt> {
|
|||||||
init: false,
|
init: false,
|
||||||
count: count + 1,
|
count: count + 1,
|
||||||
stack: [
|
stack: [
|
||||||
Transform::new().translate(dx, 0.0, 0.0).rotate(x, rx) * stack[0],
|
Transform::new().rotate(z, rz3) * stack[0],
|
||||||
// stack[0], //Transform::new().rotate(z, 0.05 * (count as f32)).translate(0.0, rad2, 0.0),
|
Transform::new().translate(dx, 0.0, 0.0).rotate(x, rx) * stack[1],
|
||||||
Transform::new().rotate(z, rz) * stack[1],
|
Transform::new().rotate(z, rz) * stack[2],
|
||||||
stack[2],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -227,9 +228,9 @@ pub fn twisty_torus() -> Rule<TorusCtxt> {
|
|||||||
init: true,
|
init: true,
|
||||||
count: 0,
|
count: 0,
|
||||||
stack: [
|
stack: [
|
||||||
|
Transform::new().translate(0.0, rad3, 0.0),
|
||||||
Transform::new().translate(0.0, rad2, 0.0),
|
Transform::new().translate(0.0, rad2, 0.0),
|
||||||
Transform::new().translate(rad, 0.0, 0.0),
|
Transform::new().translate(rad, 0.0, 0.0),
|
||||||
Transform::new(), // .translate(dx0, 0.0, 0.0),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,12 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn twisty_torus() {
|
fn twisty_torus() {
|
||||||
run_test(examples::twisty_torus(), 400, "twisty_torus", false);
|
run_test(examples::twisty_torus(), 3000, "twisty_torus", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn twisty_torus_full() {
|
||||||
|
run_test(examples::twisty_torus(), 40000, "twisty_torus_full", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wind_chime_mistake_thing() {
|
fn wind_chime_mistake_thing() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user