Skip to content

Commit

Permalink
feat(rerun): add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanpaget authored Dec 12, 2023
1 parent bb3bc23 commit 732608f
Showing 1 changed file with 65 additions and 6 deletions.
71 changes: 65 additions & 6 deletions docs/en/1-Experiments/Notebooks/ReRun_EN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,40 @@
"id": "759d2169",
"metadata": {},
"source": [
"But that's not that impressive. ReRun shines when we view multi-model time-series data. Run the following code and interact with the ReRun Viewer. You can rotate the image and scan forward and backward in time."
"## DNA\n",
"\n",
"This is a minimal example that logs synthetic 3D data in the shape of a double helix. The underlying data is generated\n",
"using numpy and visualized using Rerun.\n",
"\n",
"### How it was made\n",
"\n",
"The full source code for this example is available\n",
"[on GitHub](https://github.com/rerun-io/rerun/blob/latest/examples/python/dna/main.py).\n",
"\n",
"#### Colored 3D points\n",
"\n",
"The colored 3D points were added to the scene by logging the\n",
"[rr.Points3D archetype](https://www.rerun.io/docs/reference/types/archetypes/points3d) to the\n",
"[helix/structure/left](recording://helix/structure/left) and [helix/structure/right](recording://helix/structure/right)\n",
"entities.\n",
"\n",
"#### 3D line strips\n",
"\n",
"The 3D line strips connecting the 3D point pairs are logged as an\n",
"[rr.LineStrips3D archetype](https://www.rerun.io/docs/reference/types/archetypes/line_strips3d) to the\n",
"[helix/structure/scaffolding entity](recording://helix/structure/scaffolding).\n",
"\n",
"#### Rotation\n",
"\n",
"The whole structure is rotated over time by logging a\n",
"[rr.Transform3D archetype](https://www.rerun.io/docs/reference/types/archetypes/transform3d) to the\n",
"[helix/structure entity](recording://helix/structure.Transform3D) that changes over time. This transform determines the rotation of\n",
"the [structure entity](recording://helix/structure) relative to the [helix](recording://helix) entity. Since all other\n",
"entities are children of [helix/structure](recording://helix/structure) they will also rotate based on this transform.\n",
"\n",
"You can visualize this rotation by selecting the two entities on the left-hand side and activating `Show transform` in\n",
"the Blueprint settings on the right-hand side. You will see one static frame (i.e., the frame of\n",
"[helix](recording://helix)) and the rotating frame (i.e., the frame of [structure](recording://helix/structure)).\n"
]
},
{
Expand Down Expand Up @@ -212,18 +245,44 @@
"rec.show(width=1024, height=768)"
]
},
{
"cell_type": "markdown",
"id": "cb0cbca9",
"metadata": {},
"source": [
"## Plots\n",
"\n",
"But that's not that impressive. ReRun shines when we view multi-model time-series data. The following code example shows rerun displaying simple plots corresponding to different reading on the same time-series data. This example shows various plot types that you can create using Rerun. Common usecases for such plots would be logging\n",
"losses or metrics over time, histograms, or general function plots.\n",
"\n",
"### How it was made\n",
"The full source code for this example is available [on GitHub](https://github.com/rerun-io/rerun/blob/latest/examples/python/plots/main.py).\n",
"\n",
"#### Bar charts\n",
"The [bar chart](recording://bar_chart) is created by logging the [rr.BarChart archetype](https://www.rerun.io/docs/reference/types/archetypes/bar_chart).\n",
"\n",
"#### Time series\n",
"All other plots are created using the\n",
"[rr.TimeSeriesScalar archetype](https://www.rerun.io/docs/reference/types/archetypes/bar_chart)\n",
"with different settings. Each plot is created by logging scalars at different time steps (i.e., the x-axis).\n",
"\n",
"For the [parabola](recording://curves/parabola) the radius and color is changed over time.\n",
"\n",
"[sin](recording://trig/sin) and [cos](recording://trig/cos) are logged with the same parent entity (i.e.,\n",
"`trig/{cos,sin}`) which will put them in the same view by default.\n",
"\n",
"For the [classification samples](recording://classification/samples) `rr.TimeSeriesScalar(..., scatter=True)` is used to\n",
"create separate points that do not connect over time. Note, that in the other plots the logged scalars are connected\n",
"over time by lines."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "de21e1f2",
"metadata": {},
"outputs": [],
"source": [
"#!/usr/bin/env python3\n",
"\"\"\"\n",
"Demonstrates how to log simple plots with the Rerun SDK.\n",
"\n",
"\"\"\"\n",
"from __future__ import annotations\n",
"\n",
"import argparse\n",
Expand Down

0 comments on commit 732608f

Please sign in to comment.