We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys,
I am trying to make a surface using ISurface command of igeo library and I used a 2d array of vector points to create the surface and I set a random value for z parameter of each point. but it appears random function is not that much random and it generates repetitive values. so anyone knows how to get really random values?
Answers
What makes you think you aren't getting random values?
Because as you see in image there is a constant cycle that changes all values in each row in U direction : form 0 to near 5 and 0 again.
You may want to look at section 1.6+ on this page (Excersize 1.10 in fact is what you're trying to do) and instead use perlin noise instead. With a sin wave, you'll consistently be multiplying a random number by a repeating variable, which over time will have the same general trend. This is even more of a problem when multiplying near the zeros of the sin wave, since the value i will be multiplied by will be extremely small, which will lead to that repeating flat ground pattern.
Perlin noise uses different clever math that makes a lot more natural looking random landscape which I believe is what you're looking for.
Try:
instead of:
on line 12.
Does that fix it?
You were right TfGuy44! I made a silly mistake