Skip to content

feat(web): interactive f(x,y) 3D surface charts with numerical sampling and WebGL - #294

Draft
PawelTroka wants to merge 6 commits into
masterfrom
feature/web-interactive-fxy-surfaces-20261025
Draft

PawelTroka wants to merge 6 commits into
masterfrom
feature/web-interactive-fxy-surfaces-20261025

Conversation

@PawelTroka

@PawelTroka PawelTroka commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Scope / issue

Addresses the web explicit f(x,y) surface workstream in #292. Draft; do not merge without owner approval.

Implementation

  • Keep the existing POST /api/v2/chart PNG behavior for real and complex charts. For explicit Fxy functions, evaluate a bounded 9–129 squared grid in the existing trusted-local worker using the same mode determiner, Roslyn expression evaluator, and unsaved two-argument custom definitions.
  • Return structured kind: surface JSON with finite/undefined samples, x/y coordinate arrays and exact counts. Represent singular/NaN/Infinity locations as null holes; reject empty surfaces, invalid requests, unsupported implicit 3D and excessive sampling.
  • Lazily load a pinned offline Plotly gl3d bundle only for surface charts. Interactive rotation and scroll/touch zoom, numeric axes, hover labels, responsive resize without reevaluating, and downloadable composed PNG.
  • Keep request cancellation, late-response guards, bounded execution workers and existing Windows desktop code intact.

Tests

  • Replace the ignored legacy GET 3D image test with passing intended JSON API contract tests and remove the test-result skip allowlist.
  • Windows HTTP integration tests assert paraboloid/plane/trigonometric values, custom-function isolation, singular holes, entirely invalid domains, invalid size limits and sampler cancellation.
  • Chromium/Firefox Playwright tests exercise actual WebGL rotation/zoom, image export, resize, malformed grids, cancelling a pending 3D request and unsaved definitions (deterministic API response).
  • Separate published Windows real-API/browser E2E test checks numerical samples, visible 3D behavior and PNG export without mocks.
  • Documentation: Web 3D architecture, commands and remaining portability limits.

Completed exact-head validation (verified 2026-10-27): all 21/21 GitHub Actions workflows succeeded on 9fc1b7949fab5dab4cd3ce04cfef2bf944511b01, including real Windows API/browser E2E: 12/12 real Chromium/Firefox Playwright scenarios, interactive 3D camera movement, real sampled paraboloid and composed PNG export. The focused frontend, Linux browser, solution, Mono, installer and release workflows also completed successfully. Linux headless Firefox's unavailable WebGL is correctly reported as unsupported; unsupported hardware context is not counted as a successful interactive render.

Remaining limitations (not covered here)

  • Windows-only dependencies in the full Web API; browser access from another OS is not standalone macOS/Linux API packaging.
  • This Web PR alone does not ship the native Mono viewer. Independent draft #296 now implements and verifies it; cross-branch candidate #300 is validating their integration. macOS GUI acceptance/architectures remain unverified.
  • Implicit surfaces, scripted plot series, multi-function overlay and other 2D/complex interactions in parity across all platform OR release blockers: f(x,y) charts support in Mac OS, Linux and Web #292 still need separate work.
  • Legacy GET /api/chart/2y bitmap rendering is deliberately not represented as fixed by the new JSON surface contract.

Review / acceptance

Please review API format compatibility, security/resource limits, cross-browser WebGL behavior, image export and Windows worker isolation evidence. Leave this PR in Draft until the owner explicitly authorizes merge.

Cross-platform integration audit — 2026-10-27

  • Independent original heads: Web feat(web): interactive f(x,y) 3D surface charts with numerical sampling and WebGL #294 21/21 workflows green (9fc1b794), Mono feat(mono): native interactive f(x,y) 3D surfaces in Linux WinForms #296 21/21 green (4769084a). The source changes touch disjoint file paths; this alone is not evidence of integrated behavior.
  • Isolated draft combined PR #300 contains both implementations and is running a new 21-workflow matrix, including native X11 and real browser/API acceptance. Its refreshed candidate also carries feat(mono): native interactive f(x,y) 3D surfaces in Linux WinForms #296's right-drag PNG export fix and explicit 33×33 shared numerical fixtures.
  • Shared semantics: both evaluate explicit real Function.Evaluate(x,y), interpolate row-major coordinates with the same weighted formula, retain non-finite holes and support unsaved two-argument custom functions. Interactive resizing uses cached samples; rendering technologies need not produce pixel-identical output.
  • Intentional differences: Web API 9–129 grid/axis, offline Plotly/WebGL, cancellable isolated worker, 1200×800 composed PNG; Mono 17–97 grid/axis, bounded CPU software rasterization, synchronous trusted-local evaluation, native 3D point series and viewport/export-specific image sizes.
  • Remaining limits: Very sparse domains may provide finite points but no drawable triangles; browser WebGL availability varies; Mono rejects finite bounds whose spans overflow; Mono has no asynchronous cancellation and can block the UI. Windows-dependent API hosting, implicit surfaces, macOS GUI certification and general 3D workflow parity remain outside these two PRs.
  • Both source PRs and integration PR remain Draft and unmerged. An owner approval is still required before any merge.

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.

1 participant