eoc2: update with initial values from the book.

This commit is contained in:
Bill Thiede 2021-06-24 16:43:12 -07:00
parent 709465dafe
commit c9ec19c3cd

View File

@ -35,14 +35,12 @@ fn draw_dot(c: &mut Canvas, x: usize, y: usize) {
c.set(x + 1, y + 1, red);
}
fn main() -> Result<()> {
let mut p = Projectile {
position: point(0., 1., 0.),
velocity: 10. * vector(1., 2., 0.).normalize(),
};
let e = Environment {
gravity: vector(0., -0.1, 0.),
wind: vector(-0.01, 0., 0.),
};
let position = point(0., 1., 0.);
let velocity = vector(1., 1.8, 0.).normalize() * 11.25;
let mut p = Projectile { position, velocity };
let gravity = vector(0., -0.1, 0.);
let wind = vector(-0.01, 0., 0.);
let e = Environment { gravity, wind };
let w = 800;
let h = 600;