# Tag Info

### 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 ...
• 37.9k

### 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. ...
• 85.2k

### Is there a linter to help write good Mathematica code?

I am a developer at Wolfram Research and I have been working on linter technology that I think would be nice to share publicly. There are 2 paclets on the public paclet server that you can download ...
• 521
Accepted

### 3D tree in Mathematica?

First, an idomatic, but slow version. ...
Accepted

### The Game of Hex in Mathematica

The flow in my program is: I have one global variable, board, which is an 11x11 matrix. Each matrix element corresponds to a hexagon on the board. I pass the board ...
• 71k
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 ...
• 8,519

### 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: ...
• 49.3k
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} ...
• 399k
Accepted

### What are some approaches to measuring code coverage?

Yes, there is a coverage tool, and it's pretty good. First, you need to install the required packages: ...
• 236k

### 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 ...
• 37.9k

### Code that generates a mandala

Completeley trial & error, but you can play around with it to your heart's content: ...
• 8,830

### Analogies to Help New Users

Imho some important things to translate between Matlab and Mathematica: "everything is a matrix (or inefficient)" vs. "everything is an expression" indexing into arrays: ...

### Is there an open source implementation of Mathematica-the-language?

Expreduce Expreduce is a new MIT-licensed project that has a fairly complete implementation of the language semantics. Further, it has a nice collection of definitions that provide CAS functionality, ...
• 473

### How to make Mathematica variables declarative instead of just-in-time?

You are looking for \$NewSymbol which is run every time a new symbol is created. For example, let say you only want x, ...
• 34.1k
Accepted

### Sisyphus Random Walk

We can iterate with FoldList: data = {0, 1, 1, 0, 1, 0, 1, 1, 1, 1}; FoldList[#2 * (#1 + #2)&, data] ...
• 36.4k
Accepted

### Programming the fiver game

In this case I don't know how to post something helpful without providing full code so I'll just do that and hope this wasn't homework. My emphasis is on clarity (hopefully) rather than brevity or ...
• 273k
Accepted

### How to put Mathematica Notebooks and packages on Github?

General comment Your question suggests that you might be on the wrong or at least on a stony path. Let me try to clear some things up even if it is not strictly Mathematica correlated. Yes, you can ...
• 113k

### Can we intelligently control evaluation in Thread?

Analysis of the problem All functions in Mathematica either hold one or more of their arguments, or per The Standard Evaluation Procedure the arguments are evaluated before the function is applied. <...
• 273k
Accepted

### Simulation of diffusion in a grid

You can use ListConvolve to simulate a single diffusion time step and build a simulation out of that. I'll show a simple example: Let's say we start with simple ...
• 8,834
Accepted

### Programming language prototyping in Mathematica

General Some general answers and comments first. 1 Are you aware of any projects using the Wolfram language resp. Mathematica as an environment to explore the design of programming languages - in ...
• 37.9k

### Once more on object orientation in Mathematica: does it have to be so hard?

After years of development, I'm releasing a package called MTools on github. The package is under an MIT license. You can fork it and send pull requests. The main contribution of MTools is to allow ...
• 11k

### What are the recommended settings for git when using with Mathematica projects?

The solution I am currently using is to work with *.wls script files. You can do nearly all the things you do with usual *.nb notebooks files (as shown in my screen shot). The big advantage is ...
• 2,493
Accepted

### Where can I get Workbench 3 and why do I need it?

Update November 25, 2022 (There is hope after all...) I was told by @RolfMertig in a comment that I may have been "too harsh" with Workbench/Eclipse and giving it some consideration, I have ...
• 13.6k
Accepted

...
• 399k

### How do you set attributes on SubValues?

This is an old discussion but is about an issue that resurfaces every now and then. One of the best (for a given sense of elegance) answers is the one posted on Stack Overflow ...
• 2,115

### Is there a more elegant way to write this statement?

Total[Range[CubeRoot[10000]]^3] 53361
• 36.2k

### The Game of Hex in Mathematica

Here is an answer that provides modular definitions that allow plotting the play-table and players moves with different options, and testing for a complete path by a player. (The function ...
• 37.9k

### 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 ...
• 69.7k
Accepted

### Functions with changeable global variables

Introduction The question is: how to correctly organize all this? Of course, there are many ways to answer the question, ranging from re-education suggestions to click-through paths in a relevant ...
• 37.9k