Raspberry Pi stacks collection #95 = MoonEffect.livecode MoonEffect (Elliptical distortion/Fisheye) = LC-Magick #8
[By Hermann Hoch and Bernd Niggemann]This is our "easter-egg" for the community"!
(a) A full moon.
A rectangular image is elliptical distorted (kind of "fisheye display").
- You can add 'Effects': a bright moonshadow.
- Choose horizontal/ vertical radius ('RadiusX'/ 'RadiusY') of the oval.
- Choose a fixed 'Relation' between them, based on the selected one of X or Y.
- Choose an 'Angle' for the display.
- Choose a (proportional) 'Scale' for the display.
(b) A partial moon.
- Set 'Percentage %'
- Choose by btn ">" the increasing/ waxing phase
- Choose by btn "<" the decreasing/ waning phase
It's NOT done, as in real life, by a moving shadow, but by showing the corresponding horizontal percentages of the source image. Horizontal flip respects these percentages, also Effects (the moonshadow).
Moreover you can 'animate':
- 'Animate' is slow, but can be done in selectable percentage steps.
- 'SaveAnim' creates a 1-step animation with the current settings in the folder of your stack (= 201 PNGs = if 300x300 around 14 MByte). Before saving an animation the stack should be saved to your local disk to have a folder for saving the image-series.
- 'ShowAnim' selects such a collection for replaying (works only correctly if loaded from the stacks folder). You choose the refresh rate in millisecs, so it is much more flexible than a gif animation .
You'll find more detailed help in the stack, scripts are 'essentially' commented.
- Use LC 6.0.5 (or slower: 7.0.4) on Raspi.
- Use LC 6.7.11/ 7.1.4/ 8.1.4/ 9.0.0 on Mac/Win/linux
The stackfileversion is 5.5 (LC 6 is faster animating than LC 7/8/9).
The stack has 2 MByte (incl. images), too large for the forum. You can have it
- by opening one of LC 6/7/8/9 IDE and type or copy and paste in msg:
[EU] go stack url ("http://hyperhh.org/xstacks/moonEffect_101.livecode")
[US] go stack url ("http://hh.on-rev.com/xstacks/moonEffect_101.livecode")
- by downloading in your browser
[US] http://hh.on-rev.com/xstacks/moonEffect ... vecode.zip
[You may use Raspi stack #33 to check the sums:
Then unpack and open in one of 6/7/8/9 LC IDE.
For a demo of the replay you can download zipped image-series (201 PNGs each), made with the stack:
(5M) [EU] EasterEggJ-anim
, (5M) [EU] HeadRed-anim
, (2M) [EU] LCInfinity-anim
(5M) [US] EasterEggJ-anim
, (5M) [US] HeadRed-anim
, (2M) [US] LCInfinity-anim
Just put the folders into the folder where your stack resides. The animations are antialiased only, adding effects increases the size.
p.s. The eastereggs in our stack are alike the ones in bn's stack Eastergg
Plagiarism is basic to all culture.
(Pete Seeger in a concert, he didn't name an author ...)