Skip to content

A Java program to render 3D objects which are mathematically defined. Makes it easy to create a new object and display it with a few lines of code.

Notifications You must be signed in to change notification settings

mattBoros/Raytracer

Repository files navigation

Raytracer

A Java program to render 3D objects which are mathematically defined. Makes it easy to create a new object and display it with a few lines of code.

Example

The following code snippet results in a raytraced sphere with a cube cut out of the center.

Renderer renderer = new Renderer(new MultiObject()
                                 .add_object(new Sphere(origin, 1.5f), true)
                                 .add_object(new Box(origin, 4f, 1.5f, 1.5f), false));
renderer.display();

Example

Example2

You can draw many objects. The following is a cube with a sphere cut out of the center.

Example5 Example6 Example7

You can even draw three dimensional Mandelbrot fractals.

Example3

Example4

About

A Java program to render 3D objects which are mathematically defined. Makes it easy to create a new object and display it with a few lines of code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages