so I got a few nice things going with VVVV but I still have some basic problems regarding spreads. I am pretty experienced in textual programming but there are many things where I just don’t know how to create it in VVVV.
So for a start, just as an exercise, I wanted to create a checkerboard texture using DynamicTexture. How would I do that? Feeding the texture with a linear spread with 0s and 1s? Creating a two-dimensional spread with cross? Does _cross_even return something that is similar to a two dimensional Array?
There are a few other question that may follow, but for now I just want a simple solution for this problem.
i just did it with 2 I (Spreads), a GetSpread (Spreads) and a GetSlice (Spreads).
i first created the even and the uneven row and simply selected them afterwards with getslice and a binsize of the column count. i can give you the patch if you want to…
@Elias: Can you upload the patch? I tried to do it your way but I don’t quite understand how to use GetSpread and GetSlice to choose between the two ISpreads. BTW: What is the difference between GetSlice with a bin size of 3 and GetSpread with a count of 3?
@tonfilm: thanks, i tried it your way too, but i didn’t know about the filter-node!
Okay, so my next question would be: How do I draw a circle in a texture?
First thought would be to use CircularSpread. But how do I convert the X and the Y to one value again to connect it to the DynamicTexture?!
p.s. i’m having trouble thinking of a situation where you might ever want to do that.
other (more stable but performance intensive) method is:
use points2vector to find the radius of a point B from point A
set point A to be center of your circle
input all the pixel positions as point B
then you’ll have a spread of all the disances of B from A
for a circle, you want to draw a locus around A, such that the radii are equal.
so compare the radius’ that come out of points2vector against a constant radius using the ‘= (Value)’ node. Use the ‘Epsilon’ to give thickness to your circle’s line. By default this will be 0, so you’ll need to increase it.
You’d be best looking at GDI renderer help patches if you want to draw circles in that way.
But i think you’re just trying to learn spread maths?