aboutsummaryrefslogtreecommitdiff
path: root/rtiaw.go
blob: 03cee092eacc693fd8681bf25ee896a6e68154c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

import (
	"fmt"
  "os"
  "time"
)

func main() {
  start := time.Now();

  var world Hittables;
  world.Add(Sphere{Vec3{0,    0  , -1},   0.5});
  world.Add(Sphere{Vec3{0, -100.5, -1}, 100  });

  cam := NewCamera(400, 16.0/9.0);
  cam.Render(world);

  dur := time.Since(start);
  fmt.Fprintf(os.Stderr,
              "Done, in %5.2f seconds!    \n",
              dur.Seconds());
}