Message Boards Message Boards

GROUPS:

[GIF] Fire in the Hole (Spheres on logarithmic spirals)

Posted 1 year ago
3455 Views
|
4 Replies
|
15 Total Likes
|

Spheres on logarithmic spirals

Fire in the Hole

I'm not exactly sure what to say about this. I was somewhat inspired by Frédéric Vayssouze-Faure's worries bin and I started by plotting Gabriel's Horn. After some playing around, I ended up with the spheres lying on logarithmic spirals on the surface of revolution for the graph of $f(x)=\frac{1}{x^3}$.

This was also the first time I've used Lighting in a nontrivial way, and it was very cool to see how much you can change the mood just by changing the location and color of a couple of point lights.

Here's the code:

With[{δ = π/8., γ = π/5., cols = RGBColor /@ {"#FECEA8", "#E84A5F", "#000000"}},
 Manipulate[
  Graphics3D[
   {cols[[1]],
    Table[
     Sphere[{E^((θ + s)/10) Cos[θ + t], E^((θ + s)/10) Sin[θ + t], E^((θ + s)/30)}, .01],
     {θ, -10. π, 3 π, δ}, {t, 0., 2 π, γ}]},
   PlotRange -> {{-5, 5}, {-5, 5}, {0, 2}}, ViewAngle -> π/50, 
   ImageSize -> {800, 600}, Boxed -> False, Background -> cols[[-1]],
   Lighting -> {{"Point", cols[[2]], {0, 0, 1/2}}, {"Directional", cols[[1]], 10 {-1, -1, 1}}},
   ViewPoint -> {1, 1, 1}, ViewVertical -> {0, 0, 1}, ViewCenter -> {0.5, 0.5, 0.35}],
  {s, 0, π}]
 ]
4 Replies

That's really cool! Only after removing the View-options I understood the shape of this object, very nice!

Thanks!

Yep, this marvelous one indeed hypnotized me for a while. Here is the full shape:

With[
    {δ=π/8.,γ=π/5.,s=0,cols=RGBColor/@{"#FECEA8","#E84A5F","#000000"}},
    Graphics3D[
       {cols[[1]],Table[Sphere[{E^((θ+s)/10) Cos[θ+t],E^((θ+s)/10) Sin[θ+t],E^((θ+s)/30)},.01],{θ,-10. π,3 π,δ},{t,0.,2 π,γ}]},
       ImageSize->{800,600},
       Boxed->False,
       Background->cols[[-1]],
       Lighting->{{"Point",cols[[2]],{0,0,1/2}},{"Directional",cols[[1]],10 {-1,-1,1}}},
       ViewAngle->0.332,
       ViewCenter->{{0.5`,0.5`,0.5`},{0.602`,0.359`}},
       ViewPoint->{-0.492`,-1.934`,-0.132`},
       ViewVertical->{0.54`,-0.202`,4.067`}
    ]
]

enter image description here

enter image description here - Congratulations! This post is now a Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract