Handbook
Glossary
sphere
Vocabulary
benchmark
.
raytracer
Definition
USING:
math
specialized-arrays.instances.alien.c-types.double
;
IN:
benchmark.raytracer
TUPLE:
sphere
{
center
double-array
read-only
initial:
double-array{
}
}
{
radius
float
read-only
initial:
0.0
}
;
Methods
USING:
benchmark.raytracer
kernel
math.vectors
;
M:
sphere
intersect-scene
[
[
sphere-n
normalize
]
keep
<hit>
nip
]
if-ray-sphere
;