Skip to main content
19 votes

How to create a random zonogon?

We can using Minkowski Sum (RegionDilation) of any Line's from the fixed point ...
cvgmt's user avatar
  • 76.9k
19 votes
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 ...
cvgmt's user avatar
  • 76.9k
14 votes
Accepted

Can we emulate Paul Henry's drawing machine?

An attempt: ...
vindobona's user avatar
  • 4,951
13 votes
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] ...
vindobona's user avatar
  • 4,951
12 votes

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

...
kglr's user avatar
  • 398k
11 votes
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 ...
cvgmt's user avatar
  • 76.9k
10 votes
Accepted

How to create a random zonogon?

You can get some shapes with AffineTransform and Rotate. Define: ...
Vitaliy Kaurov's user avatar
10 votes

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

Sinusoid ...
Syed's user avatar
  • 55.7k
10 votes
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. ...
vindobona's user avatar
  • 4,951
9 votes
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....
azerbajdzan's user avatar
  • 19.7k
9 votes

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 ...
Daniel Huber's user avatar
  • 53.1k
8 votes
Accepted

Fill data points within the boundary established by the given points

...
Syed's user avatar
  • 55.7k
8 votes
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. ...
Syed's user avatar
  • 55.7k
7 votes

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: ...
Daniel Huber's user avatar
  • 53.1k
7 votes
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. ...
JimB's user avatar
  • 41.9k
6 votes

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 ...
lericr's user avatar
  • 30.2k
6 votes

Fill data points within the boundary established by the given points

Since the points are in order,we can only use Polygon@bound. ...
cvgmt's user avatar
  • 76.9k
6 votes

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: <...
SHuisman's user avatar
  • 3,448
6 votes
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 ...
Domen's user avatar
  • 27.3k
6 votes
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: ...
Domen's user avatar
  • 27.3k
5 votes

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 <...
Joshua Schrier's user avatar
5 votes

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... ...
MelaGo's user avatar
  • 8,751
5 votes

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}]
lericr's user avatar
  • 30.2k
5 votes

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 ...
cvgmt's user avatar
  • 76.9k
5 votes
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 ...
JimB's user avatar
  • 41.9k
5 votes

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

Using a RelationGraph projection: ...
vindobona's user avatar
  • 4,951
4 votes

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 ...
Syed's user avatar
  • 55.7k
4 votes

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 ...
Anton Antonov's user avatar
4 votes
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 ...
tad's user avatar
  • 2,095
4 votes

Efficiently fill an ellipse with a k-many random ellipses

Using DiscretizeRegion: (as a guide) ...
Syed's user avatar
  • 55.7k

Only top scored, non community-wiki answers of a minimum length are eligible