Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Dynamic Interactivity sorted by active[GIF] Double Projection (Projected rotating 16-cell)
http://community.wolfram.com/groups/-/m/t/1525648
![Projected rotating 16-cell][1]
**Double Projection**
This is a similar idea to [_J34_][3]: starting with the vertices of the 16-cell (a.k.a. cross polytope, a.k.a. orthoplex) and thinking of them as points on the 3-sphere, I'm applying a rotation, then projecting down to the 2-sphere using the [Hopf map][4]. From there, the difference from _J34_ is that I'm taking those points on the 2-sphere, forming a spherical disk of radius 0.4, then stereographically projecting down to the plane (this last step uses the `ProjectedSphericalCircle[]` function from [_Small Changes_][5] which, given the center and radius of a disk on the sphere, outputs a `Disk[]` in the plane which is its stereographic image).
First of all, we need the Hopf map and the [smootherstep function][6]:
Hopf[{x_, y_, z_, w_}] := {x^2 + y^2 - z^2 - w^2, 2 y z - 2 w x, 2 w y + 2 x z};
smootherstep[t_] := 6 t^5 - 15 t^4 + 10 t^3;
And the vertices of the 16-cell:
sixteencellvertices =
Normalize /@
Flatten[Permutations[{-1, 0, 0, 0}]^# & /@ Range[1, 2], 1];
And then this is the animation code:
With[{pts = Normalize /@ sixteencellvertices, viewpoint = 2 {1, 0, 0},
cols = RGBColor /@ {"#00adb5", "#f8b500", "#1a0841"}},
Manipulate[
Graphics[
{Blend[
cols[[;; 2]], (Floor[t] + Sign[1 - t] smootherstep[Mod[t, 1]])],
Table[
ProjectedSphericalCircle[
RotationMatrix[π/2, {0, 0, 1}].
Hopf[
RotationMatrix[π/2 (Floor[t] + smootherstep[Mod[t, 1]]), {{1, 1, 0, 0}, {0, 0, 1, 1}}].pts[[i]]
],
.4],
{i, 1, Length[pts]}]},
PlotRange -> 3, ImageSize -> 540, Background -> cols[[-1]]],
{t, 0, 2}]
]
Finally, here's an image where I've composited together all of the frames of a similar animation (essentially the same thing without the `smootherstep` function, so it's just a constant-speed rotation):
![All frames of the animation composited together][2]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=circles9.gif&userId=610054
[2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=circle9Still2.png&userId=610054
[3]: http://community.wolfram.com/groups/-/m/t/1521244
[4]: https://en.wikipedia.org/wiki/Hopf_fibration
[5]: http://community.wolfram.com/groups/-/m/t/1282077
[6]: https://en.wikipedia.org/wiki/SmoothstepClayton Shonkwiler2018-10-21T15:00:28Z[GIF] J34 (Hopf projection of the 600-cell)
http://community.wolfram.com/groups/-/m/t/1521244
![Hopf projection of the 600-cell][1]
_J34_
This shows a rotating 600-cell under the Hopf map. At least for the particular choice of coordinates I'm using, each of the 120 vertices of the 600-cell lies in the same complex line as 3 others, so the initial projection only has 30 vertices (in fact, it is the [pentagonal orthobirotunda][2]). With this particular rotation, two pairs split off before recombining.
Here's the Hopf map, along with the [smoothstep function][3]:
Hopf[{x_, y_, z_, w_}] := {x^2 + y^2 - z^2 - w^2, 2 y z - 2 w x, 2 w y + 2 x z};
smoothstep[x_] := 3 x^2 - 2 x^3;
And the vertices of the 600-cell, defined partially in terms of the vertices of the 8-cell and the 16-cell:
eightcellvertices = Normalize /@ {-1, -1, -1, -1}^# & /@ Tuples[{0, 1}, 4];
sixteencellvertices = Normalize /@ Flatten[Permutations[{-1, 0, 0, 0}]^# & /@ Range[1, 2], 1];
six00cellvertices = Join[sixteencellvertices, 1/2 eightcellvertices,
Flatten[
Outer[
Permute, (1/2 {GoldenRatio, 1, 1/GoldenRatio, 0}*{-1, -1, -1, 0}^Append[#, 1] & /@ Tuples[{0, 1}, 3]),
GroupElements[AlternatingGroup[4]],
1],
1]
];
And, finally, here's the animation:
With[{pts = six00cellvertices, viewpoint = 2 {1, 0, 0},
cols = RGBColor /@ {"#c3f1ff", "#f87d42", "#00136c"}},
Manipulate[
Graphics3D[
Table[
Sphere[Hopf[RotationMatrix[2 π/5 smoothstep[t], pts[[{5, 27}]]].pts[[i]]], .2],
{i, 1, Length[pts]}],
PlotRange -> 1.2, ViewAngle -> π/7, Boxed -> False,
ImageSize -> 540, ViewPoint -> viewpoint,
Background -> cols[[-1]],
Lighting -> {{"Spot", cols[[1]], {{0, 0, -.75}, {0, 0, 1}}, π/2},
{"Spot", cols[[2]], {{0, 0, .75}, {0, 0, -1}}, π/2},
{"Ambient", cols[[-1]], viewpoint}}],
{t, 0, 1}]
]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sphere22q.gif&userId=610054
[2]: https://en.wikipedia.org/wiki/Pentagonal_orthobirotunda
[3]: https://en.wikipedia.org/wiki/SmoothstepClayton Shonkwiler2018-10-19T03:09:23ZCreate an interface for a drinks vending machine?
http://community.wolfram.com/groups/-/m/t/1518375
Hello everyone, if someone were available, I would need a hand in the making of a mathematical machine, I thought to realize the interface of a distributor of drinks that tells me to enter the money, select the code concerning the drink and then, in based on the money inserted, give me rest if the cost of the drink is lower than what is entered. However, since I should use wolfram mathematica I do not know how to set the algorithm, as I am not very familiar with this program.
See the following code:
stringa1 = "Inserire soldi:";
stringa2 = "Inserire codice bibita:";
Column[{{InputField[stringa1, String],
InputField[Dynamic[beta], Number],
Button["Clicca qui",
Print[InputField[stringa2, String],
InputField[Dynamic[alph], String]]]}}]
If someone would give me a hand I would do a big favor .... thanks in advance.Pasquale Rossi2018-10-17T20:06:52ZPseudo-Dynamic Approach to the Numerical Solution of Nonlinear PDEs
http://community.wolfram.com/groups/-/m/t/1516751
New *THE MATHEMATICA JOURNAL* article:
----------
[Pseudo-Dynamic Approach to the Numerical Solution of Nonlinear Stationary Partial Differential Equations][1]
--------------------------------------------------------------------
*by ALEXEI BOULBITCH*
--------------------------------------------------------------------
ABSTRACT: This article presents a numerical pseudo-dynamic approach to solve a nonlinear stationary partial differential equation (PDE) *S* with bifurcations by passing from *S* to a pseudo-time-dependent PDE *T*. The equation *T* is constructed so that the desired nontrivial solution of *S* represents a fixed point of *T* . The numeric solution of *S* is then obtained as the solution of *T* at a high enough value of the pseudo-time.
- [Read full text »][2]
- [Submit an article »][3]
![enter image description here][4]
[1]: http://www.mathematica-journal.com/2018/10/pseudo-dynamic-approach-to-the-numerical-solution-of-nonlinear-stationary-partial-differential-equations/
[2]: http://www.mathematica-journal.com/2018/10/pseudo-dynamic-approach-to-the-numerical-solution-of-nonlinear-stationary-partial-differential-equations/
[3]: http://www.mathematica-journal.com/submit-article/
[4]: http://www.mathematica-journal.com/data/uploads/2018/10/Boulbitch_Output_1.gifModeration Team2018-10-16T18:22:53Z