julia set notebook#64
Merged
Merged
Conversation
Copilot stopped reviewing on behalf of
koaning due to an error
June 12, 2026 09:49
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new interactive Marimo notebook that visualizes Julia sets using discrete Lagrangian descriptors (computed on GPU via PyTorch) and updates the gallery README to link to it.
Changes:
- Introduces
julia-lagrangian-descriptors.pyMarimo notebook with GPU-accelerated DLD computation, interactive controls, path-based animation, and MP4 export. - Adds a README gallery entry pointing to the new notebook.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| notebooks/math/julia-lagrangian-descriptors.py | New Marimo notebook implementing DLD-based Julia set visualization, interactive parameter UI, animation controls, and export pipeline. |
| README.md | Adds a gallery row linking to the new Julia/DLD notebook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+160
to
+163
| res=mo.ui.dropdown( | ||
| {"400 (fast)": 400, "600": 600, "800": 800, "1000 (slow)": 1000}, | ||
| value="600", label="Resolution", | ||
| ), |
Comment on lines
+274
to
+277
| live_res = mo.ui.dropdown( | ||
| {"250 (smooth)": 250, "350": 350, "500 (detail)": 500}, | ||
| value="350", label="Live resolution", | ||
| ) |
Comment on lines
+85
to
+96
| def quadratic_map_on_sphere(w1, w2, w3, a, b): | ||
| """One step of f(z) = z^2 + (a + i b) lifted onto the sphere S^2.""" | ||
| w3m1 = (1 - w3) ** 2 | ||
| safe = torch.isclose(w3m1, torch.zeros_like(w3m1)) | ||
| one = torch.ones_like(w1) | ||
| r12 = torch.where(safe, one, w1 * w2 / w3m1) | ||
| r1 = torch.where(safe, one, w1 * w1 / w3m1) | ||
| r2 = torch.where(safe, one, w2 * w2 / w3m1) | ||
| q1 = (b + 2 * r12) ** 2 | ||
| q2 = a + r1 - r2 | ||
| den = 1 + q1 + q2 * q2 | ||
| return 2 * q2 / den, (2 * b + 4 * r12) / den, (q1 + q2 * q2 - 1) / den |
Comment on lines
+109
to
+113
| def edge_gradient(field): | ||
| """Centered finite-difference magnitude: spikes on the singular (Julia) set.""" | ||
| gy = torch.roll(field, 1, 0) - torch.roll(field, -1, 0) | ||
| gx = torch.roll(field, 1, 1) - torch.roll(field, -1, 1) | ||
| return torch.sqrt(gx * gx + gy * gy) |
Comment on lines
+16
to
+20
| app = marimo.App( | ||
| width="medium", | ||
| css_file="/usr/local/_marimo/custom.css", | ||
| auto_download=["html"], | ||
| ) |
Comment on lines
+74
to
+76
| # GPU-accelerated core (PyTorch / CUDA, float64 for parity with NumPy). | ||
| _DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu") | ||
| _DTYPE = torch.float64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.