Skip to content

julia set notebook#64

Merged
koaning merged 1 commit into
mainfrom
koaning/medan-v3
Jun 12, 2026
Merged

julia set notebook#64
koaning merged 1 commit into
mainfrom
koaning/medan-v3

Conversation

@koaning

@koaning koaning commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 09:49
@koaning koaning merged commit 58e2009 into main Jun 12, 2026
2 checks passed
@koaning koaning deleted the koaning/medan-v3 branch June 12, 2026 09:49
Copilot stopped reviewing on behalf of koaning due to an error June 12, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py Marimo 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants