5k views

### Partitioning with varying partition size

How can I partition a list into partitions whose sizes vary? The length of the $k$'th partition is a function $f(k)$. For example: if $l = \{1, 2, 3, 4, 5, 6\}$ and $f(k) = k$. Then the partitioning ...
7k views

### Create a torus with a hexagonal mesh for 3D-printing

I am new to Mathematica, and I'm looking for a way to create patterns on the surface of 3D objects. One thing I have not been able to do is to create a hexagonal mesh on a torus. What I would like to ...
1k views

### Drawing a trihexagonal tiling

I am trying to draw a trihexagonal tiling of the following form using Mathematica. I attempted to begin by using the result given in this Stack Overflow Q & A. However, I couldn't figure out how ...
1k views

### How can I get the number of slots in Function?

Suppose that I define f = Function[#1 + #2]; And I want to define a new function, argsNum, so that it returns a number of ...
331 views

### HoldForm[Operator ##] on some list

Recently in response to this question Mr.Wizard suggested an unusual way to summing numbers. This doesn't seem to be documented. ...
817 views

### How can I reorder the factors in the terms of a polynomial?

How can I reorder the factors in the terms of a polynomial? Consider ...
993 views

### Finding all length-n words on an alphabet that have a specified number of each letter

For example, I might want to generate all length n=6 words on the alphabet {A, B, C} that have one ...
172 views

### Creating MeshRegions of various 2D lattices

This is a soft question about the best approach to design a function that creates MeshRegion objects of various 2D lattices, e.g. kagome or hexagonal, all through ...
147 views

### How would I add together any list of arguments as a pure function?

Let's say I have a list of arguments, of any length. How would I add them all together? f = Evaluate[Plus @@ Array[Slot, 3]] & f[1, 2, 3] This would add ...
107 views

### Why doesn't defined MakeBoxes display what is constructed in RHS?

Inspired by the @ybeltukov 's answer to this question, if I have the following polynomial poly = a^2 + (a^2 + b^2 - c^2)*x + b^2*x^2; var = x; this generates ...