Skip to main content
105 votes

Code that generates a mandala

Here is one way to come up with "mandalas" -- we generate a segment and then by appropriate number of rotations we produce a "mandala". Here is an example function of a random seed segment ...
Anton Antonov's user avatar
73 votes

How can I draw a Homer with epicycloids?

The main challenge to make something general is to create a list of points that, when joined, is as close as possible to the original image. The first example (elephant) focuses on the mathematical ...
anderstood's user avatar
  • 14.3k
72 votes

How to make this beautiful animation

Edit: Added the reversal and some refinements ...
Quantum_Oli's user avatar
  • 7,974
70 votes
Accepted

How to make this beautiful animation

I'd like to expand on Quantum_Oli's answer to give an intuitive explanation for what's happening, because there's a neat geometric interpretation. At one point in the animation it looks like there is ...
C. E.'s user avatar
  • 70.8k
68 votes

Code that generates a mandala

For this one I've defined three types of layer, a flower, a simple circle and a ring of small circles. You could add more for greater variety. ...
Simon Woods's user avatar
  • 85.1k
62 votes
Accepted

How to Make a Sankey Diagram

Here's the start of a SankeyDiagram function: ...
Carl Woll's user avatar
  • 131k
58 votes
Accepted

Generating Doyle spiral painting

TL;DR Yes, this can be done! If you read the article "Hexagonal circle packings and Doyle spirals" by Leys, you will see that for a choice p and ...
halirutan's user avatar
  • 113k
46 votes
Accepted

Draw impossible figure with MMA, how can it be done?

Edit Since TernaryListPlot is new in 13.1 version,for old version,we use ternary[{p1_, p2_, p3_}] = {p1 + 1/2 p2, Sqrt[3]/2 p2}; ...
cvgmt's user avatar
  • 76.5k
45 votes

Face Morphing with Mathematica

MMA version: 12.0 I'll use the following images, found on the internet under open licence (if you know how to share the images themselves, please let me know). I originally had chosen two more but ...
anderstood's user avatar
  • 14.3k
45 votes
Accepted

All that doesn't glitter isn't gold

Here is a possible approach using MaterialShading new in version 12.3. It is easier to get nice results on curved surfaces like a sphere without too much input. To ...
Tim Laska's user avatar
  • 16.4k
44 votes

Drawing Clifford Attractors in Mathematica

Parameters: a = -1.24458; b = -1.25191; c = -1.815908; d = -1.90866; Compiled function used for iteration: ...
Szabolcs's user avatar
  • 236k
42 votes
Accepted

Smoothing 3D contours as post processing

As announced before, here my take on the mean curvature flow for surfaces. The code is rather lengthy and I tried to recycle as much as possible from this post about finding minimal surfaces (solving ...
Henrik Schumacher's user avatar
40 votes
Accepted

Make a beautiful Moiré effect

I feel that once you start with Moire patterns, there's no ending. The way I would replicate these is by making a grid into a function (like @JasonB) but also parametrise the angle of rotation into it:...
gpap's user avatar
  • 9,787
39 votes
Accepted

How can I reproduce this mandala with Mathematica?

Update: We can get a shape similar (except for colors) to the one in OP using ScalingTransform as follows: ...
kglr's user avatar
  • 398k
37 votes

How can I adaptively simplify a curved shape?

We can use the Ramer-Douglas-Peucker algorithm to reduce the number of points. This algorithm was originally devised for processing map data. ...
Szabolcs's user avatar
  • 236k
36 votes
Accepted

How to create this spikey in Mathematica?

This is probably too slow to get a decent image, but here's a simple attempt. As JM suggests, you can use Geodesate to get a good set of points on the sphere. I ...
Simon Woods's user avatar
  • 85.1k
36 votes
Accepted

How to make this Dragon Curve?

I think OP may want animation with transition effects. Compare these two effects: Then translation ...
chyanog's user avatar
  • 15.6k
35 votes
Accepted

Generate landscape by cutting a plane in 3d

My solution does not follow the algorithm you described to the word (I don't choose two random points and find the line equation that runs through them but instead choose a random line equation) but ...
Sascha's user avatar
  • 8,469
34 votes
Accepted

How to project 3d image in the planes xy, xz, yz?

Update 2: The function projectToWalls does not work in version 12.0 because the function PlotRange no longer works. To fix the ...
kglr's user avatar
  • 398k
34 votes

Creating the Yin Yang symbol with minimal code

Unicode: \:262F (* ☯ *) For post-processing at higher resolution, we can rasterize this character to arbitrary pixel counts: ...
Roman's user avatar
  • 48.3k
34 votes
Accepted

Creating the Yin Yang symbol with minimal code

d = {#, 0} ~ Disk ~ ##2 &; Graphics@{d[4, 8, {0, π}], 8~d~4, {White, 0~d~4, d@8}, d@0, Circle @@ 4~d~8} ...
kglr's user avatar
  • 398k
33 votes
Accepted

How to generate image like QR code with Mathematica

This version of generation code is originally posted at wolfram community. I guess a story-telling type post would attract more upvotes and probably give some insight about how to 'solve problems' ...
Wjx's user avatar
  • 9,630
32 votes
Accepted

Visualize an irrational number

With a pie chart around it: ...
halmir's user avatar
  • 15.2k
32 votes
Accepted

How to insert dimensions in graphics?

You could turn the dimensioning into a handy function: ...
wxffles's user avatar
  • 14.2k
30 votes
Accepted

How can I better mimic the graphics at earth.nullschool.net?

I think you might be better off creating Graphics directly instead of using the StreamPlot style options. In this example I use ...
Simon Woods's user avatar
  • 85.1k
30 votes

Code that generates a mandala

The point of using machine learning algorithms for generation of mandala images mentioned in the comments of my previous answer is clarified in this blog post: "Comparison of dimension reduction ...
Anton Antonov's user avatar
29 votes
Accepted

Rounding the Corners of a Shape

UPDATE: The previous version of my answer worked, but did not give control on the rounding radius, nor did it fully work with as a starting point for a geometric region for further calculations. Here ...
MarcoB's user avatar
  • 67.4k
29 votes
Accepted

Inflection point and curvature

Let's rename things slightly to make it more consistent g = Fit[newdata, {1, x, x^2, x^3, x^4}, x]; To find inflection points, you can just put (blue) points ...
wxffles's user avatar
  • 14.2k
29 votes

Visualize an irrational number

With help of: (1) how to generate repeatable Unique streams? (2) Color Blend in BezierCurve (3) Is it possible to draw really thin lines in Mathematica? here is something to start: ...
Kuba's user avatar
  • 137k

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