Skip to main content
82 votes
Accepted

How to make a Spherical Cow?

...
andre314's user avatar
  • 18.7k
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
51 votes
Accepted

Why is raytracing so slow?

Update: Extended to Include 3D Shapes I have extended the workflow to include using 3D shapes including an imported 3D CAD object at the end of this answer. Original Post Here is a slight ...
Tim Laska's user avatar
  • 16.4k
42 votes
Accepted

Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Here is a method that utilizes $H^1$-gradient flows. This is far quicker than the $L^2$-gradient flow (a.k.a. mean curvature flow) or using FindMinimum and friends, ...
Henrik Schumacher's user avatar
39 votes

Why is raytracing so slow?

EDIT 01: The original code had an issue when the angle of the ray is counterclockwise from the normal of the circle, which I didn't catch. The code should be correct now, I think. ...
MassDefect's user avatar
  • 10.1k
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.7k
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
  • 399k
31 votes

How to make a Spherical Cow?

Get cow as a mesh region: cow = ExampleData[{"Geometry3D", "Cow"}, "MeshRegion"]; Take coordinates of 0 cells: ...
halmir's user avatar
  • 15.2k
28 votes
Accepted

Project map to a particular shape

If the domain $\varOmega$ of the county is simply connect, one might use the Riemannian mapping theorem. For $z_0 \in \varOmega^\circ$, we make the following ansatz for the holomorphic map $f \colon \...
Henrik Schumacher's user avatar
26 votes

How to roll a graph on the y-axis

We calculate the tangent vector of parametric curve {t^2,t} and the ArcLength from 0 to <...
cvgmt's user avatar
  • 77.8k
23 votes

Transform sphere to an ellipse in $\mathbb{R}^2$

Another visualization you might find helpful: ...
chuy's user avatar
  • 11.2k
23 votes
Accepted

Divide a geometric region by (many) lines

You can find symbolic connected components (which are those regions you are asking about) in this case using CylindricalDecomposition. This can be a bit of an ...
kirma's user avatar
  • 19.1k
22 votes

how to get $n$ equidistributed points on the unit sphere

If more ad hoc, inexact approaches are welcome, one way to generate relatively uniform density of points on a sphere is to use Monte Carlo Lloyd's algorithm (modified for the spherical case): ...
kirma's user avatar
  • 19.1k
22 votes

How to draw a certain region and calculate its area and perimeter?

Show it: ...
yode's user avatar
  • 26.9k
22 votes

How to generate approximately equally spaced points efficiently

Many solutions similar to how to get $n$ equidistributed points on the unit sphere are possible, especially if one can accept that points are not on the edges of a region. For instance, one can use ...
kirma's user avatar
  • 19.1k
21 votes

Transform sphere to an ellipse in $\mathbb{R}^2$

...
yarchik's user avatar
  • 19.2k
21 votes
Accepted

How to generate approximately equally spaced points efficiently

Annealing Found this to be an interesting question and immediately I thought it to be a good application for simulated annealing. Here's a little unoptimized annealing function I wrote. The idea is ...
Kelly Lowder's user avatar
20 votes
Accepted

Surface area of ellipsoid

In the documentation of Area: The area of a region of dimension three or higher is $\infty$: For the surface area you can do: ...
halmir's user avatar
  • 15.2k
20 votes

Creating the Yin Yang symbol with minimal code

I think the code in the OP is nice and concise, and generates a good graphic. But if brevity is the goal, you can turn to the Knowledgebase via ...
Jason B.'s user avatar
  • 69.2k
19 votes

Make an offset curve (parallel curve)

...
ubpdqn's user avatar
  • 62.8k
19 votes

Is there a way to randomly distribute points within a circle on the surface of a sphere?

You can intersect the sphere and a cylinder, and then use RandomPoint. For example, here is a random point on the sphere: ...
Carl Woll's user avatar
  • 131k
18 votes
Accepted

Pentagonal spiral in Mathematica

Late to the party~ A slight modification to make them more similar: ...
Wjx's user avatar
  • 9,630
18 votes

Inverted version of Sierpinski triangle

Yes, as the other people noted, this geometric transformation called inversion is just mapping coordinate $r$ in a polar coordinate system onto the coordinate $1/r$ (the other coordinate - angle - ...
VividD's user avatar
  • 3,670
18 votes

How to do this Padovan spiral using Mathematica?

You can do this rather nicely with GeometricScene. ...
Carl Lange's user avatar
  • 13.1k
17 votes
Accepted

Draw a circle through 4 points on parabola

This is a motivating post. I have made no effort to deal with intersection <4 pts. I post only illustrative examples. The centre of the circle is the intersection of perpendicular bisectors of ...
ubpdqn's user avatar
  • 62.8k
17 votes

How to visualize the Cremona method for cardioid generation

Using CirclePoints, Mod, Throughand Range More than ...
rhermans's user avatar
  • 36.9k
17 votes

How to construct rectangular figures from the Fibonacci numbers?

NestList[] is very handy for situations like this: ...
J. M.'s missing motivation's user avatar
17 votes

How to straighten a curve?

Here is a "homotopy style" transformation between functions $h(x, q) = (1-q) f(x) + q g(x)$. ...
I.M.'s user avatar
  • 3,106
17 votes
Accepted

Checking if two line segments intersect

You could try this: ...
irchans's user avatar
  • 316
16 votes
Accepted

how to get $n$ equidistributed points on the unit sphere

Aha~ I suppose this question is created while solving this. Am I correct @yode :P So here's an easy solution, simple, elegant, and may I say even quite fast after some optimization? ...
Wjx's user avatar
  • 9,630

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