Skip to content

Integrate paper-style examples and repair 01_basic_polygon.ipynb plotting/runtime path - #4

Merged
QL-UoHull merged 2 commits into
mainfrom
copilot/copilotpaper-style-examples
Jul 16, 2026
Merged

QL-UoHull merged 2 commits into
mainfrom
copilot/copilotpaper-style-examples

Conversation

Copilot AI commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

This PR proposes the copilot/paper-style-examples updates into main: richer, paper-style example outputs and a notebook reliability fix. It expands the examples surface/contour story and resolves the 01_basic_polygon.ipynb execution issues (3D plotting + local import-path handling).

  • examples/demo.py: paper-style example expansion

    • Adds multi-panel delta evolution, smoothness-order (n) comparison, freeform curve gallery, partition/summed-basis surfaces, and an additional wireframe surface view.
    • Keeps the original basic polygon demos while extending output coverage to match Li & Tian-style figure patterns.
  • python/implicit_spline/visualization.py: reusable plotting helpers for advanced figures

    • Adds/extends helpers for:
      • smoothness-order comparisons,
      • paper-style contour panel generation,
      • polygon-outline rendering,
      • partition-basis wireframe surface composition,
      • optional wireframe/view controls for 3D surfaces.
  • notebooks/01_basic_polygon.ipynb: execution and plotting repair

    • Replaces 2D subplot target axes with explicit 3D axes for surface plots.
    • Makes local import setup robust across common launch locations (repo root / notebooks context).
    • Cleans the affected parameters/smoothness section and uses the helper-based smoothness comparison flow.
  • examples/README.md: examples documentation refresh

    • Updates the examples overview to reflect the expanded paper-style demo capabilities.
# notebook pattern used for surface sections (3D-safe)
fig = plt.figure(figsize=(11, 4))
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2, projection='3d')

draw_imp_spline(P_square, delta=delta, n=n, N=N, ax=ax1, title='Contour plot')
draw_surface(P_square, delta=delta, n=n, N=80, ax=ax2, title='Surface plot')

Copilot AI changed the title [WIP] Update examples with enhanced paper-style visuals and notebook fixes Integrate paper-style examples and repair 01_basic_polygon.ipynb plotting/runtime path Jul 16, 2026
Copilot AI requested a review from QL-UoHull July 16, 2026 14:05
@QL-UoHull
QL-UoHull marked this pull request as ready for review July 16, 2026 14:09
Copilot AI review requested due to automatic review settings July 16, 2026 14:09
@QL-UoHull
QL-UoHull merged commit 3f8b0d0 into main Jul 16, 2026
@QL-UoHull
QL-UoHull deleted the copilot/copilotpaper-style-examples branch July 16, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the project’s Python examples to better match the multi-panel / paper-style figures from Li & Tian (2009), and fixes reliability issues in the basic notebook (notably 3D plotting axes and local import-path handling) so it runs consistently in common environments (Colab, repo root, notebooks/).

Changes:

  • Extend examples/demo.py from the original 4 examples to a larger “paper-style” set (delta panels, smoothness-order comparison, freeform gallery, partition/summed-basis surfaces, and an extra wireframe surface view).
  • Add/extend reusable visualization helpers (e.g., compare_n, panel_delta_shapes, partition_basis_surfaces, and draw_surface wireframe/view controls) to support these richer figures.
  • Repair notebooks/01_basic_polygon.ipynb execution by making surface plotting explicitly 3D-safe and making local imports more robust.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
notebooks/01_basic_polygon.ipynb Fixes runtime reliability (robust sys.path setup) and corrects surface plotting by using explicit 3D axes; adopts helper-based smoothness comparison.
examples/demo.py Expands the standalone demo into a richer, paper-style set of examples and uses shared plotting helpers for consistent figures.
python/implicit_spline/visualization.py Provides/extends plotting helper functions needed by the new demo/notebook (including compare_n, multi-panel contour helpers, and 3D surface options).
examples/README.md Updates examples documentation to reflect the expanded demo and paper-style figure capabilities.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants