Jump to content

copy to points - variant issue


Recommended Posts

Salut David,

it's weird indeed. I bet it's from the random function at ZERO.

Here is one way to go around the problem:

just replace the multiple by your seed (*) by an addition (+) then it should avoid the zero, and solve your problem ;)

 

i@variant=int(fit01(rand(@ptnum+chf("seed")),0,3));

instead of :

i@variant=int(fit01(rand(@ptnum*chf("seed")),0,3));

Edited by 6ril
  • Like 1
Link to comment
Share on other sites

9 minutes ago, 6ril said:

Salut David,

it's weird indeed. I bet it's from the random function at ZERO.

Here is one way to go around the problem:

just replace the multiple by your seed (*) by an addition (+) then it should avoid the zero, and solve your problem ;)

 

i@variant=int(fit01(rand(@ptnum+chf("seed")),0,3));

instead of :

i@variant=int(fit01(rand(@ptnum*chf("seed")),0,3));

you're right ;) thanks for your help :)

Link to comment
Share on other sites

if you want to be safer and also to avoid increasing seed by increments of 1 just offseting the same random number to the next point you can use 2 dimensional rand(float, float) 

i@variant=int(fit01(rand(@ptnum,chf("seed")),0,3));

 

  • Like 2
Link to comment
Share on other sites

1 hour ago, anim said:

if you want to be safer and also to avoid increasing seed by increments of 1 just offseting the same random number to the next point you can use 2 dimensional rand(float, float) 


i@variant=int(fit01(rand(@ptnum,chf("seed")),0,3));

 

 
 
 
 

thanks :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...