Add examples/mandelbrot.pl demo#1
Open
karlglazebrook wants to merge 1 commit into
Open
Conversation
Self-contained demo showing the three main image-writing entry points:
- write_true_png() - 24-bit RGB sunset gradient
- write_png() - indexed PNG with a custom 256-entry rainbow LUT
(Mandelbrot set, 800x600)
- $obj->write_Jpeg() - same Mandelbrot via the OO interface
The Mandelbrot computation itself is fully vectorised in PDL (no per-pixel
loops), making the demo a small advert for what PDL+PDL::IO::GD can do.
Runs in a few seconds with no external data files. Output goes to the cwd.
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.
Adds a small standalone demo script at
examples/mandelbrot.plshowcasing the three main image-writing entry points ofPDL::IO::GD:write_true_png()— for a 24-bit RGB sunset gradientwrite_png()with a custom 256-entry rainbow LUT — for an indexed-colour Mandelbrot set$image->write_Jpeg()interface — same Mandelbrot as JPEGThe Mandelbrot computation is fully vectorised in PDL (no per-pixel loops), making the script a small illustration of why someone might want PDL::IO::GD in the first place. Self-contained, no external data files, runs in a few seconds, produces three pretty images in the cwd.
Generated by Karl Glazebrook + Claude during PDL 2.104 / SciPDL v2.104 work — the JPEG output specifically tested SciPDL's new bundled libjpeg-turbo + libgd build path.