feat(3d): cross-backend 3D animation parity + stable ASCII axes#1829
Merged
krystophny merged 1 commit intomainfrom May 7, 2026
Merged
feat(3d): cross-backend 3D animation parity + stable ASCII axes#1829krystophny merged 1 commit intomainfrom
krystophny merged 1 commit intomainfrom
Conversation
Adds a 3D Lissajous animation example that exercises the same FuncAnimation/save_animation pipeline for .mp4 (raster -> ffmpeg) and .txt (ASCII frames replayable via fortplot_play_ascii). A new test_3d_backend_parity asserts that 3D line and 3D surface plots render to PNG, PDF, and ASCII, and that 3D animation produces the expected frame count in .txt. Quality fix: ASCII axis lines were rendered using a character derived from the active plot color, so animation frames flickered between '*', '#', etc. as the rendering pipeline cycled colors. The axis frame is now drawn with stable '-'/'|' chars; data lines still pick chars by color, which is what users care about. The Issue #355 regression test was passing accidentally on the old axis tint and is updated to assert the actual data line characters (stricter, not weaker). Side-effect: fix path_is_directory in update_example_index so that example/fortran/README.md is no longer misclassified as an example dir (it slipped through ls-based probing). The auto-generated index now omits the bogus "Readme.md" entry, restoring strict alphabetical sort.
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.
Summary
example/fortran/3d_animation_demo) that drives the sameFuncAnimation+save_animationpipeline through.mp4(raster + ffmpeg) and.txt(ASCII frames replayable viafortplot_play_ascii).test_3d_backend_paritycovering 3D line + 3D surface to PNG/PDF/ASCII and 3D animation to.txt, asserting non-empty output and correct frame count.*,#, etc. as the rendering pipeline cycled colors. Axes now use-/|; data lines still pick chars by color.path_is_directoryinupdate_example_indexwas usinglsand misclassifyingexample/fortran/README.mdas an example dir, breaking the docs sort test. Use a proper trailing-slash inquire probe; index now omits the bogusReadme.mdentry.Verification
Test fails on main
`make doc`-driven
update_example_indexwould emitReadme.mdmid-list and failtest_docs_index_pages(alphabetical sort). 3D animation flickered between frames in ASCII because the y-axis line picked up each plot's cycled color.Test passes after fix
```
$ fpm test test_3d_backend_parity
PASS test_3d_backend_parity
$ fpm test test_first_plot_rendering
PASS: First plot renders with correct colors
$ fpm test test_docs_index_pages
(no failures)
```
3D ASCII animation now uses a stable axis frame; replay via:
```
fpm run --target fortplot_play_ascii -- output/example/fortran/3d_animation_demo/animation.txt --fps 24 --loop
```