RaspberryPi Stacks

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Re: RaspberryPi Stacks

Postby SparkOut » Fri Mar 10, 2017 11:13 am

Hermann, you are amazing, and brilliant, and brilliantly amazing!
SparkOut
 
Posts: 1572
Joined: Sun Sep 23, 2007 4:58 pm

Re: RaspberryPi Stacks

Postby [-hh] » Fri Mar 10, 2017 11:19 am

Thanks SparkOut.
Four years ago I started 'LiveCoding'. You were (and still are) one of these wonderful community members who help beginners to learn fast. So you are partially praising yourself. ;-)
Plagiarism is basic to all culture.
(Pete Seeger in a concert, he didn't name an author ...)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
 
Posts: 1367
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: RaspberryPi Stacks

Postby [-hh] » Wed Apr 05, 2017 12:14 am

Raspberry Pi stacks collection #94 = Cuboid.livecode
(v1.0.1 of Apr 04/2017)
(Thanks to the LC-Team for removing the "layering-bug" in LC 8/9)

Cuboid ('pure' LiveCode script) = LC-Magick #7
A Cuboid is a cubic form that allows different width, height and depth. Some call it simpler "3d-box".
We use "Perspective Image Distortion" for all 6 faces of a cuboid. The base shape is a unit cube (which has 1.00 = baseWidth = baseHeight = baseDepth). Use other values of baseWidth, baseHeight and baseDepth to set other size relations of your box.

  • Each of the six faces may use a colored rect or an image as input.
  • Faces can be made 0-100 % transparent, so that you can also look through to 'back' faces (=early iMac effect, we could call our object an "iCube").
  • You have the arrowkeys and buttons zoom/rotateX/rotateY/rotateZ for fine-tuning. Fast animation is done by clicking (hold mouse down) at an "in/out-ring" at topLeft and and a "windrose" at topRight.
  • Clicking button 'Cube' (re-)starts the cuboid with your current size settings. RightClick for a cube with 2.00 = baseWidth = baseHeight = baseDepth.

You'll find more detailed help in the stack. Scripts are 'essentially' commented.
The antialiasing uses, once again, Bernd's gradient-technique. Thanks BerndN!

  • Use LC 6.0.5 (or slower: 7.0.4) on Raspi.
  • Use LC 6.7.11/ 7.1.4 and 8.1.4/ 9.0.0-dp7 or later on Mac/Win/linux (LC 8.1.3 and 9.0.0-dp6 contain a layering bug)
The stack is too large for the forum. You can have it

  1. by opening an LC IDE, version as denoted above, then type in or copy-paste to msg:
    [EU] go stack url ("http://hyperhh.org/xstacks/cuboid_101.livecode")
    [US] go stack url ("http://hh.on-rev.com/xstacks/cuboid_101.livecode")
    _or_
  2. by downloading in your browser
    [EU] http://hyperhh.org/xstacks/cuboid_101.livecode.zip
    [US] http://hh.on-rev-com/xstacks/cuboid_101.livecode.zip
    [You may use Raspi stack #33 to check the sums:
    md5=5eda09e792cdcc2f75f880ab19c18586
    sha1=fd7cf2a50489aa2484b2045d88aed28cc8de426e]
    Then open in an LC IDE, version as denoted above.
Attachments
cuboid.png
Plagiarism is basic to all culture.
(Pete Seeger in a concert, he didn't name an author ...)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
 
Posts: 1367
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: RaspberryPi Stacks

Postby [-hh] » Thu Apr 06, 2017 11:54 pm

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"!

You have

(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")
    _or_
  • by downloading in your browser
    [EU] http://hyperhh.org/xstacks/moonEffect_101.livecode.zip
    [US] http://hh.on-rev.com/xstacks/moonEffect ... vecode.zip
    [You may use Raspi stack #33 to check the sums:
    md5=12f3383ff9f3f8135dd88d8e50613d93
    sha1=ac1c618924da950016f79083aa45ed59660697fa]
    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,
_or_
(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 of livecodeshare.
Attachments
moonEffectWaning.png
moonEffectWaning.png (24.38 KiB) Viewed 211 times
moonEffectFull.png
moonEffectFull.png (33.86 KiB) Viewed 211 times
moonEffectWaxing.png
moonEffectWaxing.png (25.09 KiB) Viewed 211 times
Plagiarism is basic to all culture.
(Pete Seeger in a concert, he didn't name an author ...)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
 
Posts: 1367
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: RaspberryPi Stacks

Postby [-hh] » Sun Apr 23, 2017 9:08 pm

Raspberry Pi stacks collection #96 = Legofy67.livecode

Legofy (is 'pure' LiveCode script)
This is a special (and partially improved) form of pixelate/pointillize, see
Stack #72 = LC-Magick 2

Choose the size of the lego-1x1-brick that is then used to build the 'plate' colored (overlayed) by your image.

  • Use LC 6.0.5/7.0.4 on Raspi.
  • Use any stable version of LC 6/7/8/9 on Mac/Win/linux
Attachments
legofy67.livecode.zip
(215.66 KiB) Downloaded 20 times
legofiedThistle.jpg
The (legofied) thistle that thistles at Thistle Street NW, Edinburgh.
Plagiarism is basic to all culture.
(Pete Seeger in a concert, he didn't name an author ...)
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Livecode Membership
 
Posts: 1367
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Previous

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest