Jul 26 2011

RICcreator – July update

Category: UncategorizedSpiller @ 00:50

Another month has passed and truth to be told, that much haven’t happened…

A few thing have been done at least, mostly with the sprite editor.

Import of image files

This feature is pretty important for me, so a quick draft has finally been made:

The options should be done in this order:

  1. Select image
  2. Scale image
  3. Select grayscale conversion method
  4. Change threshold
  5. Cut image

Actually I would want to cut the image before scaling it, as this makes it easier to scale it precisely. It is a bit more work though so this will wait for now.

The second view is a nxtCanvasWidget control, i.e. a nxtCanvas viewer/editor. It should be easy to allow editing the sprite before applying it, you just need to add the tool buttons. I don’t know if this is of interest though.

A lot more work will need to be done on the monotone conversion. Currently a simple global threshold is used (which is automatically calculated btw). I will at least add the possibility of adaptive thresholding and perhaps even edge detection. I will try to look into other filters to see what could be useful.

New nxtCanvasWidget tools

Compared to nxtRICedit, RICcreator is still missing some forms for sprite modification. So a few extra have been added to closing that gap.

The layout needs a helping hand though.

Copy and paste

Together with the selection tool, copying and pasting is now possible. To move the pasted content, you click and drag. To copy it onto the sprite, double click. (Click again and it will paste an extra copy right away.) Invert and Merge options works as well.

Currently a drag operation is started no matter where you click. However clicking outside the copy could be used to apply it onto the canvas, instead of having to double click. (GIMP behavior) I’m not sure what I should go with.

Cropping

The nxtCanvas automatically becomes larger but there was no option to decrease the size. So cropping is now finally added. It auto-crops empty white borders, black borders if Invert is toggled. However it can be used together with the selection tool to crop to a specific area without regarding the contents.

Bucket fill

Has also been added. It is just a quick inefficient implementation though, but it works. Invert also affects this tool of course.

Missing tools

I will only add one more tool, a text tool which works using RIC fonts. When and how I do not know. (And undo/redo someday…)

I might add polygon drawing if there is interests for it though.

If anyone do not think this tool set is sufficient, tell me what you would like to see and I might add it in the future.

Export to PNG

By using File->Export you can now save the contents of the preview. So if you file is parameterized, set the parameters before executing this command.

You can also export the contents of a RIC sprite, by using the save button in the nxtCanvas editor. If used together with the selection tool it will only save the current selection.

Now that I think about it, is there any way to export as a bitmap image in nxtRICedit? Couldn’t quite find the command.

Other additions

Closing RICcreator by other means than File->Exit will now properly prevent exit if there are unsaved files.

You can now open files by dragging and dropping them into RICcreator from your file-browser. You can drag multiple files at once if you want.

Download

Please bear in mind that this is a preview and that there are several known bugs.

RICcreator rev. 119 – win32


Jul 10 2011

Keywriter

Category: Lego,MindstormsSpiller @ 14:18

An old project of mine, from before I got my NXT 2.0 kit. From about 2.5 years ago iirc.

Old description from HDD:

A robot which can write on a computer by pressing the keys on the keyboard.

My original goals

To become more used to make building instructions.
Making it to work on multiple keyboards so it isn’t specific for a single keyboard/working condition.

Making programs that can be modified easily to perform similar tasks.

Making simple and strong constructions.

Never made building instructions…

Should work on multiple keyboard, but remains untested…

Program works by using coordinates, nothing like the “modifiable” program I wanted…

Most of the construction was simple enough though.

Program

The program was made in NQC since it would most likely fail in RIS…

By using the rotation sensors, the motors worked like servos changing speed/precision depending on distance.

Keys were found by using manual entered coordinates…

By using some functions in Windows which are normally for people which have trouble using the keyboard, you can activate a function to press keyboard shortcuts one key at a time. This can be done with shift and uppercase letters so caps lock isn’t needed and furthermore it could be used to control many Windows features directly from the keyboard.

Still, I didn’t continue that far…

Construction

The frame was made simple, long, and strong. The long beams are made of both studded and studless bricks to reinforce each other. So even if the span is over 30 cm, they don’t bend that much.

Wheels are used instead of gearracks on the frame and this works okay…

Photos:

LDraw file can be found on my brickshelf: Keywriter folder

Photos from while I was constructing it can be found this this folder.