How Can We Help?

Infection Spread

You are here:
< Back to Wiki
// Attribute Wrangle

@infected = 1; // Pipe in a selection of point(s)
@Cd = {1,0,0}; // Turns the selection red
//Attribute Wrangle
if(@infected == 0){
    float search = fit01(rand(123), 0, 20);
    
    int spnts[] = nearpoints(0,@P,search,6); // the 6 is the max amount of points searched for
    // nearpoints(0,@P,search); // removing the 6 looks for ALL points
    int pt;
    foreach(pt;spnts){
        if (point(0,'infected',pt)==1){
            @infected = 1;
            @Cd = {0,1,0};
        }
    }
}

Leave a Reply

Table of Contents