# Decorating Easter Eggs with the Planets

**URL:** <https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943>\
**Category:** Staff Picks\
**Tags:** astronomy, fun-and-play, computational-arts, curated-data, graphics-and-visualization, staff-pick, events-and-media, space-exploration\
**Created:** [April 21, 2019, 8:44pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943 "2019-04-21T20:44:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jeffb/32/36128_2.png) [@jeffb](https://community.wolfram.com/u/jeffb)\
**Post date:** [April 21, 2019, 8:44pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/1 "2019-04-21T20:44:15Z")

</div>

![PlanetEaster.jpg](https://global.discourse-cdn.com/wolfram/original/2X/b/b400d77aac98e7cc1b42003a93859c94db1a3268.jpeg)

Just thought I’d share this fun little exercise. First, we need to get the textures to use.

```
textures = 
  ImageReflect[#, Right] & /@ 
   EntityValue["Planet", "CylindricalEquidistantTexture"];

```

Then, we need to plot parametric surfaces that look like eggs and apply the textures to them.

```
GraphicsGrid[Partition[With[{l = .75, a = 1, b = 1},
     ParametricPlot3D[
      Evaluate[
       RotationMatrix[
         Pi/2, {0, 1, 
          0}].{l Cos[t] + (a + b Cos[t]) Cos[t], (a + b Cos[t]) Sin[
           t] Cos[p], (a + b Cos[t]) Sin[t] Sin[p]}], {p, 0, 
       2 Pi}, {t, 0, Pi}, Mesh -> None, Boxed -> False, Axes -> False,
       Lighting -> "Neutral", PlotStyle -> Texture[#], 
      ViewPoint -> Left, PlotPoints -> 50, Background -> Black, 
      SphericalRegion -> True, ViewAngle -> Pi/6]] & /@ textures, 4], 
 Spacings -> {0, 0}, ImageSize -> 800]

```

---

<div class="post-metadata">

**Author:** ![wolframcommunity](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/wolframcommunity/32/8335_2.png) [@wolframcommunity](https://community.wolfram.com/u/wolframcommunity)\
**Post date:** [April 21, 2019, 9:40pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/2 "2019-04-21T21:40:03Z")

</div>

![2015-11-02_10-07-11.png](https://global.discourse-cdn.com/wolfram/original/3X/5/0/50e59c9ead62f729e7130d3ea1482555a75602b6.png)

- Congratulations! This post is now featured in our [Staff Pick](http://community.wolfram.com/content?curTag=staff+picks) column as distinguished by a badge on your profile of a [Featured Contributor](http://community.wolfram.com/web/jeffb)! Thank you, keep it coming!

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [April 21, 2019, 10:03pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/3 "2019-04-21T22:03:21Z")

</div>

Jeff, this is really nice and funny! I was thinking about some “easter idea” myself, but in vain. Here a minor remark: The texture could still be improved using `TextureCoordinateFunction -> ({#4, #3} &)`. My code then reads (I changed your egg function a bit):

```
textures = EntityValue["Planet", "CylindricalEquidistantTexture"];
GraphicsGrid[
 Partition[
  With[{l = .75, a = 1, b = 1}, 
     ParametricPlot3D[
      Evaluate[{(a + b Cos[t]) Sin[t] Cos[p], (a + b Cos[t]) Sin[
          t] Sin[p], -l Cos[t] - (a + b Cos[t]) Cos[t]}], {p, 0, 
       2 Pi}, {t, 0, Pi}, Mesh -> None, Boxed -> False, Axes -> False,
       Background -> Black, Lighting -> "Neutral", ViewPoint -> Left, 
      PlotPoints -> 50, SphericalRegion -> True, ViewAngle -> Pi/6, 
      PlotStyle -> Texture[#], 
      TextureCoordinateFunction -> ({#4, #3} &)]] & /@ textures, 4], 
 Spacings -> {0, 0}, ImageSize -> 800]

```

 ![PlanetEgg.jpg](https://global.discourse-cdn.com/wolfram/original/2X/7/79ae83c632f19cafb0255699e7b7a87457f2d41d.jpeg)

Regards and happy Easter! – Henrik

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [April 21, 2019, 10:24pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/4 "2019-04-21T22:24:15Z")

</div>

Awesome idea! I wonder if this can be really printed on eggs - it’d be greatly educational for kids. Following [@Michael Hale](https://community.wolfram.com/web/halemichaeljr) idea [here](https://wolfram.discourse.group/t/1071/1) I suggest using RevolutionPlot3D, it simplifies things a bit and avoids a seam in texture. Here is my take. First define a function for a single egg:

```
eggPLANET[texture_]:=RevolutionPlot3D[{-Sin[t]1.3^Cos[t],1.4Cos[t]},{t,0,Pi},
	PlotStyle->{Texture[ImageRotate[texture,Pi/2]]},Mesh->None,
	Lighting->"Neutral",Boxed->False,Axes->False,PlotPoints->50,
	Background->Black,SphericalRegion->True,ViewAngle->.27]

```

Note simplicity of formula. Then map it as Jeff did but in 2-eegs width for better resolution, like a vertical poster:

```
GraphicsGrid[Partition[eggPLANET/@textures, 2],Spacings ->{0, 0},ImageSize->1000]

```

 ![435trwghfds.jpg](https://global.discourse-cdn.com/wolfram/original/3X/3/1/319426389152ef0bc2a550c94b072d4687f3c930.jpeg)

---

<div class="post-metadata">

**Author:** ![pleasureoffiguring](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/pleasureoffiguring/32/18977_2.png) [@pleasureoffiguring](https://community.wolfram.com/u/pleasureoffiguring)\
**Post date:** [April 22, 2019, 3:30am UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/5 "2019-04-22T03:30:13Z")

</div>

Someone else will have to try this on my behalf for this particular application (as I do not currently have _Mathematica_), but whenever I wanted to experiment with textures on an egg-like surface, I tended to use [Yamamoto’s ovals](https://web.archive.org/web/20181106183758/http://www.geocities.jp/nyjp07/index_egg_E.html):

```
tex = PlanetData["Earth", "CylindricalEquidistantTexture"];
Manipulate[RevolutionPlot3D[{(1 - h Sin[u/2]^2) Sin[u]/2, Sin[u/2]^2 + h (Sin[u]/2)^2},
                            {u, 0, ?}, Axes -> None, Boxed -> False,
                            Lighting -> "Neutral", Mesh -> None, PlotPoints -> 45,
                            PlotStyle -> Directive[Specularity[1/2, 5], Texture[tex]],
                            TextureCoordinateFunction -> ({#5, #4} &)],
            {{h, 3/5, "Distortion"}, 0, 1}, SaveDefinitions -> True]

```

where the setting `h == 0` is the conventional sphere. I personally prefer `h == 7/10`, so you could do something like

```
With[{h = 7/10},
     Table[RevolutionPlot3D[{(1 - h Sin[u/2]^2) Sin[u]/2, Sin[u/2]^2 + h (Sin[u]/2)^2},
                            {u, 0, ?}, Axes -> None, Boxed -> False,
                            Lighting -> "Neutral", Mesh -> None, PlotPoints -> 45, 
                            PlotStyle -> Directive[Specularity[1/2, 5], Texture[tex]], 
                            TextureCoordinateFunction -> ({#5, #4} &)],
          {tex, EntityValue["Planet", "CylindricalEquidistantTexture"]}]] // (GraphicsGrid[Partition[#, 4]] &)

```

if you want to see the whole set of planetary eggs.

---

<div class="post-metadata">

**Author:** ![murray](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/murray/32/39879_2.png) [@murray](https://community.wolfram.com/u/murray)\
**Post date:** [April 22, 2019, 3:03pm UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/6 "2019-04-22T15:03:28Z")

</div>

_Your_ eggs are all balanced on their pointy ends!

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [April 26, 2019, 9:16am UTC](https://community.wolfram.com/t/decorating-easter-eggs-with-the-planets/13943/7 "2019-04-26T09:16:14Z")

</div>

Yes! It’s quite easy to do in the outer space 😉
