Topics - TPReal [ switch to compact view ]

Pages: [1] 2 3next
1
NANY 2017 Entry Information

Application Name SLogo
Version 0.1.2
Short Description Turtle graphics in the browser with WebGL
Web Page http://tpreal.tk/slogo
System RequirementsLatest version of Google Chrome (didn't test on any other browser)
Author TPReal


Description
SLogo is a turtle graphics program working in the browser.

Documentation

Features
  • Executes JavaScript scripts
  • Uses WebGL to display image on HTML5 canvas
  • Draws lines and triangles
  • Supports color gradients
...and this is basically it. User creativity is required to make anything useful with the tools.

Planned Features
  • Animations
  • Drawing filled in polygons (with automatic triangulation)
  • Support for general 2D transformations (will allow e.g. drawing an ellipsis easily)
  • Support for writing script in Ruby using Opal
  • Possibly support for other browser with ES6 (Firefox)
  • Console output on screen (errors and debug)
  • Usability improvements

Screenshots
slogo.png

Usage
Using the Application
Go to http://tpreal.tk/slogo, write your script in the code box and press F9 to run. Press Ctrl+Enter to run the selected part of the code, or the current line.
Alternatively write a short script in the line at the bottom of the screen and press Enter. Up and Down arrows browse history.

Script to produce the graphics as on the screenshot (updated):
Spoiler
Code: Javascript [Select]
  1. options.bgColor=0xE0F0F0
  2. options.scalerMode="unitSquare"
  3.  
  4. const R=0.37*boardSize.height
  5. const u=R/120;
  6.  
  7. const fracColor=frac=>{
  8.   const comp=frac=>(1+Math.sin(2*Math.PI*frac))/2
  9.   return createColor(
  10.     comp(frac),comp(frac+1/3),comp(frac-1/3))
  11. }
  12.  
  13. up()
  14. col(0x206060);dot()
  15. b(R);r(90)
  16. rep(60,({count,frac})=>{
  17.   col(fracColor(frac))
  18.   br(()=>{
  19.     r(90);f(5*u)
  20.     const r2=2*u
  21.     br(()=>{
  22.       f(r2);r(90);down()
  23.       rep(12,({count})=>{
  24.         f(2*Math.PI*r2/count);r(360/count)
  25.       })
  26.     })
  27.     f(5*u)
  28.     tri(v=>{
  29.       br(()=>{f(25*u);v()})
  30.       br(()=>{r(90);f(12*u);v()})
  31.       br(()=>{l(90);f(12*u);z(1);col(0x000000);v()})
  32.     })
  33.   })
  34.   br(()=>{l(90);f(5*u);r(30);down(()=>f(105*u))})
  35.   const arcLen=2*Math.PI*R/count
  36.   down(()=>{
  37.     f(Math.PI*R/count);l(360/count);f(Math.PI*R/count)
  38.   })
  39. })


Tips
Pressing F9 stores current script in localStorage. When refreshing the page, it is loaded again (but without undo history).
Manual is missing, but many features are used in the example code. Some explanations:
  • branch(func) or br(func) executes func, and then restores cursor state from before executing it
  • z(value) sets z-index of the cursor, must be between -1 and 1
  • triangle(func(v)) or tri(func(v)) draws a triangle; func is expected to call its argument v() when the cursor is at consecutive vertices; also current color is taken into account and the triangle has gradient color
  • line(func(v)) draws a line which supports gradient, just like triangle (normal f(length) line has no gradient, just current color)
  • Pro tip: z-index is also gradiented in triangles and lines, so if a vertex has z-index outside of the -1..1 range, the triangle will be clipped accordingly

Known Issues
  • Documentation is rather basic
  • Interface is not very polished
  • Compile and run errors, as well as logged information, only appears on the browser console and in alert
  • Compile error doesn't have line information

2
N.A.N.Y. 2014 / NANY 2014 Release: Q-FlashCards for Android
« on: December 10, 2013, 05:40 AM »
It's been over three years since I last posted anything on DC, so probably it's time to pledge something for NANY this year :)

NANY 2014 Release

Application NameQ-FlashCards
Version0.1
Short DescriptionAndroid program for learning (vocabulary, dates, whatever) using virtual flash cards
Download link
Supported OSAndroid 4.0.3 (Ice Cream Sandwich) or higher
AuthorTPReal


