c# - Draw and fill a signal -


i draw , fill signal using graphics.drawcurve , graphics.fillclosedcurve following:

graphics

gx = drawpanel.creategraphics(); pen pen1 = new pen(color.black);  brush = new solidbrush(color.gray); gx.drawcurve(pen1, pointarray1, 0.01f); gx.fillclosedcurve(be, pointarray1); 

although there no minus in plotted data got filled curved @ minus side of curve (due interpolation?) following:

filled signal

how can rid of these artifacts?

thanks in advance!

do not use drawcurves plot real data!

they nice , useful when creating freehand plot of mouse movements.

but when plotting data not tend overdraw esp. when direction changes quickly.

see here instructive example of overdrawing! setting tension way limit problem; limit smoothness of lines..

the solution there uses beziers, not should do!

with great number of dara points seem have suggest stick drawlines & fillpolygon instead; still should rather smooth..


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -