Hi, I have been searching for a way to write a line segment to an array. Is there an easy way to do this or do I have to iterate through every slot in the array and set it's value?
thanks,
Mike
Write to array using line segment
Hi, I have been searching for a way to write a line segment to an array. Is there an easy way to do this or do I have to iterate through every slot in the array and set it's value?
thanks,
Mike
how should this line segment look like? for example, a linear icrement from 0 to 1? what is the x size of your array?
Yeah, your example is exactly what I would like to do.
I would send a set of x,y pairs and write the points linearly incremented between them to an array. So if I send 0,0 and 1024,1 i would get a diagonal line from 0 to 1 across the whole array.
Why do you need to send in two x,y pairs? What context are you using this in?
If you always want to go from 0 to 1 then you only need one value, which is the size of the array that the ramp needs to go over.
Is this what you're looking for (in the attached patch)?
Thanks, I think that actually answers my question. I wasn't sure whether I had to iterate through the table to draw a straight line like that.
Oops! Looks like something went wrong!