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

Precise drawing after grouping max/min points?

For general discussion related FlowStone

Precise drawing after grouping max/min points?

Postby Nowhk » Mon Mar 21, 2016 12:06 pm

I'm about to draw somethings like 882 points inside a window of (horizontally) 200 pixel. As tulamide suggested to me time ago, it's worthless to draw each point, since I'll max draw 200 of them. So I'll group block of them (882/5=177 points) using min/max points to draw it (Mem to Float Array Min/Max prim):

Immagine.png
Immagine.png (32.25 KiB) Viewed 9947 times

precise drawing.fsm
(13.22 KiB) Downloaded 1344 times

as you can see in this "analysis" (you can switch between original points and grouped version), blu points are the original, reds the min and yellow the max, for each group.
Now, what I need to do is to "join" those points, getting the same signal and keeping (that's the important aspect) min/max value for each peak. My idea is:

- start from index t=0.
- When the next max is increasing, use current max point (yellow one)
- When the next max is decreasing, use current min point (red one)

it seems to works very well (you can see the white line is taking the points it should take). But this don't always works. In fact at the 4° change of slope, this is not true. It should take in order red-red-red-yellow-yellow. But with my method, its red-red-red-red-yellow (because between the 3° and 4° yellow there is a decreasing):

Immagine2.png
Immagine2.png (3.02 KiB) Viewed 9947 times

so, a defect in the curve.
How would you fix it? I mean: how would you choose points (after resampling with min/max) that exactly hover original signal? (i.e. the meaning of this "grouping points" task)?

Hope you can help me! Thanks dudes!
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Return to General

Who is online

Users browsing this forum: No registered users and 47 guests

cron