blob: ec5975ebb1cf6cc24bececec9be052f5b2e6261d (
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, 100);
cam.Render(world);
dur := time.Since(start);
fmt.Fprintf(os.Stderr,
"[GDone, in %5.2f seconds! \n",
dur.Seconds());
}
|