Description
There's quite a lot of programs that show you some questions every day and schedule next repetition based on how well you answer. This program is somewhat different, and much more effective, I think.

The program is not fully polished, I stopped developing it a couple of months ago as it became functional and good enough for using, but I never put it in the Play Store or anywhere else. Maybe it's time to publish it finally, and NANY seems to be a great occasion for that.

Features
  • The initial interval of displaying a flash card is not 1 day, but more like 2 minutes (configurable). This way you have much much better chances to actually remember the word at the time of the first repetition. This is based on Pimsleur's graduated interval recall system.
  • A flash card is displayed as Android notification, so it's where you see it every time you look at your phone. Answering a couple of cards takes just seconds.
  • If a card is difficult (i.e. you repeatedly give wrong answer to it) its interval is rapidly lowered to as little as 30 seconds. This is so short that it's really impossible not to finally remember it after a couple of attempts :) The program just hammers your head until you remember the word, which is good if you really want to. A specialised algorithm adjusts repetition interval after every response, taking card's history into consideration, to make learning most effective.
  • Answering a card is just tapping "I knew it" or "I didn't know it" (or "I almost knew it"), no typing to verify that you can spell the right answer. You just need to be honest, but if you're not, what's the point of any such program anyway?
  • You can always request some cards to be shown instantly, even if their interval is not passed yet. There is a couple of algorithms to select the cards to show, including an optimal mix, which asks some of the newest cards, some of the old ones, some of the most difficult so far, plus some random cards.
  • Can be used to remember a variety of things, like: vocabulary, dates, names, phone numbers, birthdays. Can be used even for information without easy textual answer, like: where is river X, where is mount Y - you can leave the response of a card empty, and when a card is displayed, just make sure you know the answer, or check it on the map.
  • Cards are organised into card sets, so you can learn multiple subjects at the same time without the risk of mixing them.

It's also kind of a feature that you currently cannot import any list of cards into the program - if you want to remember something, you just need to type it in first. This way you will only add cards that you really want to learn, and not just all stuff that you can find, which could turn out frustrating, and useless. Although there might be some kind of import feature added in the future.

I've been using the program since almost a year (it became functional in the beginning of 2013, but was never published anywhere, so I think it qualifies for NANY), and I have in the DB around 3000 words and expression of a foreign language I'm learning (plus phone numbers of a couple of people I might want to contact ICE - might get useful if I lose my phone).

Screenshots
device-2013-12-19-221708.png device-2013-12-19-223042.png device-2013-12-19-223853.png device-2013-12-19-224149.png

Download
First, make sure installation from unknown sources is enabled in your device's settings (it is usually somewhere in Security submenu). Then open this page on the phone and download the apk attachment, or scan the QR-code below. Select to save the file on your phone. When download is completed, tap it to install (the details might vary between phones, if the installation doesn't start, try opening the file from the Downloads directory via a file manager).
* Q-FlashCards.apk (512.61 kB - downloaded 747 times.)
qr.png

3
As a part of not-working on my MSc I decided to finally learn AHK and programme myself a little multiple clipboard tool, using an idea which came to my head a long time ago. Now that it works like I want it to work, I thought why not share with you, maybe someone is waiting for this kind of software :)

Here comes some description of the program:

CCCCtrlC

Simple multiple clipboard utility. Creates any number of additional clipboards
(called cccclipboards) and allows accessing them using normal keyboard shortcuts.

To put it simply
  • Hold Ctrl+C to select a cccclipboard, and release to copy to it.
  • Hold Ctrl+V to select a cccclipboard, and release paste from it.

Some more description
If you press Ctrl+C or any other clipboard shortcut (see below) and release it normally (without delay), then the regular clipboard is used for the operation. But if you hold the shortcut for a moment, in the bottom right corner of the screen you will see a clipboard selection info scrolling over cccclipboards. Release the keys and the action will be executed on the currently selected cccclipboard.

Supported clipboard manipulation shortcuts
  • Ctrl+X, Ctrl+C, Ctrl+V
  • Shift+Del, Ctrl+Ins, Shift+Ins

Special functions
  • Ctrl+C+V - display this help
  • Ctrl+X+C - display cccclipboards list; symbols on the list:
    • C - data in cccclipboard
    • _ - cccclipboard empty
  • Ctrl+Ins+X - erase all cccclipboards (does not erase the primary clipboard)
  • Ctrl+Ins+V - show / hide tray icon (right-click the icon for options)

