1.2 Thursday, May 20, 2021

1.2.1 Top new questions this week
1.2.2 Greatest hits from previous weeks
1.2.3 Can you answer these questions?

1.2.1 Top new questions this week

Stable fluids code for electromagnetic mixture application
How can I create an animation showing how a circular sector deformed to a cone?
Dataset from association of lists doesn’t work
Creating the Yin Yang symbol with minimal code
On the ordering of the vertices of a polygon
Is it possible to vary the thickness of curves according to their color code
How can I style a Line like "Glassrectangle"?

Stable fluids code for electromagnetic mixture application

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246091

This code has been translated from the original Jos Stam code and improved with some Mathematica functions. It solves problem of viscous incompressible flow with electromagnetic force in a rectangle ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 14 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 11 votes

How can I create an animation showing how a circular sector deformed to a cone?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246171

I want to create the following animation with Mathematica.

What is the simplest way to do so? My first effort:

asked by Kim Jong Un https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 12 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

Dataset from association of lists doesn’t work

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246088

Mathematica 12 on wolfram cloud isn’t rendering the table for an association of lists. According to the documentation you should be able to make columns in the table by:

However I tried this

asked by Ion Sme https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62529 10 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 9 votes

Creating the Yin Yang symbol with minimal code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246309

The following code creates the Yin Yang symbol

asked by nilo de roock https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=156 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 15 votes

On the ordering of the vertices of a polygon

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245994

Writing:

pts = {{1, 0}, {2, 0}, {2, 3}, {3, 3}, {3, 4}, {0, 4}, {0, 3}, {1, 3}, {1, 0}}; 
Graphics[{Red, Point[pts], Blue, Line[pts]}]

we get:

and all of this ...

asked by Rolex https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80016 9 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 15 votes

Is it possible to vary the thickness of curves according to their color code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246125 I have this data data = Table[{x, Sin[5 x], Tanh[3 x]}, {x, -1, 1, 0.01}];

which I plot as follows

asked by valar morghulis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26937 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 6 votes

How can I style a Line like "Glassrectangle"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246046

I’d like a thick Line to look like ChartElementFunction -> "GlassRectangle" How can that be accomplished?

asked by Gannicus https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80033 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 11 votes

1.2.2 Greatest hits from previous weeks

What’s the most difficult multidimensional integral that Mathematica has solved?
Extract real part of a complex expression better than Re does
Exporting graphics to PDF - huge file
My Girlfriend is going to prison...Save her with Math
How to plot an ellipse?
Is there something like DensityPlot3D to visualize atomic orbitals?
Calling Correct Function for Plotting DiracDelta

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 34 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 54 votes

Exporting graphics to PDF - huge file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1542

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

asked by Matthew Leingang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=395 109 votes

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

Salacious title, but true story.

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

I’m new to Mathematica, and I’m finding it difficult to plot an ellipse. I tried using

 Plot[(x/5)^2 + (y/3)^2 == 1, {x, -5, 5}, {y, -3, 3}]

but I’m getting ...

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 18 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 30 votes

Is there something like DensityPlot3D to visualize atomic orbitals?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32378

I’m visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something ...

asked by Peeter Joot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10 45 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 25 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

1.2.3 Can you answer these questions?

Speeding up this function?
Error when integrating with constants?
Is there an analog of ArrayQ for datasets?

Speeding up this function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246242 Is there a way to speed this function?

asked by An old man in the sea. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11313 2 votes

Error when integrating with constants?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246300

I’m trying to integrate an ellipse: (x^2)/alpha^2) + ((y^2)/beta^2) = 1. I am not sure if I should have insert constants for alpha and beta or if there’s a way to keep them there.

This is my code

asked by user80088 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80088 1 vote

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 0 votes

Is there an analog of ArrayQ for datasets?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246152

ArrayQ provides a nice way to check for missing data (specifically, it checks if the array is ragged). But if you import your data as a dataset, and apply ArrayQ, it will return False for both ragged ...

asked by theorist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45215 1 vote