# README
raytracer
This is a go implementation of the first two books in the Ray Tracing in One Weekend book series.
It's completely CPU bound, so it's rather slow.
Additional features added:
- Triangle Primitives
- Basic .obj file parsing (only vertices and faces).
# Functions
Cross product of 2 Vec3.
Dot product of 2 Vec3.
Merge two AABBs together.
Create a New AABB given two extrema points.
Makes 3D box (six sides) that contains the two opposite vertices a & b.
No description provided by the author
image_width int, lookFrom, lookAt, vup Vec3, vfov, aspect_ratio, focus_distance, defocus_angle float64.
Create a checker texture from two Color Vectors.
Create a checker texture from two other texture material.
No description provided by the author
No description provided by the author
No description provided by the author
Creates Diffuse Light given a texture.
Creates Diffuse Light given the light color.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewLambert creates a new Lambert material with the given color.
No description provided by the author
No description provided by the author
NewMetal creates a new Metal material with the given color and fuzz factor.
Creates a Moving Sphere given the two centers that it is moving in between.
Make a new perlin noise texture.
No description provided by the author
Create a new Quadrilaterial plane Given a point and two direction vectors.
Creates a new ray given an origin and a direction.
No description provided by the author
No description provided by the author
No description provided by the author
Create a Constant Color Texture from a Vec3 of the RGB intensities.
Creates a New Sphere.
No description provided by the author
Create a new Quadrilaterial plane Given a point and two direction vectors.
No description provided by the author
Creates a Vec3 from 3 float values.
No description provided by the author
No description provided by the author
No description provided by the author
Generates a random unit Vec3 with length of 1.
Generate a random vector3 whose elements are within bounds.
Compute the reflected vector3 if incident vector v hits a reflective surface with normal vector n.
Compute the refractred vector3 if incident vector uv hits a reflective surface with normal vector n and the refractive indexes have a ratio of etai_over_etat.
# Structs
No description provided by the author
No description provided by the author
Checker Texture.
Constant medium.
No description provided by the author
Diffuse Light.
Struct to store the details of a ray hitting a surface.
No description provided by the author
Image Texture.
Isotropic Material.
Lambert describes a diffuse material.
Metal.
Perlin Noise Texture.
No description provided by the author
No description provided by the author
Represents a Ray.
Rotation, made to be general.
Scaling.
Shearing.
Constant Color Texture.
A Sphere.
Translation.
No description provided by the author
# Type aliases
3 Element Vector.