# Tag Info

## Hot answers tagged random

### How to create a random zonogon?

We can using Minkowski Sum (RegionDilation) of any Line's from the fixed point ...
• 76.9k
Accepted

### Reproducing Heinrich Heidersberger's Rhythmograms

A starting point We use two variables {u,v}: a parametric form of Mobius Strip f[u,v] and product with some factors to ...
• 76.9k
Accepted

An attempt: ...
• 4,951
Accepted

### Early computer art - reproducing Harold Cohen's turtle drawings

Update: Smoothing the color transition by restyling each image with itself.. Multicolumn[Table[SeedRandom[r]; ImageRestyle[#, #] &@draw, {r, Range[4]}], 2] ...
• 4,951

...
• 398k
Accepted

### Vera Molnár's interruptions - erasing graphic elements

We define the rotated lines by RotationTransform in order to keep the lines be the Region. We use ...
• 76.9k
Accepted

### How to create a random zonogon?

You can get some shapes with AffineTransform and Rotate. Define: ...
• 73.4k

Sinusoid ...
• 55.7k
Accepted

### Michael Noll's early computer art - arranging graphic elements in a circular manner

Starting from eldo's initial solution and using RegionWithin in order to limit the set of generated lines to a certain disk area. ...
• 4,951
Accepted

### How to condition all cells of a notebook to a specific SeedRandom?

SetOptions[EvaluationNotebook[], CellProlog :> (SeedRandom[45])] Then before evaluating any cell SeedRandom[45] is evaluated....
• 19.7k

### How to create a random zonogon?

You can start with a regular 2n polygon that has 2 sides parallel to the x axis. Then stretch the polygon along the x axis. Afterwards, you rotate the polygon so that the next side is parallel to the ...
• 53.1k
Accepted

...
• 55.7k
Accepted

### Split a sequence with conditions

The following will split the integer 100 into exactly four partitions, but with numbers restricted to multiples of 10. ...
• 55.7k

### Vera Molnár's interruptions - erasing graphic elements

Here is an example using a random walk. First we create all the lines. Then we delete lines along a random path: ...
• 53.1k
Accepted

### How to use Mathematica to find the maximum expected value of multiple normal distributions?

This is only a partial answer in that it only provides the means for $n=2$ through $n=5$. With $n>6$ Mathematica only returns the input. ...
• 41.9k

### Incrementing a random element of an array repeatedly

I don't know how to answer just in the comments, so here's a non-solution reply to your question. Is there any principle you can articulate by which one could make one's code more robust to this kind ...
• 30.2k

### Fill data points within the boundary established by the given points

Since the points are in order,we can only use Polygon@bound. ...
• 76.9k

### How to create a random zonogon?

A much cheaper way is by just creating directions and line pieces and assembling (over the much more expansive Minkowski sum/RegionDilation), and much more random than the stretched regular polygons: <...
• 3,448
Accepted

### Fill a matrix with randomly placed elements that are a certain distance apart

If you really want to sample randomly (and uniformly), I believe you should first construct the set of all possible rows (or ensure the uniformness in some other way). Here is an approach using ...
• 27.3k
Accepted

### Why is random sampling with ordinary and compiled code so different?

Your hackery way of injection function definitions into Compile is the root of your troubles. Observe the output of the following code: ...
• 27.3k

### Incrementing a random element of an array repeatedly

I suspect this is a subtle interaction between the HoldFirst attribute of Increment and the HoldAll attribute of While. Possible Fix? Adding a semicolon inside the <...
• 3,376

### How to use first time generated randomly matrix?

You can call your function once to generate the matrix, and store the result in a different variable... ...
• 8,751

### How to use first time generated randomly matrix?

You might be looking for memoization: V[i_, j_] := V[i, j] = Table[RandomInteger[{-10 i, 10 j}], {3}, {3}]
• 30.2k

### Efficiently fill an ellipse with a k-many random ellipses

We re-write the code from the document of RegionDisjoint https://reference.wolfram.com/language/ref/RegionDisjoint.html ...
• 76.9k
Accepted

### How to compile the following code (sampling from a distribution)?

Is UniformDistribution compilable? (Or maybe RandomReal?) If so, then making use of the fact that a ...
• 41.9k

### Fill a matrix with randomly placed elements that are a certain distance apart

Using a RelationGraph projection: ...
• 4,951

### Plotting a unit length line given its midpoint and an angle

Another way of doing this would be to generate and join two diametrically opposite points around a circle of radius 1/2 at each location while incorporating the ...
• 55.7k

### How to generate a random snowflake?

For couple of years I was thinking that I should post an answer here using the RandomMandala framework. So, finally (after some experimentation) I got reasonable ...
• 37.9k
Accepted

### Efficiently fill an ellipse with a k-many random ellipses

One way to get non-overlapping ellipses is to place their centers far enough apart that they don't overlap no matter how they are oriented: use HardcorePointProcess to determine the centers, within a ...
• 2,095