08:46
Question: Can anyone give a generated example of a 3D
MeshRegion
consisting of Hexahedron
s or similar?
Context: A 2D
MeshRegion
may consist of polygons of any shape. In 3D, only a limited number of cell shape types are allowed. I have only seen DiscretizeRegion
produce tetrahedral elements. But Hexahedron
, Pyramid
and Prism
are also technically allowed. While I could manually construct a MeshRegion
out of these, I do not think I've ever seen them in practical applications. Which functions return MeshRegion
s with such elements?
@Szabolcs Indeed, applications of hex-meshes can rarely be found in Mathematica.
k = 3; MengerMesh[k, 3]
is one of the few examples I know. @Szabolcs `Needs["NDSolve`FEM`"];
MeshRegion[ToElementMesh[Cuboid[], "MeshOrder" -> 1]]` is another.
MeshRegion[ToElementMesh[Cuboid[], "MeshOrder" -> 1]]` is another.
09:19
I once thought that this generality has been introduced to support the
"MeshRegion"
property of PolyhedronData
. But even PolyhedronData["Cube", "MeshRegion"]
retuns a tetrahedralized mesh.
4 hours later…
13:12
@rm-rf I'm using your pygments plugin with minted in LaTeX. The lexer and style is installed in the python directory and everything works. I can change colors in the
style.py
and see the changes in my document. Is there a way to define a style local to my document? If not, is there a way to define an additional style class with a separate name? Just putting an additional class in the syle file like you with MathematicaNotebookStyle
doesn't seem to work.
1 hour later…
14:28
@b3m2a1 It seemed like all the scientific computing hipsters I know were crazy about Julia so I gave it a shot recently. Of course there must be a learning curve, so it won't be as easy as Mathematica for me, but the most painful thing was: there's no way to clear variables.
I'm used to interacting with MMA, messing around, fixing my mistakes, etc. With Julia I had to restart the kernel all the time.
2 hours later…
16:25
@halirutan I think the right way to do this would be to 1) create a new Pygments style and 2) register it as a plugin. That way, you won't have to hack the source and it is reproducible. With this, you can have the style sources in your LaTeX project folder and you just install it once to your python distribution to work alongside the default pygments + mma plugin.
This is, in fact, what the mma pygments plugin does — it registers new lexers and new styles to work alongside the vanilla pygments. See
setup.py
for the entry points where we declare them. You can copy most of the code there, remove the lexer, change the corresponding stylesheets and give it a new package name.
1 hour later…
« first day (2425 days earlier) ← previous day next day → last day (2360 days later) »