DrawLine IOS issues (gaps)

Community Forums/Monkey Talk/DrawLine IOS issues (gaps)

Snixx(Posted 2011) [#1]
If you fill a screen full of lines and use some cos/sin wave (like a water wave) there are gaps... I posted on the monkey forums but its fairly dead.


dynaman(Posted 2011) [#2]
Easiest way around it is to draw a line between each set of points.

So if the points given by your equations are

1,1
1,3
2,4

Draw a line between 1,1 and 1,3 then another between 1,3 and 2,4

Unless you are needing really high precision this will look fine.

Last edited 2011


Uncle(Posted 2011) [#3]
Just an idea. Try casting your output coordinates as Ints.

e.g. DrawLine x, int(waveHeight[x] + (offset[1] + 240)), int(x), 480

I noticed that sometimes plotting with floats in other languages causes problems like you mentioned. Might be worth a try.


Snixx(Posted 2011) [#4]
Thanks guys, and thats a good point Uncle you may have hit the nail on the head! I will try this when I get back.