Update documentation guides (#208)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2022-07-26 16:07:45 -07:00
1 parent 1cd697366e
commit 828365ad30
12 files changed
+148411 -148307

No files matched your search

+4 -1
View File
@@ -27,10 +27,13 @@ jobs:
- name: Run license checks - name: Run license checks
run: | run: |
./scripts/licensing/license_headers.sh --check ./scripts/licensing/license_headers.sh --check
- name: Check notebook cell metadata
run: |
python ./scripts/docs/add_nb_tags.py --check
- name: Run isort - name: Run isort
run: isort . --profile black --check run: isort . --profile black --check
- name: Run Black - name: Run Black
run: black nerfactory/ scripts/ notebooks/ --check run: black nerfactory/ scripts/ notebooks/ docs/ --check
- name: Python Pylint - name: Python Pylint
run: | run: |
pylint nerfactory tests scripts pylint nerfactory tests scripts
+5 -4
View File
@@ -2,15 +2,16 @@
<p align="center"> The all-in-one repo for NeRFs </p> <p align="center"> The all-in-one repo for NeRFs </p>
<p align="center"> <p align="center">
<a href="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/?badge=latest"> <a href='https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/?badge=latest'>
<img alt="Documentation Status" src="https://readthedocs.com/projects/plenoptix-nerfactory/badge/?version=latest"> <img src='https://readthedocs.com/projects/plenoptix-nerfactory/badge/?version=latest&token=2c5ba6bdd52600523fa8a8513170ae7170fd927a8c9dfbcf7c03af7ede551f96' alt='Documentation Status' />
</a> </a>
<!-- TODO: add license and have it point to that --> <!-- TODO: add license and have it point to that -->
<a href="https://github.com/plenoptix/nerfactory/blob/master/LICENSE"> <a href="https://github.com/plenoptix/nerfactory/blob/master/LICENSE">
<img alt="Documentation Status" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg"> <img alt="Documentation Status" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg">
</a> </a>
<!-- TODO: add version number badge --> <!-- TODO: add version number badge -->
<a href="https://badge.fury.io/py/nerfactory"><img src="https://badge.fury.io/py/nerfactory.svg" alt="PyPI version" height="18"></a>
</p> </p>
- [Quickstart](#quickstart) - [Quickstart](#quickstart)
+10
View File
@@ -4,6 +4,16 @@ defaults:
method_name: instant_ngp method_name: instant_ngp
data: data:
# Train dataloading.
dataset_inputs_train:
data_directory: data/mipnerf_360/garden
dataset_format: mipnerf_360
downscale_factor: 4
# Eval dataloading
dataset_inputs_eval:
data_directory: data/mipnerf_360/garden
dataset_format: mipnerf_360
downscale_factor: 8
dataloader_train: dataloader_train:
pixel_sampler: pixel_sampler:
num_rays_per_batch: 8192 # for training num_rays_per_batch: 8192 # for training
+1 -1
View File
@@ -67,7 +67,7 @@ html_js_files = [
# -- MYST configs ----------------------------------------------------------- # -- MYST configs -----------------------------------------------------------
# To enable admonitions: # To enable admonitions:
myst_enable_extensions = ["amsmath", "colon_fence", "dollarmath", "html_image"] myst_enable_extensions = ["amsmath", "colon_fence", "deflist", "dollarmath", "html_image"]
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -107,11 +107,11 @@
" samples = sampler.generate_ray_samples(ray_bundle)\n", " samples = sampler.generate_ray_samples(ray_bundle)\n",
" samples.frustums.starts.shape\n", " samples.frustums.starts.shape\n",
"\n", "\n",
" plt.hist(samples.frustums.starts[0,:,0], alpha=0.5, bins=100)\n", " plt.hist(samples.frustums.starts[0, :, 0], alpha=0.5, bins=100)\n",
" plt.xlabel(\"Distance\")\n", " plt.xlabel(\"Distance\")\n",
" plt.ylabel(\"# Samples\")\n", " plt.ylabel(\"# Samples\")\n",
" plt.title(name)\n", " plt.title(name)\n",
" plt.show()\n" " plt.show()"
] ]
} }
], ],
+152 -71
View File
@@ -27,7 +27,38 @@
"Nerfacory calculates $pixel area$ as $dx * dy$ where $dx$ and $dy$ are the distance between points neighboring rays in the $x$ and $y$ direction a distance of 1 from the origin.\n", "Nerfacory calculates $pixel area$ as $dx * dy$ where $dx$ and $dy$ are the distance between points neighboring rays in the $x$ and $y$ direction a distance of 1 from the origin.\n",
":::\n", ":::\n",
"\n", "\n",
"## 3D Frustum Visualization\n" "## 3D Frustum\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"# HIDDEN\n",
"import plotly.graph_objects as go\n",
"\n",
"webdocs_layout = go.Layout(\n",
" scene=dict(\n",
" aspectmode=\"data\",\n",
" xaxis=dict(showspikes=False),\n",
" yaxis=dict(showspikes=False),\n",
" zaxis=dict(showspikes=False),\n",
" xaxis_visible=False,\n",
" yaxis_visible=False,\n",
" zaxis_visible=False,\n",
" ),\n",
" scene_camera=dict(up=dict(x=0, y=1, z=0)),\n",
" margin=dict(r=0, b=10, l=0, t=10),\n",
" hovermode=False,\n",
" showlegend=False,\n",
" paper_bgcolor=\"rgba(0,0,0,0)\",\n",
")"
] ]
}, },
{ {
@@ -6677,15 +6708,37 @@
} }
], ],
"layout": { "layout": {
"hovermode": false,
"margin": {
"b": 10,
"l": 0,
"r": 0,
"t": 10
},
"paper_bgcolor": "rgba(0,0,0,0)",
"scene": { "scene": {
"aspectmode": "data",
"camera": { "camera": {
"up": { "up": {
"x": 0, "x": 0,
"y": 1, "y": 1,
"z": 0 "z": 0
} }
},
"xaxis": {
"showspikes": false,
"visible": false
},
"yaxis": {
"showspikes": false,
"visible": false
},
"zaxis": {
"showspikes": false,
"visible": false
} }
}, },
"showlegend": false,
"template": { "template": {
"data": { "data": {
"bar": [ "bar": [
@@ -7501,16 +7554,13 @@
"zerolinewidth": 2 "zerolinewidth": 2
} }
} }
},
"title": {
"text": "Frustums"
} }
} }
}, },
"text/html": [ "text/html": [
"<div> <div id=\"36248024-5d87-433c-afb6-2eed8927eb45\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"36248024-5d87-433c-afb6-2eed8927eb45\")) { Plotly.newPlot( \"36248024-5d87-433c-afb6-2eed8927eb45\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"alphahull\":0,\"color\":\"#636EFA\",\"flatshading\":true,\"name\":\"Frustums\",\"opacity\":1.0,\"x\":[-0.10901391506195068,-0.09853725135326385,-0.0932835191488266,-0.09382206201553345,-0.10009453445672989,-0.11142121255397797,-0.12657465040683746,-0.14391276240348816,-0.161556676030159,-0.17759442329406738,-0.19028803706169128,-0.19826199114322662,-0.20065218210220337,-0.19719958305358887,-0.18827833235263824,-0.17485521733760834,-0.1583847999572754,-0.14065192639827728,-0.12357820570468903,-0.10901391506195068,-0.18168987333774567,-0.16422875225543976,-0.155472531914711,-0.1563701331615448,-0.16682423651218414,-0.18570201098918915,-0.21095775067806244,-0.2398546040058136,-0.2692611515522003,-0.2959907054901123,-0.31714674830436707,-0.33043667674064636,-0.3344203233718872,-0.32866597175598145,-0.313797265291214,-0.2914254069328308,-0.263974666595459,-0.23441988229751587,-0.20596371591091156,-0.18168985843658447],\"y\":[0.10901391506195068,0.12357823550701141,0.14065192639827728,0.1583847999572754,0.17485521733760834,0.18827833235263824,0.19719958305358887,0.20065218210220337,0.19826199114322662,0.19028803706169128,0.17759442329406738,0.161556676030159,0.14391276240348816,0.12657463550567627,0.11142121255397797,0.10009454935789108,0.09382206201553345,0.0932835191488266,0.09853725135326385,0.10901391506195068,0.18168987333774567,0.20596373081207275,0.23441988229751587,0.263974666595459,0.29142534732818604,0.313797265291214,0.32866597175598145,0.3344203233718872,0.33043667674064636,0.31714674830436707,0.2959907054901123,0.2692611515522003,0.2398546040058136,0.21095773577690125,0.18570201098918915,0.16682425141334534,0.1563701331615448,0.1554725468158722,0.16422876715660095,0.18168988823890686],\"z\":[-0.9895482063293457,-0.988935112953186,-0.9871621131896973,-0.9844213724136353,-0.9810099601745605,-0.9772974848747253,-0.9736862778663635,-0.9705676436424255,-0.9682796001434326,-0.9670700430870056,-0.9670700430870056,-0.9682796001434326,-0.9705676436424255,-0.9736862778663635,-0.9772974848747253,-0.9810099601745605,-0.9844213724136353,-0.9871621131896973,-0.988935112953186,-0.9895482063293457,-1.649247169494629,-1.64822518825531,-1.6452702283859253,-1.6407023668289185,-1.635016679763794,-1.6288292407989502,-1.6228106021881104,-1.6176128387451172,-1.6137994527816772,-1.611783504486084,-1.611783504486084,-1.6137994527816772,-1.6176128387451172,-1.6228106021881104,-1.6288292407989502,-1.635016679763794,-1.6407023668289185,-1.6452702283859253,-1.6482253074645996,-1.649247169494629],\"type\":\"mesh3d\"},{\"alphahull\":0,\"color\":\"#EF553B\",\"flatshading\":true,\"name\":\"Frustums\",\"opacity\":1.0,\"x\":[-0.18168987333774567,-0.16422875225543976,-0.155472531914711,-0.1563701331615448,-0.16682423651218414,-0.18570201098918915,-0.21095775067806244,-0.2398546040058136,-0.2692611515522003,-0.2959907054901123,-0.31714674830436707,-0.33043667674064636,-0.3344203233718872,-0.32866597175598145,-0.313797265291214,-0.2914254069328308,-0.263974666595459,-0.23441988229751587,-0.20596371591091156,-0.18168985843658447,-0.25436580181121826,-0.22992022335529327,-0.2176615595817566,-0.21891814470291138,-0.233553946018219,-0.2599828243255615,-0Line truncated "<div> <div id=\"3f979ef2-f076-400b-a25c-9a602761b26b\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"3f979ef2-f076-400b-a25c-9a602761b26b\")) { Plotly.newPlot( \"3f979ef2-f076-400b-a25c-9a602761b26b\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"alphahull\":0,\"color\":\"#636EFA\",\"flatshading\":true,\"name\":\"Frustums\",\"opacity\":1.0,\"x\":[-0.10901391506195068,-0.09853725135326385,-0.0932835191488266,-0.09382206201553345,-0.10009453445672989,-0.11142121255397797,-0.12657465040683746,-0.14391276240348816,-0.161556676030159,-0.17759442329406738,-0.19028803706169128,-0.19826199114322662,-0.20065218210220337,-0.19719958305358887,-0.18827833235263824,-0.17485521733760834,-0.1583847999572754,-0.14065192639827728,-0.12357820570468903,-0.10901391506195068,-0.18168987333774567,-0.16422875225543976,-0.155472531914711,-0.1563701331615448,-0.16682423651218414,-0.18570201098918915,-0.21095775067806244,-0.2398546040058136,-0.2692611515522003,-0.2959907054901123,-0.31714674830436707,-0.33043667674064636,-0.3344203233718872,-0.32866597175598145,-0.313797265291214,-0.2914254069328308,-0.263974666595459,-0.23441988229751587,-0.20596371591091156,-0.18168985843658447],\"y\":[0.10901391506195068,0.12357823550701141,0.14065192639827728,0.1583847999572754,0.17485521733760834,0.18827833235263824,0.19719958305358887,0.20065218210220337,0.19826199114322662,0.19028803706169128,0.17759442329406738,0.161556676030159,0.14391276240348816,0.12657463550567627,0.11142121255397797,0.10009454935789108,0.09382206201553345,0.0932835191488266,0.09853725135326385,0.10901391506195068,0.18168987333774567,0.20596373081207275,0.23441988229751587,0.263974666595459,0.29142534732818604,0.313797265291214,0.32866597175598145,0.3344203233718872,0.33043667674064636,0.31714674830436707,0.2959907054901123,0.2692611515522003,0.2398546040058136,0.21095773577690125,0.18570201098918915,0.16682425141334534,0.1563701331615448,0.1554725468158722,0.16422876715660095,0.18168988823890686],\"z\":[-0.9895482063293457,-0.988935112953186,-0.9871621131896973,-0.9844213724136353,-0.9810099601745605,-0.9772974848747253,-0.9736862778663635,-0.9705676436424255,-0.9682796001434326,-0.9670700430870056,-0.9670700430870056,-0.9682796001434326,-0.9705676436424255,-0.9736862778663635,-0.9772974848747253,-0.9810099601745605,-0.9844213724136353,-0.9871621131896973,-0.988935112953186,-0.9895482063293457,-1.649247169494629,-1.64822518825531,-1.6452702283859253,-1.6407023668289185,-1.635016679763794,-1.6288292407989502,-1.6228106021881104,-1.6176128387451172,-1.6137994527816772,-1.611783504486084,-1.611783504486084,-1.6137994527816772,-1.6176128387451172,-1.6228106021881104,-1.6288292407989502,-1.635016679763794,-1.6407023668289185,-1.6452702283859253,-1.6482253074645996,-1.649247169494629],\"type\":\"mesh3d\"},{\"alphahull\":0,\"color\":\"#EF553B\",\"flatshading\":true,\"name\":\"Frustums\",\"opacity\":1.0,\"x\":[-0.18168987333774567,-0.16422875225543976,-0.155472531914711,-0.1563701331615448,-0.16682423651218414,-0.18570201098918915,-0.21095775067806244,-0.2398546040058136,-0.2692611515522003,-0.2959907054901123,-0.31714674830436707,-0.33043667674064636,-0.3344203233718872,-0.32866597175598145,-0.313797265291214,-0.2914254069328308,-0.263974666595459,-0.23441988229751587,-0.20596371591091156,-0.18168985843658447,-0.25436580181121826,-0.22992022335529327,-0.2176615595817566,-0.21891814470291138,-0.233553946018219,-0.2599828243255615,-0Line truncated
" \n", " \n",
"var gd = document.getElementById('36248024-5d87-433c-afb6-2eed8927eb45');\n", "var gd = document.getElementById('3f979ef2-f076-400b-a25c-9a602761b26b');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n", "var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n", " var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n", " if (!display || display === 'none') {{\n",
@@ -7563,12 +7613,8 @@
"\n", "\n",
"vis_rays = vis.get_ray_bundle_lines(ray_bundle, color=\"teal\", length=far_plane)\n", "vis_rays = vis.get_ray_bundle_lines(ray_bundle, color=\"teal\", length=far_plane)\n",
"\n", "\n",
"fig = go.Figure(\n", "fig = go.Figure(data=[vis_rays] + vis.get_frustums_mesh_list(ray_samples.frustums), layout=webdocs_layout)\n",
" data=[vis_rays] + vis.get_frustums_mesh_list(ray_samples.frustums),\n", "fig.show()"
" layout=go.Layout(scene_camera=dict(up=dict(x=0, y=1, z=0)), title=\"Frustums\"),\n",
")\n",
"fig.show()\n",
"fig.write_html(\"frustums.html\")\n"
] ]
}, },
{ {
@@ -7869,15 +7915,37 @@
} }
], ],
"layout": { "layout": {
"hovermode": false,
"margin": {
"b": 10,
"l": 0,
"r": 0,
"t": 10
},
"paper_bgcolor": "rgba(0,0,0,0)",
"scene": { "scene": {
"aspectmode": "data",
"camera": { "camera": {
"up": { "up": {
"x": 0, "x": 0,
"y": 1, "y": 1,
"z": 0 "z": 0
} }
},
"xaxis": {
"showspikes": false,
"visible": false
},
"yaxis": {
"showspikes": false,
"visible": false
},
"zaxis": {
"showspikes": false,
"visible": false
} }
}, },
"showlegend": false,
"template": { "template": {
"data": { "data": {
"bar": [ "bar": [
@@ -8693,16 +8761,13 @@
"zerolinewidth": 2 "zerolinewidth": 2
} }
} }
},
"title": {
"text": "Frustums as Points"
} }
} }
}, },
"text/html": [ "text/html": [
"<div> <div id=\"13f4695b-25f7-42c5-a5f4-8b666fc017da\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"13f4695b-25f7-42c5-a5f4-8b666fc017da\")) { Plotly.newPlot( \"13f4695b-25f7-42c5-a5f4-8b666fc017da\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"marker\":{\"color\":\"forestgreen\",\"opacity\":1.0,\"size\":5},\"mode\":\"markers\",\"name\":\"Frustums -> Positions\",\"x\":[-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.19564640522003174,0.2934696078300476,0.3912927806377411,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.19754593074321747,0.2963188886642456,0.39509183168411255,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.19754593074321747,0.2963188886642456,0.39509183168411255,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.19564640522003174,0.2934696078300476,0.3912927806377411],\"y\":[0.19564640522003174,0.2934696078300476,0.3912927806377411,0.19754593074321747,0.2963188886642456,0.39509183168411255,0.19754593074321747,0.2963188886642456,0.39509183168411255,0.19564640522003174,0.2934696078300476,0.3912927806377411,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.06584864854812622,0.09877296537160873,0.13169728219509125,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411],\"z\":[-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107],\"type\":\"scatter3d\"}], {\"scene\":{\"camera\":{\"up\":{\"x\":0,\"y\":1,\"z\":0}}},\"title\":{\"text\":\"Frustums as PoiLine truncated "<div> <div id=\"6c83c18b-2a7d-4e63-aa7f-a250e1b97990\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"6c83c18b-2a7d-4e63-aa7f-a250e1b97990\")) { Plotly.newPlot( \"6c83c18b-2a7d-4e63-aa7f-a250e1b97990\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"marker\":{\"color\":\"forestgreen\",\"opacity\":1.0,\"size\":5},\"mode\":\"markers\",\"name\":\"Frustums -> Positions\",\"x\":[-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.19564640522003174,0.2934696078300476,0.3912927806377411,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.19754593074321747,0.2963188886642456,0.39509183168411255,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.19754593074321747,0.2963188886642456,0.39509183168411255,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.19564640522003174,0.2934696078300476,0.3912927806377411],\"y\":[0.19564640522003174,0.2934696078300476,0.3912927806377411,0.19754593074321747,0.2963188886642456,0.39509183168411255,0.19754593074321747,0.2963188886642456,0.39509183168411255,0.19564640522003174,0.2934696078300476,0.3912927806377411,0.06584864854812622,0.09877296537160873,0.13169728219509125,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.06650062650442123,0.09975093603134155,0.13300123810768127,0.06584864854812622,0.09877296537160873,0.13169728219509125,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,-0.06650062650442123,-0.09975093603134155,-0.13300123810768127,-0.06584864854812622,-0.09877296537160873,-0.13169728219509125,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.19754593074321747,-0.2963188886642456,-0.39509183168411255,-0.19564640522003174,-0.2934696078300476,-0.3912927806377411],\"z\":[-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.330012559890747,-1.995018720626831,-2.660024881362915,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.3169728517532349,-1.9754592180252075,-2.6339454650878906,-1.304309368133545,-1.9564639329910278,-2.6086184978485107],\"type\":\"scatter3d\"}], {\"hovermode\":false,\"margin\":{\"b\":10,\"l\":0,\"r\":0,\"t\":10},\"paper_bgcolor\":\"rgba(0,0Line truncated
" \n", " \n",
"var gd = document.getElementById('13f4695b-25f7-42c5-a5f4-8b666fc017da');\n", "var gd = document.getElementById('6c83c18b-2a7d-4e63-aa7f-a250e1b97990');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n", "var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n", " var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n", " if (!display || display === 'none') {{\n",
@@ -8733,11 +8798,8 @@
], ],
"source": [ "source": [
"# COLLAPSED\n", "# COLLAPSED\n",
"fig = go.Figure(\n", "fig = go.Figure(data=[vis_rays, vis.get_frustum_points(ray_samples.frustums)], layout=webdocs_layout)\n",
" data=[vis_rays, vis.get_frustum_points(ray_samples.frustums)],\n", "fig.show()"
" layout=go.Layout(scene_camera=dict(up=dict(x=0, y=1, z=0)), title=\"Frustums as Points\"),\n",
")\n",
"fig.show()\n"
] ]
}, },
{ {
@@ -9037,7 +9099,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FFA15A", "color": "#FF6692",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -10250,7 +10312,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#00CC96", "color": "#EF553B",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -12676,7 +12738,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -15102,7 +15164,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#B6E880", "color": "#19D3F3",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -17528,7 +17590,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#00CC96", "color": "#B6E880",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -18741,7 +18803,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FFA15A", "color": "#AB63FA",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -21167,7 +21229,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -22380,7 +22442,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF97FF", "color": "#EF553B",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -23593,7 +23655,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF97FF", "color": "#FF6692",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -24806,7 +24868,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#636EFA", "color": "#B6E880",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -26019,7 +26081,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF97FF", "color": "#EF553B",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -27232,7 +27294,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#FF97FF",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -28445,7 +28507,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#FFA15A",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -29658,7 +29720,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#AB63FA", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -30871,7 +30933,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FECB52", "color": "#FF97FF",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -32084,7 +32146,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -33297,7 +33359,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#19D3F3", "color": "#FF97FF",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -34510,7 +34572,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#636EFA", "color": "#FF6692",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -35723,7 +35785,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#AB63FA",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -36936,7 +36998,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -38149,7 +38211,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FECB52", "color": "#FFA15A",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -39362,7 +39424,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#636EFA", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -40575,7 +40637,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#19D3F3",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -41788,7 +41850,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#00CC96", "color": "#FF97FF",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -43001,7 +43063,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#19D3F3", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -44214,7 +44276,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -45427,7 +45489,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -46640,7 +46702,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#19D3F3", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -47853,7 +47915,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FECB52", "color": "#00CC96",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -49066,7 +49128,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#AB63FA", "color": "#FFA15A",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -50279,7 +50341,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#B6E880", "color": "#AB63FA",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -51492,7 +51554,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FFA15A", "color": "#FF6692",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -53918,7 +53980,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF97FF", "color": "#EF553B",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -55131,7 +55193,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#B6E880", "color": "#FFA15A",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -56344,7 +56406,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -57557,7 +57619,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF97FF", "color": "#EF553B",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -58770,7 +58832,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#B6E880",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -59983,7 +60045,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#00CC96", "color": "#FF6692",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -61196,7 +61258,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#636EFA", "color": "#19D3F3",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -63622,7 +63684,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#FF6692", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -64835,7 +64897,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#EF553B", "color": "#FF97FF",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -66048,7 +66110,7 @@
}, },
{ {
"alphahull": 0, "alphahull": 0,
"color": "#636EFA", "color": "#FECB52",
"name": "ellipse", "name": "ellipse",
"opacity": 0.5, "opacity": 0.5,
"type": "mesh3d", "type": "mesh3d",
@@ -67261,15 +67323,37 @@
} }
], ],
"layout": { "layout": {
"hovermode": false,
"margin": {
"b": 10,
"l": 0,
"r": 0,
"t": 10
},
"paper_bgcolor": "rgba(0,0,0,0)",
"scene": { "scene": {
"aspectmode": "data",
"camera": { "camera": {
"up": { "up": {
"x": 0, "x": 0,
"y": 1, "y": 1,
"z": 0 "z": 0
} }
},
"xaxis": {
"showspikes": false,
"visible": false
},
"yaxis": {
"showspikes": false,
"visible": false
},
"zaxis": {
"showspikes": false,
"visible": false
} }
}, },
"showlegend": false,
"template": { "template": {
"data": { "data": {
"bar": [ "bar": [
@@ -68085,16 +68169,13 @@
"zerolinewidth": 2 "zerolinewidth": 2
} }
} }
},
"title": {
"text": "Frustums as Gaussians"
} }
} }
}, },
"text/html": [ "text/html": [
"<div> <div id=\"846d9c03-74c2-45b3-92a1-7f10fdbb6730\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"846d9c03-74c2-45b3-92a1-7f10fdbb6730\")) { Plotly.newPlot( \"846d9c03-74c2-45b3-92a1-7f10fdbb6730\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"marker\":{\"color\":\"black\",\"size\":2},\"mode\":\"markers\",\"name\":\"Means\",\"x\":[-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.20363198220729828,0.29885435104370117,0.3953476548194885,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.2056090384721756,0.3017559051513672,0.39918604493141174,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.2056090384721756,0.3017559051513672,0.39918604493141174,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.20363198220729828,0.29885435104370117,0.3953476548194885],\"y\":[0.20363198220729828,0.29885435104370117,0.3953476548194885,0.2056090384721756,0.3017559051513672,0.39918604493141174,0.2056090384721756,0.3017559051513672,0.39918604493141174,0.20363198220729828,0.29885435104370117,0.3953476548194885,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.06853634864091873,0.10058531165122986,0.13306201994419098,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885],\"z\":[-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204],\"type\":\"scatter3d\"},{\"alphahull\":0,\"color\":\"#FFA15A\",\"name\":\"ellipse\",\"opacity\":0.5,\"x\":[-0.14898040890693665,-0.14472253620624542,-0.14207154512405396,-0.141099Line truncated "<div> <div id=\"dc30f499-8e5d-42a4-a8d0-ba8c139de9a7\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"dc30f499-8e5d-42a4-a8d0-ba8c139de9a7\")) { Plotly.newPlot( \"dc30f499-8e5d-42a4-a8d0-ba8c139de9a7\", [{\"line\":{\"color\":\"teal\",\"width\":1},\"mode\":\"lines\",\"name\":\"Ray Bundle\",\"x\":[0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.14962640404701233,0.0,0.14962640404701233,0.0,0.4444783329963684,0.0,-0.4402044117450714,0.0,-0.1481594443321228,0.0,0.1481594443321228,0.0,0.4402044117450714],\"y\":[0.0,0.4402044117450714,0.0,0.4444783329963684,0.0,0.4444783329963684,0.0,0.4402044117450714,0.0,0.1481594443321228,0.0,0.14962640404701233,0.0,0.14962640404701233,0.0,0.1481594443321228,0.0,-0.1481594443321228,0.0,-0.14962640404701233,0.0,-0.14962640404701233,0.0,-0.1481594443321228,0.0,-0.4402044117450714,0.0,-0.4444783329963684,0.0,-0.4444783329963684,0.0,-0.4402044117450714],\"z\":[0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.992527961730957,0.0,-2.992527961730957,0.0,-2.963188886642456,0.0,-2.9346959590911865,0.0,-2.963188886642456,0.0,-2.963188886642456,0.0,-2.9346959590911865],\"type\":\"scatter3d\"},{\"marker\":{\"color\":\"black\",\"size\":2},\"mode\":\"markers\",\"name\":\"Means\",\"x\":[-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.20363198220729828,0.29885435104370117,0.3953476548194885,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.2056090384721756,0.3017559051513672,0.39918604493141174,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.2056090384721756,0.3017559051513672,0.39918604493141174,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.20363198220729828,0.29885435104370117,0.3953476548194885],\"y\":[0.20363198220729828,0.29885435104370117,0.3953476548194885,0.2056090384721756,0.3017559051513672,0.39918604493141174,0.2056090384721756,0.3017559051513672,0.39918604493141174,0.20363198220729828,0.29885435104370117,0.3953476548194885,0.06853634864091873,0.10058531165122986,0.13306201994419098,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.06921494007110596,0.10158122330904007,0.13437949120998383,0.06853634864091873,0.10058531165122986,0.13306201994419098,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,-0.06921494007110596,-0.10158122330904007,-0.13437949120998383,-0.06853634864091873,-0.10058531165122986,-0.13306201994419098,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.2056090384721756,-0.3017559051513672,-0.39918604493141174,-0.20363198220729828,-0.29885435104370117,-0.3953476548194885],\"z\":[-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3842988014221191,-2.0316245555877686,-2.6875898838043213,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3707268238067627,-2.0117061138153076,-2.661240339279175,-1.3575464487075806,-1.9923622608184814,-2.635650873184204],\"type\":\"scatter3d\"},{\"alphahull\":0,\"color\":\"#FF6692\",\"name\":\"ellipse\",\"opacity\":0.5,\"x\":[-0.14898040890693665,-0.14472253620624542,-0.14207154512405396,-0.141099Line truncated
" \n", " \n",
"var gd = document.getElementById('846d9c03-74c2-45b3-92a1-7f10fdbb6730');\n", "var gd = document.getElementById('dc30f499-8e5d-42a4-a8d0-ba8c139de9a7');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n", "var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n", " var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n", " if (!display || display === 'none') {{\n",
@@ -68127,9 +68208,9 @@
"# COLLAPSED\n", "# COLLAPSED\n",
"fig = go.Figure(\n", "fig = go.Figure(\n",
" data=[vis_rays] + vis.get_gaussian_ellipsoids_list(ray_samples.frustums.flatten().get_gaussian_blob()),\n", " data=[vis_rays] + vis.get_gaussian_ellipsoids_list(ray_samples.frustums.flatten().get_gaussian_blob()),\n",
" layout=go.Layout(scene_camera=dict(up=dict(x=0, y=1, z=0)), title=\"Frustums as Gaussians\"),\n", " layout=webdocs_layout,\n",
")\n", ")\n",
"fig.show()\n" "fig.show()"
] ]
} }
], ],
File diff suppressed because it is too large. Load diff
+11 -3
View File
@@ -54,13 +54,21 @@ conda install -c conda-forge pandoc
Run the following to build the documentation: Run the following to build the documentation:
```bash ```bash
cd docs python scripts/docs/build_docs.py
make clean
make html
``` ```
Rerun `make html` when documentation changes are made, `make clean` is necissary if the documentation structure changes. Rerun `make html` when documentation changes are made, `make clean` is necissary if the documentation structure changes.
### Notebooks
We support jupyter notbooks in our documentation. To improve the readability, the following custom tags can be added to the top of each code cell to hide or collapse the code.
| Tag | Effect |
| ------------- | ---------------------------------------------------- |
| # HIDDEN | Hide code block and output |
| # COLLAPSED | Collapse the code in a dropdown but show the restuls |
| # OUTPUT_ONLY | Only show the cell's output |
### Auto build ### Auto build
If you want the code to build on save you can use [sphinx autobuild](https://github.com/executablebooks/sphinx-autobuild). If changes to the structure are made, the build files may be incorrect. If you want the code to build on save you can use [sphinx autobuild](https://github.com/executablebooks/sphinx-autobuild). If changes to the structure are made, the build files may be incorrect.
+6 -6
View File
@@ -338,28 +338,28 @@ class EquirectangularCamera(Camera):
s_theta = torch.sin(theta) s_theta = torch.sin(theta)
c_theta = torch.cos(theta) c_theta = torch.cos(theta)
directions = torch.cat([c_theta * s_phi, s_theta * s_phi, c_phi], dim=-1) directions = torch.cat([c_theta * s_phi, c_phi, s_theta * s_phi], dim=-1)
origins = camera_to_world[..., :3, 3] # (num_rays, 3) origins = camera_to_world[..., :3, 3] # (num_rays, 3)
## Calculate area directly ## Calculate area directly
dirx_min = normalize( dirx_min = normalize(
torch.cat([torch.cos(d_theta_min) * s_phi, torch.sin(d_theta_min) * s_phi, c_phi], -1), dim=-1 torch.cat([torch.cos(d_theta_min) * s_phi, c_phi, torch.sin(d_theta_min) * s_phi], -1), dim=-1
) )
dirx_max = normalize( dirx_max = normalize(
torch.cat([torch.cos(d_theta_max) * s_phi, torch.sin(d_theta_max) * s_phi, c_phi], -1), dim=-1 torch.cat([torch.cos(d_theta_max) * s_phi, c_phi, torch.sin(d_theta_max) * s_phi], -1), dim=-1
) )
diry_min = normalize( diry_min = normalize(
torch.cat([c_theta * torch.sin(d_phi_min), s_theta * torch.sin(d_phi_min), torch.cos(d_phi_min)], -1), torch.cat([c_theta * torch.sin(d_phi_min), torch.cos(d_phi_min), s_theta * torch.sin(d_phi_min)], -1),
dim=-1, dim=-1,
) )
diry_max = normalize( diry_max = normalize(
torch.cat([c_theta * torch.sin(d_phi_max), s_theta * torch.sin(d_phi_max), torch.cos(d_phi_max)], -1), torch.cat([c_theta * torch.sin(d_phi_max), torch.cos(d_phi_max), s_theta * torch.sin(d_phi_max)], -1),
dim=-1, dim=-1,
) )
dx = torch.sqrt(torch.sum((dirx_max - dirx_min) ** 2, dim=-1)) dx = torch.sqrt(torch.sum((dirx_max - dirx_min) ** 2, dim=-1))
dy = torch.sqrt(torch.sum((diry_max - diry_min) ** 2, dim=-1)) dy = torch.sqrt(torch.sum((diry_max - diry_min) ** 2, dim=-1))
pixel_area = dx * dy pixel_area = dx * dy
return RayBundle(origins=origins, directions=directions, pixel_area=pixel_area) return RayBundle(origins=origins, directions=directions, pixel_area=pixel_area[..., None])
def get_intrinsics_from_intrinsics_matrix(intrinsics_matrix: TensorType[3, 3]): def get_intrinsics_from_intrinsics_matrix(intrinsics_matrix: TensorType[3, 3]):
+55
View File
@@ -24,6 +24,7 @@ import torch
from plotly import express as ex from plotly import express as ex
from torchtyping import TensorType from torchtyping import TensorType
from nerfactory.cameras.cameras import Camera
from nerfactory.cameras.rays import Frustums, RayBundle from nerfactory.cameras.rays import Frustums, RayBundle
from nerfactory.utils.math import Gaussians from nerfactory.utils.math import Gaussians
@@ -435,3 +436,57 @@ def get_ray_bundle_lines(
name="Ray Bundle", name="Ray Bundle",
line=dict(color=color, width=width), line=dict(color=color, width=width),
) )
def vis_camera_rays(camera: Camera) -> go.Figure:
"""Visualize camera rays.
Args:
camera: Camera to visualize.
Returns:
Plotly lines
"""
coords = camera.get_image_coords()
coords[..., 0] /= camera.get_image_height()
coords[..., 1] /= camera.get_image_width()
coords = torch.cat([coords, torch.ones((*coords.shape[:-1], 1))], dim=-1)
ray_bundle = camera.get_camera_ray_bundle()
origins = ray_bundle.origins.view(-1, 3)
directions = ray_bundle.directions.view(-1, 3)
coords = coords.view(-1, 3)
lines = torch.empty((origins.shape[0] * 2, 3))
lines[0::2] = origins
lines[1::2] = origins + directions
colors = torch.empty((coords.shape[0] * 2, 3))
colors[0::2] = coords
colors[1::2] = coords
fig = go.Figure(
data=go.Scatter3d(
x=lines[:, 0],
y=lines[:, 2],
z=lines[:, 1],
marker=dict(
size=4,
color=colors,
),
line=dict(color="lightblue", width=1),
)
)
fig.update_layout(
scene=dict(
xaxis=dict(title="x", showspikes=False),
yaxis=dict(title="z", showspikes=False),
zaxis=dict(title="y", showspikes=False),
),
margin=dict(r=0, b=10, l=0, t=10),
hovermode=False,
)
return fig
+16 -7
View File
@@ -19,6 +19,7 @@ def run_command(command: str, continue_on_fail: bool = False) -> None:
if not continue_on_fail and ret_code != 0: if not continue_on_fail and ret_code != 0:
print(f"\033[31mError: `{command}` failed. Exiting...\033[0m") print(f"\033[31mError: `{command}` failed. Exiting...\033[0m")
sys.exit(1) sys.exit(1)
return ret_code == 0
def main(continue_on_fail: bool = False): def main(continue_on_fail: bool = False):
@@ -32,6 +33,8 @@ def main(continue_on_fail: bool = False):
steps = my_dict["jobs"]["build"]["steps"] steps = my_dict["jobs"]["build"]["steps"]
print_green = lambda x: print(f"\033[32m{x}\033[0m") print_green = lambda x: print(f"\033[32m{x}\033[0m")
print_red = lambda x: print(f"\033[31m{x}\033[0m")
success = True
for step in steps: for step in steps:
if "name" in step and step["name"] in LOCAL_TESTS: if "name" in step and step["name"] in LOCAL_TESTS:
@@ -41,21 +44,27 @@ def main(continue_on_fail: bool = False):
print("*" * 100) print("*" * 100)
print_green(f"Running: {curr_command}") print_green(f"Running: {curr_command}")
run_command(curr_command, continue_on_fail=continue_on_fail) success = success and run_command(curr_command, continue_on_fail=continue_on_fail)
else: else:
print("*" * 100) print("*" * 100)
print(f"Skipping {step}") print(f"Skipping {step}")
# Add checks for building documentation # Add checks for building documentation
print_green("Adding notebook documentation metadata") print_green("Adding notebook documentation metadata")
run_command("python scripts/docs/add_nb_tags.py") success = success and run_command("python scripts/docs/add_nb_tags.py")
print_green("Building Documentation") print_green("Building Documentation")
run_command("cd docs/; make html SPHINXOPTS='-W;'") success = success and run_command("cd docs/; make html SPHINXOPTS='-W;'")
print("\n") if success:
print_green("=" * 100) print("\n")
print_green("ALL CHECKS PASSED") print_green("=" * 100)
print_green("=" * 100) print_green("ALL CHECKS PASSED")
print_green("=" * 100)
else:
print("\n")
print_red("=" * 100)
print_red("ERRORS FOUND")
print_red("=" * 100)
if __name__ == "__main__": if __name__ == "__main__":