Skip to content

Commit

Permalink
ray example
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jan 25, 2020
1 parent a969232 commit d0f8aae
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ PROGRAMS= \
random \
primes \
msort \
dmm
dmm \
ray

all: $(PROGRAMS)

Expand Down
10 changes: 10 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ power-of-two. For example:
$ make dmm
$ ./dmm @mpl procs 4 -- -N 1024
```

## Ray Tracing

A simple ray tracer that generates MxN images in PPM format. Use
`-m`/`-n` for output size, `-s` to select a scene, and `-f` to specific
the output file. For example:
```
$ make ray
$ ./ray -f out.ppm -m 400 -n 400 -s irreg
```
5 changes: 5 additions & 0 deletions examples/src/ray.mlb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(SML_LIB)/basis/basis.mlb
$(SML_LIB)/basis/fork-join.mlb

lib/sources.mlb
ray.sml
Loading

0 comments on commit d0f8aae

Please sign in to comment.