Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

'dot' 2-D matrix needed

For general discussion related FlowStone

'dot' 2-D matrix needed

Postby tester » Sun Jun 19, 2016 11:37 am

I need something like a 'dot matrix', i.e. a graphical view that is splitted into a matrix of 'pixel' rectangles.

Inputs:

1) how many lines (x)
2) how many columns (y)

So this produces a 2-D matrix of x*y rectangles. Each rectangle should have it's own color or transparency or something like that.

3) Third input would contain an array of x*y values. Each value would represent a color. As for colors it does not matter, it can be a colorset or a manipulation of one color.

This is for static display.

Anyone played with such thing or has it and could share?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: 'dot' 2-D matrix needed

Postby KG_is_back » Sun Jun 19, 2016 12:06 pm

somethign like this?
Attachments
2d_matrix.fsm
(719 Bytes) Downloaded 965 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: 'dot' 2-D matrix needed

Postby nix » Sun Jun 19, 2016 12:57 pm

ty KG-
that's neat
User avatar
nix
 
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: 'dot' 2-D matrix needed

Postby tester » Sun Jun 19, 2016 6:01 pm

Thank you, this should do the job.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: 'dot' 2-D matrix needed

Postby tester » Thu Jun 23, 2016 9:53 pm

Hmm... I don't know to modify it, I'm getting errors.

I'd like to do 2 things here.

1) define main color (instead of shades of blackness) - I thought it would be simple

Color.new((@dat[x+y*@w]*255).to_i)
to something like:
Color.new((@dat[x+y*@w]*255,val1,val2,val3).to_i)
at least following the manual

2) actually, I'd like to have 2 distinct color gradings, one color for positive array values, and second color for negative array values, since some arrays have both.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: 'dot' 2-D matrix needed

Postby tester » Sun Jun 26, 2016 5:20 pm

I'm stuck with this one. I have no idea how to manipulate at least the main color a,r,g,b parameters. Help. :-)

(bi-color versus could be done simply with using 2 of such boxes, where transparencies on one box would be compensates by colors on the other)
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet


Return to General

Who is online

Users browsing this forum: No registered users and 59 guests

cron