<p>This isn't coming from graphics but more from some simple synthetic data generation problem but I have a hunch there are tricks from landscape generation to use here.</p>
<p>Consider the line (1d) for simplicity. I want to generate random points on the line in some interval of interest. But then I want to also be able to generate those points in another interval and when I &quot;grow&quot; the interval, the generation should be consistent. For example, if I generate exponential intervals I have a kind of Poisson random measure.</p>
<p>But how can I do this efficiently without just hard-coded some &quot;origina&quot; and simulating from there? I can pick a coarse grid I suppose and do some messing around but keeping the distribution consistent is tricky.</p>
<p>I am interested in tricks that just work and also anything that actually guarantees the correct simulating distribution (whatever we were using to generate the sequences).</p>

CC BY-SA 4.0
2021-05-06T13:13:26.910Z
I couldn't understand your question, it was too vague and unspecific at various points.
lightxbulb
CC BY-SA 4.0
2021-05-06T13:33:51.817Z
@lightxbulb I was thinking about generating a pseudo-random Poisson process on the line (for example). And the only way I know is to pick a "good" anchor point and start generating from there. If you query the line at an interval far away from the anchor point this could be quite bad. I am wondering if there are any tricks to avoid having to generate massive amounts of data or precompute anything.
safetyduck
CC BY-SA 4.0
2021-05-06T14:16:48.430Z
Could you clarify your question formulation, because currently you have: "I want to generate random points on the line in some interval of interest. But then I want to also be able to generate those points in another interval and when I "grow" the interval, the generation should be consistent.", which is extremely vague. Is the Poisson distribution a hard constraint or just an example, etc.
lightxbulb
CC BY-SA 4.0
2021-05-06T19:48:48.900Z
Is this the thing you're talking about? https://en.wikipedia.org/wiki/Poisson_point_process
Nathan Reed
CC BY-SA 4.0
2021-05-07T12:11:58.673Z
@NathanReed Yes exactly. And that is just an example of a process. Another one more familiar to CG folks I think might be a deterministic terrain generator. For example if you allow spawning to random spatial locations in a flat universe and you want everything to be reproducible and be able to "start" generation at any point in space without generating the whole space. Maybe there are special tricks with special pseudo-random sequences?
safetyduck
CC BY-SA 4.0
2021-05-07T15:33:23.553Z
I think the way you do that is to slice up the space in tiles, associate each tile to a different seed for a PRNG (for instance by hashing the tile xy coordinates), and generate the tiles within the region of interest.
Nathan Reed
CC BY-SA 4.0
2021-05-07T17:08:27.863Z
@NathanReed cool yeah I think we would call that a kind of multi-scale or fine/coarse grain solution in maths/comp stat. Seems like the most pragmatic for that case.
safetyduck
<procedural-generation>
Efficiently generating consistent procedural sequences from random seed and a start point?
safetyduck
# Efficiently generating consistent procedural sequences from random seed and a start point?

(Asked by: username_0 on 2021-04-30)

This isn't coming from graphics but more from some simple synthetic data generation problem but I have a hunch there are tricks from landscape generation to use here.

Consider the line (1d) for simplicity. I want to generate random points on the line in some interval of interest. But then I want to also be able to generate those points in another interval and when I "grow" the interval, the generation should be consistent. For example, if I generate exponential intervals I have a kind of Poisson random measure.

But how can I do this efficiently without just hard-coded some "origina" and simulating from there? I can pick a coarse grid I suppose and do some messing around but keeping the distribution consistent is tricky.

I am interested in tricks that just work and also anything that actually guarantees the correct simulating distribution (whatever we were using to generate the sequences).

**Tags:** procedural-generation

> **Comments:**
> **username_1**: I couldn't understand your question, it was too vague and unspecific at various points.  
> **username_0**: @username_1 I was thinking about generating a pseudo-random Poisson process on the line (for example). And the only way I know is to pick a "good" anchor point and start generating from there. If you query the line at an interval far away from the anchor point this could be quite bad. I am wondering if there are any tricks to avoid having to generate massive amounts of data or precompute anything.  
> **username_1**: Could you clarify your question formulation, because currently you have: "I want to generate random points on the line in some interval of interest. But then I want to also be able to generate those points in another interval and when I "grow" the interval, the generation should be consistent.", which is extremely vague. Is the Poisson distribution a hard constraint or just an example, etc.  
> **username_2**: Is this the thing you're talking about? https://en.wikipedia.org/wiki/Poisson_point_process  
> **username_0**: @username_2 Yes exactly. And that is just an example of a process. Another one more familiar to CG folks I think might be a deterministic terrain generator. For example if you allow spawning to random spatial locations in a flat universe and you want everything to be reproducible and be able to "start" generation at any point in space without generating the whole space. Maybe there are special tricks with special pseudo-random sequences?  
> **username_2**: I think the way you do that is to slice up the space in tiles, associate each tile to a different seed for a PRNG (for instance by hashing the tile xy coordinates), and generate the tiles within the region of interest.  
> **username_0**: @username_2 cool yeah I think we would call that a kind of multi-scale or fine/coarse grain solution in maths/comp stat. Seems like the most pragmatic for that case.  

---

## 0 answers

