![]() |
#1 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
![]()
(thread title was: "contest: first screen capture = 500 karma points!")
![]() titty Here is "titty" (tiny tty - display tiny text on eink display, in a retro "artistic statement" fashion): UPDATE: This thread now has a new script called "tangle" that gives Kindle 3 (Keyboard) owners some "triangle fun": Here is "rippleweave" (for kindle 4 and touch) that generates 3D function plot images like this: Here is PoP's backport of rippleweave for the Kindle 3: https://www.mobileread.com/forums/sho....php?p=2011822 ![]() spoxbrane Run the "spoxbrane" script to completion (about 15 minutes), then make a screen capture and post the image here. If you are the first poster, you win 500 mobileread karma points. UPDATE: I gave 500 karma points to varnie for the first posted screenshots. I also gave 500 karma points to thomass for the first screenshot of the completed picture. I will not post my own screen capture until later. I want you to be surprised at what "develops" on the touch or K4 eink screen when you run the "spoxbrane" script. ![]() spoxbrane 1.0c: Spoiler:
The "spoxbrane" script (click "Show" in above Spoiler tag) takes about 15 minutes to run to completion on my touch (booted from main), or 13 minutes on my K4 (booted from diags). It runs when booted from main or diags, and it can run from a RUNME.sh script (loaded by data.tar.gz), or from an SSH command line (in main or diags). It is completely safe (other than consuming your time while you watch it run). As you can see in the code above, it ONLY writes to /dev/fb0 (the eink framebuffer device). There is less interference from the kindle desktop framework when booted from the main system partition if you tap the power button to start screensaver mode before starting this script from SSH. You can save the final results with "dd if=/dev/fb0 of=/mnt/us/spoxbrane.raw", then convert that to a 600x800 8-bit grayscale PNG file with IrfanView for Windows, or the Gimp or other favorite app in linux. Post it here, and if you are the first poster, you get 500 karma points. Feel free to modify the script to generate different "algorithmic art" pictures, and post those here too. Enjoy! UPDATE: Here is the *real* original post that started this series of scripts: https://www.mobileread.com/forums/sho....php?p=1997659 P.S. This was developed to go with my touchscreen support code, for buttons and onscreen keyboard (all done in /bin/sh script with minimal dependencies on other programs). This is a bit slower than it would be in C, but I think it is cool that it can even be done at all this way. It is an elegant and clever hack, IMHO. ![]() EDIT: I made small cosmetic improvements to the code above and in spoxbrane.gz below, but they are functionally identical to the original code first posted here, so no need to download it again. I also removed unused residual "touchscreen support" code. ![]() You can download spoxbrane.gz (v1.0c) below: Last edited by geekmaster; 10-31-2012 at 02:42 PM. Reason: severe typophrenia |
![]() |
![]() |
![]() |
#2 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 99
Karma: 30196
Join Date: Dec 2011
Device: Kindle Touch
|
here're my screenshots
![]() ps: by the way I made them using home button technique as described here: https://wiki.mobileread.com/wiki/Kind...ng_screenshots Last edited by varnie; 03-15-2012 at 03:13 AM. |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
|
Wow, this is cool
Thanks ![]() And, this is the complete version of the screenshot ( by preventing screensaver ![]() Spoiler:
Last edited by thomass; 03-15-2012 at 07:06 AM. |
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 99
Karma: 30196
Join Date: Dec 2011
Device: Kindle Touch
|
nice shot! I had no time to wait till the end
![]() Just a thought - we can use the power of the script for creating custom screensavers, can't we? It would be cool to get drawing some fractals on the Kindle Touch's screen when it is being idle for some time. |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,669
Karma: 2300001
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
|
Quote:
![]() are there any way to check the screensaver's activity? ( whether it is in usage ) we can insert a check point for this in the first while loop Last edited by thomass; 03-15-2012 at 07:38 AM. |
|
![]() |
![]() |
![]() |
#6 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
If you do use it for custom screensaver generation I think you'd have to say "bye-bye, nice to meet you, battery life"...
|
![]() |
![]() |
![]() |
#7 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
![]() Quote:
I added 500 karma points to varnie for the first posted screenshots, and another 500 points to thomass for the first complete screenshot. Here is the screenshot I took using the all-powerful "dd" command: ![]() spoxbrane.png Q1) From what cultural reference (popular TV episode) was the name of this script derived? A1) Star Trek, Spock's Brain: http://www.youtube.com/watch?v=2zKDQfVbWqc Q2) What two properties of the title character of that TV episode fit the image created by this "spoxbrane" script? ![]() A2) Well, the dark inner part of the image looks like a brain in an artistic sort of way, and it was created analytically, which is a trademark property of the title character of that TV episode. Q3) Does the screensaver interfere with this script? A3) Not when you run it from diags SSH like I do. ![]() Q4) It takes 13 to 15 minutes to generate the image with this shell script. Faster image generation would consume less battery when not connected to USB. How fast is this image generated after converting the spoxbrane script to a C program? A4) I don't know. It's on my "To Do" list. Anybody with "spare time" want to provide that answer? ![]() P.S. The original spoxbrane script (before being simplified for this post) could generate different images based on random values obtained like this: ![]() Then you need to scale these (0-65535) random numbers to fit the 600x800 display like this: ![]() Enjoy playing with this stuff! ![]() P.S. Here is a little "Spock-related" bonus humor for your enjoyment: ![]() Last edited by geekmaster; 03-22-2012 at 03:18 PM. |
|
![]() |
![]() |
![]() |
#8 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Now that the contest is over, the title of this thread has changed from "contest: first screen capture = 500 karma points!" to "eink algorithmic art shell scripting" to reflect its interesting (to some) and potentially useful (to many) content.
Let's see some "different" eink graphical art posted to this thread! Thanks. ![]() Last edited by geekmaster; 03-16-2012 at 11:36 AM. |
![]() |
![]() |
![]() |
#9 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,016
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Pretty neat Geekmaster. On my Kindle Keyboard, it draws white on white (/def/zero over eips -c background. I cheated by removing the clear and starting spoxbrane over a black screensaver.
Cool: Spoiler:
|
![]() |
![]() |
![]() |
#10 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
![]() On the K3, each byte is two pixels, so to get proper horizontal aliasing for the moire pattern, you should adjust the horizontal step size and divide the widths by 2 (i.e. VX=300 MX=300, etc.). Although I did not test it yet, spoxbrane should work on a DX and DXG too (with the above K3 adjustments), but it would only draw on the upper-left 600x800 unless you adjusted the code to use more of the screen space. ![]() Last edited by geekmaster; 03-16-2012 at 06:02 PM. |
|
![]() |
![]() |
![]() |
#11 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
killall -stop Xorg cvm 2>/dev/null # pause framework spoxbrane # draw stuff on framebuffer killall -cont cvm Xorg 2>/dev/null # resume framework Pausing and resuming the framework is almost instant, unlike a very slow "normal" framework stop and restart like the way other native apps (like Qt) do it. The downside of doing it my way is that the paused framework still consumes a lot of memory, while a full stop frees up all that memory. We do not need much memory, so I like just transparently and instantly pausing and resuming the framework as shown above. On a K4 or earlier, you can remove "Xorg" from those "killall" commands. ![]() Last edited by geekmaster; 03-16-2012 at 06:09 PM. |
|
![]() |
![]() |
![]() |
#12 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
![]() ![]() rippleweave Surprise! I have been busy lately. Here is a little gem I whipped up to keep this thread alive. I am actually quite surprised how little interest there seems to be in this stuff, considering how well eink displays work for algorithmic graphic art. How about some feedback so I do not feel so all alone here... ![]() I find it rather interesting to watch the artwork while it is being created, which reveals the inside of the 3D shape as layers are drawn on the display. Like the midpoint circle algorithm used in the spoxbrane script, this script also "multitasks" by exploiting the 8-way symmetry of the "pseudo-mexhat" function being plotted. Although the Taylor series sine function used here could be made a bit faster by limiting it to an O(5) series half-cycle instead of an O(7) series full-cycle, it would require mirroring the half-cycle (similar to the full-cycle looping now used, but with added reflection). I opted to keep the code as simple as possible by leaving out this potential speed optimization. rippleweave 1.0a: Spoiler:
The "rippleweave" script (click "Show" in above Spoiler tag) takes less than 3 minutes to run to completion on my touch (booted from main). It is completely safe (other than consuming your time while you watch it run). As you can see in the code above, it ONLY writes to /dev/fb0 (the eink framebuffer device). This script disables screensaver mode using the method provided by thomass, but also pauses the framework to prevent framework status messages from polluting the artwork. The framework is resumed and screensaver mode reenabled after a completed screenshot image is saved to "rippleweave.raw" on the USB drive. You can convert the raw screenshot image to an 800x600 8-bit grayscale PNG file with IrfanView for Windows, or the Gimp or other favorite app in linux. Here is a full-size 800x600 (landscape mode) converted screenshot from this rippleweave script: Spoiler:
Here are some reduced-size screenshots taken while the function was being plotted on the eink screen: ![]() ![]() ![]() ![]() Feel free to modify this script to generate different "algorithmic art" pictures, and post those here too. ![]() Q1) What's "rippleweave"? A1) Ripple Weave Socks: http://mimoknits.typepad.com/photos/...lue_socks.html Q2) What function is plotted on those socks anyway? A2) Umm... Good question! ![]() Q3) What's a "mexhat" function? A3) The most common "mexhat" function is the Ricker Wavelet, but rippleweave uses a variation of a simpler sinusoidal wavelet function (also sometimes called a mexhat function). You can download rippleweave.gz (v1.0) below: Last edited by geekmaster; 03-31-2012 at 12:26 PM. Reason: fix typos |
![]() |
![]() |
![]() |
#13 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
![]() Check out the rippleweave script in the previous post in this thread. If you do *any* scripting, you might learn something from the script source code. And feel free to modify it to plot other math functions. Please post screenshots here. Thanks. ![]() EDIT: If you examine my source code, you will see that I like to write solid condensed code, which fits nicely on 80x25 text displays without requiring a lot of vertical scrolling. I do this to support my "keyboard-only" coding-trance sessions, which are severely hampered by hand-eye coordination required by mouse and GUI menus. When I modify other peoples' code, I try to make my changes transparently blend into their code. Please keep modifications to my code that you post here in my condensed style so that I can reuse it. If you prefer finger-length variable names or fluffy "popcorn" code littered with whitespace (e.g. lab126 scripts), please post that to your own threads. Thanks. EDIT 2: And remember, what is important here is the fact that we can do cool stuff with our kindles now that we have SSH access to them. And these scripts require very little support from external programs (but this one cheats and uses "seq" here when it could use shell arithmetic loop control like spoxbrane did). These graphical scripts even work from a RUNME.sh script called from my data.tar.gz payload, used for debricking kindles. I plan to use the kindle framebuffer graphics script library I am developing for use in my "universal kindle debricking system", but they have far more uses than just that. This is *why* I am delving into eink algorithmic art (to test my functions, and to gain "followers" to my line of thought). ![]() Last edited by geekmaster; 03-18-2012 at 06:39 PM. |
![]() |
![]() |
![]() |
#14 | |
Enthusiast
![]() Posts: 35
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#15 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,016
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
![]() I just want to plead innocence and point that on my KK v3.3 (blame it on an older or perhaps buggy shell interpreter) I had to ![]() Code:
while [[ $x0 -ne $x || $y0 -ne $y ]];do Code:
while [[ $x0 -ne $x ]] || [[ $y0 -ne $y ]];do |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scripting with epub-meta | averyml | Calibre | 20 | 11-17-2016 10:13 AM |
Bunny + Scripting + Calibre = here | tBunnyMan | Introduce Yourself | 4 | 02-06-2012 12:16 AM |
Possible scripting engine for Sigil | Valloric | Sigil | 48 | 10-17-2009 09:58 AM |
Any NetNewsWire Scripting Pros out there? | adinb | Sony Reader | 0 | 02-25-2007 01:44 AM |