Skip to content

Commit

Permalink
Add documentation for the project
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed May 26, 2019
1 parent cd06665 commit 9658673
Show file tree
Hide file tree
Showing 25 changed files with 1,365 additions and 66 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -2,3 +2,5 @@
*.jl.*.cov
*.jl.mem
deps/deps.jl
.stale
build
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -64,8 +64,6 @@ save("spheres1.jpg", img)

If all went well then the following image should have been produced

![simple_spheres_scene](https://raw.githubusercontent.com/avik-pal/RayTracer.jl/master/assets/spheres1.jpg)

Now you know everything there is to know about rendering using RayTracer :P. For rendering more
interesting scenes you just need to vary the parameters of the above example.

Expand Down
Binary file removed assets/spheres1.jpg
Binary file not shown.
Binary file removed assets/spheres2.jpg
Binary file not shown.
Binary file removed assets/triangle.jpg
Binary file not shown.
16 changes: 16 additions & 0 deletions docs/make.jl
@@ -0,0 +1,16 @@
using Documenter, RayTracer

makedocs(modules=[RayTracer],
doctest = false,
sitename = "RayTracer",
authors = "Avik Pal",
# Uncomment below for local build
format = Documenter.HTML(prettyurls = false,
assets = ["assets/documenter.css"]),
pages = ["Home" => "index.md",
"Getting Started" => [
"Rendering" => "getting_started/rendering.md",
"Inverse Rendering" => "getting_started/optimization.md"],
"API Documentation" => "api.md"])

deploydocs(repo = "github.com/avik-pal/RayTracer.jl.git")
102 changes: 102 additions & 0 deletions docs/src/api.md
@@ -0,0 +1,102 @@
# API Documentation

```@meta
CurrentModule = RayTracer
```

## General Utilities

List of the General Functions and Types provided by the RayTracer. Most of the other functionalities
are built upon these.

```@autodocs
Modules = [RayTracer]
Pages = ["utils.jl",
"imutils.jl"]
Order = [:type,
:macro,
:function]
```

```@docs
get_params
set_params!
```

## Differentiation

The recommended mode of differentation is by Automatic Differentiation using [Zygote](https://github.com/FluxML/Zygote.jl).
Refer to the `Zygote` docs for this. The API listed below is for numerical differentiation and is very
restrictive in its current form.

```@docs
ngradient
numderiv
```

## Scene Configuration

### Camera

```@autodocs
Modules = [RayTracer]
Pages = ["camera.jl"]
Order = [:type,
:macro,
:function]
```

### Light

```@autodocs
Modules = [RayTracer]
Pages = ["light.jl"]
Order = [:type,
:macro,
:function]
```

### Materials
```@autodocs
Modules = [RayTracer]
Pages = ["material.jl"]
Order = [:type,
:macro,
:function]
```

### Objects

```@autodocs
Modules = [RayTracer]
Pages = ["sphere.jl",
"triangle.jl",
"cylinder.jl",
"disc.jl",
"polygon_mesh.jl",
"objects.jl"]
Order = [:type,
:macro,
:function]
```

## Renderers

```@autodocs
Modules = [RayTracer]
Pages = ["blinnphong.jl"]
Order = [:type,
:macro,
:function]
```

## Optimization

```@autodocs
Modules = [RayTracer]
Pages = ["optimize.jl"]
Order = [:type,
:macro,
:function]
```

0 comments on commit 9658673

Please sign in to comment.