Cccclipboard selection speed can be customised using command line parameter:
CCCCtrlC.exe initial_interval
where initial_interval is the cccclipboard switch time (the lower the faster, default value is 10 which is pretty fast).

Screenshot
Here I'm holding Ctrl+V. There is some data in cccclipboards number 1, 2, 4 and 6, and the selection is currently at cccclipboard 4. If I release Ctrl+V at this very moment, I'll paste from cccclipboard 4.
cccctrlc.png



Edit on 2018-11-20

The old download link was broken, but I'm just attaching the exe and the source code. I'm not sure what version of AHK it was compiled on, but hopefully it can still compile!

The old exe still works on Windows 10. (Unfortunately I didn't find anything similar, or an easy way to create a similar program, for linux, and now I need to work mostly on linux.)

4
I'm not sure if any of you guys use Google Chrome and would like to experiment with its Dev version, that's why I haven't posted about my extension for Google Reader here, but on another forum, dedicated to Chrome extensions: Chrome Plugins. But now I thought that maybe some of you would like to check it out, so let me write a mini-review.

Basic Info

App NameTPGoogleReader
App URLTPGoogleReader on Google Code
App Version Reviewed0.3.6
Test System SpecsWindows XP SP3
Google Chrome 3.0.190.4 (Dev channel)
Supported OSesThe same as Google Chrome
Author Donation LinkDonate to TPReal, the application author
Relationship btwn. Reviewer and Product The review writer is the extension author (that's why this post is in this forum section)


Intro:

TPGoogleReader is an extension for Google Chrome that makes working with feeds, and particularily with Google Reader, much easier. There is already a lot of Google Reader extensions for Chrome but this one has more features than most of them. Probably the most important feature (and difference) is the ability to automatically open new items from feeds in the browser, in background tabs. Just check the checkbox on the toolstrip:

toolstrip.png

It also displays feed pages (XML) formatted:

feedview.png

And adds a page action for subscribing to a page feed:

multifeeds.png


Who is this app designed for:

To use this extension, you must be a Chrome user. I don't think anyone would switch to another browser just to use an extension. Also, you'd have to use Google Reader as your feed reader. Switching to it is not very painful as you can import your feeds from another reader easily. The extension also assumes that you prefer opening a link specified in a feed item and reading it in its original form to reading the content directly in the reader, but I think this is a pretty reasonable assumption.


The Good

Let me just describe the extension features:
  • The extension shows the number of new (unread) items (as all GR extensions do), or you can check a checkbox on the toolstrip and then the extension automatically opens all new items in new background tabs, and marks them as read in GR. It's really great - new things to read just appear at the end of your tabs bar, without even clicking anything. Also, at least for me, reading items in their full version by navigating to the item's link is much more enjoyable than reading the abbreviated, usually style-less version directly in GR.
    The checkbox can be checked on only one of your Chrome windows, so if you check it on one of them, it gets automatically unchecked on all the others.
  • When working in the normal mode (not auto opening new items), clicking on the items counter opens the first unread item and marks it as read in GR.
  • In the auto-opening mode, number of automatically opened tabs appears on the toolstrip. When you switch to one of the opened tabs, the number is automatically decreased by one, so you always know how much of your tabs are items you have not seen yet. You can also reset the counter manually by clicking on it.
  • When a website has a feed, an icon appears on the right of the omnibox (page action). Click on it to open the feed in GR (does not subscribe, just opens and lets you view it and subscribe). If there are multiple feeds on the webpage, you will see a list of all feeds, with the ability to subscribe to the one of your choice.
  • When you navigate directly to an RSS or Atom page (like this one: http://www.ruby-lang.org/en/feeds/news.rss) normally Chrome displays a mess. With TPGoogleReader you will get the page displayed in a monospace font and with preserved formatting. This can be important if you want to see what is exactly the content of an RSS (especially useful for feed testing purposes).
    Clicking on the feed name will open it in GR.


The needs improvement section

Sometimes something does not work as it should. Especially the page actions. The icon sometimes does not appear, or it does but does not react to clicks. For me it looks like most of the problems result from Chrome being in its Dev version, and the extensions system still being developed. And still the problems do not come into view to frequently.

There also seems to be a bug somewhere that makes the extension consume unreasonable amounts of memory, especially after Chrome being running for quite a long time. I'm still unable to say if this is a bug in the extensions system in Chrome, or in the extension itself. If you do not have several hundreds of feeds, and restart the browser at least once a day, this should not be a problem. However, if I find the problem is in the extension's logic, I will surely correct it.


Why I think you should use this product

If you use Chrome and feeds, I think this is the best extensions that lets you merge the two. With TPGoogleReader you find your new items just get opened as they arrive, and you can even forget that there is a feed reader under the skin.


How does it compare to similar apps

All the other GR extensions I have seen simply show the unread items count, and navigate to Google Reader upon clicking, so TPGR has much more functionality.


Conclusions

Currently this seems to be the most complete Google Reader extension for Chrome. It includes the ability to easily subscribe to feeds (or see them in the bare XML) as well as an innovative idea of automatically opening new items in the browser just as they arrive.


Links to other reviews of this application

The extension was reviewed (in a copy-paste'ish way) in this blog entry. Note that the review is somewhat old now. You can also find there short instructions on how to switch Chrome to the Dev channel, which is needed for the extension to work.

5
N.A.N.Y. 2009 / NANY 2009 Release: Fractal Explorers
« on: November 30, 2008, 09:38 AM »
NANY 2009 Entry Information

This is in fact two tiny programs, but they are both about exploring a fractal, and they share common libraries, so I put them here together.

Application NameMandelbrotExplorer and JuliaExplorer
VersionRolling Release :) it's not any big program, I'm not versioning it
Short DescriptionViewing Mandelbrot set and Julia sets
Supported OSesAny
Download Linkhttp://tpreal.dcmembers.com/Fractals.zip
System Requirements
  • Ruby
  • ruby-opengl gem
Version History
  • 2008-11-30 16:00 - First release
  • 2008-12-04 21:00 - Compatibility with some graphic cards added (thanks, deviantopian)
AuthorTPReal


Description
The applications are written just for fun, as an étude of Ruby and OpenGL Shading Language.

JuliaExplorer - Fractal Evolution
JuliaExplorer allows you to explore Julia sets of quadratic polynomials of the form z^2+c. It allows you to zoom into any part of the generated set, but the even more exciting feature is the ability to change smoothly the value of the complex parameter c, and see the fractal evolve slowly from one form to another.

MandelbrotExplorer - Into The Fractal
MandelbrotExplorer allows you to explore the Mandelbrot set. It allows you to zoom into any part of the set.

Possible enhancements
There's a lot of things that could be done to make these programs better, like:
  • Ability to save a specific image, or coordinates
  • Option of antialiasing to make the images look smoother
  • Maybe some colours or something
  • Displaying FPS
  • Automatic image changing (as if it was a screensaver)
But they are not planned - maybe I'll do some of those one day, and maybe I'll leave it as an exercise for the reader :)

Screenshots
MandelbrotExplorer
[attachthumb=#1][/attachthumb]
[attachthumb=#2][/attachthumb]
[attachthumb=#3][/attachthumb]
[attachthumb=#4][/attachthumb]

JuliaExplorer
[attachthumb=#5][/attachthumb]
[attachthumb=#6][/attachthumb]
[attachthumb=#7][/attachthumb]
[attachthumb=#8][/attachthumb]
[attachthumb=#9][/attachthumb]

Usage

Installation
First, you have to have Ruby installed, along with ruby-opengl gem. Ruby is available here: http://www.ruby-lang.org/en/downloads/ , if you are using Windows, I recommend the One-Click Installer from here: http://rubyforge.org/projects/rubyinstaller/ . Some additional info cn be found in the zip archive, in help/Ruby Installation.txt.

Just unpack the zip archive and run MandelbrotExplorer.rb or JuliaExplorer/rb.

Using the Application
MandelbrotExplorer
Just play around with Arrow keys and the zoom: A and Z keys. That's all :)

JuliaExplorer
When you run the program, a short tutorial is displayed. The basics are: use Arrows and A, Z to see the fractal evolve, and use U, J, H and K, and zoom: S, X, to zoom into any part of the fractal. But it might be a bit tricky at first, so read the tutorial.

Some description can also be found in the help directory in the archive.

Known Issues
There are some issues with installing ruby-opengl on some older versions of One-Click Installer for Windows. See the help file for details.

Pages: [1] 2 3next
Go to full version