About Me

Not Specified
Not Specified


Recent Forum Posts

how do i create connection lines between two or more points in wrangle ? July 11, 2017, 9:03 a.m.

In a wrangle, say for just two points…

int New_Prim;

New_Prim = addprim(geoself(), "polyline");

addvertex(geoself(), New_Prim, 0); // 0 is point number 0
addvertex(geoself(), New_Prim, 1); // 1 is point number 1

Just keep adding the function addvertex with a new corresponding point number and same ‘New_Prim’ number to keep
those points belonging to same primitive.

You may want to create ‘for’ loop/s for many points using the index of the loop as the point numbers.

And create your own sorting algorithm beforehand to get the order of points you want before passing on to the ‘for’ loop for connection.

Of course you can put your ‘sorting’ algorithm within the for loop itself if you want.

And/or if you need different sets of points belonging to different primitives, create groups of points as well. [] []

i am running "2" switches with fit01(rand($F),0,4) but they NOT running independently of each other they are running in parallel how can I fix this please July 10, 2017, 9:29 a.m.

They are running independantly.

The reason they give the same results is because you are giving them both the same seed values for your rand function.

Change the seed values for one of them to say something like:

fit01((rand($F * 2.4)),0,4)

Or however way you want.

VEX Function question: rotate July 9, 2017, 8:45 a.m.

That old exercise I was doing was not about doing a specific rotation, but rather ‘dectecting’ a float value that would represent any rotational value between 0 and 360 degrees.

The issue became for the float values that would represent exactly angles 0/360, 90, 280, and 270.

It turned out I wasn't aware of the issue of floating point errors.( not with Houdini, but with computers in general )

The solution in that case was to change my conditional statements and what I do in each case, like I mention above:

eg. if( (x < (90 - 0.001)) && (x > (90 + 0.001)))

Of course since that time I've become familiar with other vex functions that has enabled me to simplify (less verbose) my functions.

Although, I still had to set up my logic to take into account natural floating point errors inherent in computer processing.