Skip to content

Commit 4df00fc

Browse files
committed
Sway the 3D README animation around the view into the cut-out
1 parent 1c0c194 commit 4df00fc

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎docs/_static/readme/learnerND.gif‎

-13.6 KB
Loading

‎docs/make_animations.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ def learnerND(target: Path) -> None:
205205
nframes = 90
206206
figures = []
207207
for i in range(nframes):
208-
angle = np.pi / 4 + 2 * np.pi * i / nframes # start looking into the cut
208+
# Sway back and forth around the view into the cut.
209+
angle = np.pi / 4 + np.radians(45) * np.sin(2 * np.pi * i / nframes)
209210
eye = {"x": 2 * np.cos(angle), "y": 2 * np.sin(angle), "z": 0.25}
210211
figures.append(go.Figure(fig).update_layout(scene_camera_eye=eye))
211212
with tempfile.TemporaryDirectory() as folder:

0 commit comments

Comments
 (0)