01
Oct
08

Double Spiral

One way to create a Double Spiralis by applying a light projection from the top of a Riemann sphere (loxodrome) onto a plane.

This type of projection is called a stereographic projection.

Click here to download a Mathematica notebook. Here is some Mathematica code:
(* runtime: 3 seconds *)
<< Graphics`Shapes`; a = 0.25; Rx[phi_] := {{1, 0, 0}, {0, Cos[phi], -Sin[phi]}, {0, Sin[phi], Cos[phi]}};
Do[loxodrome = Table[Rx[phi].{Sin[t], -a t, -Cos[t]}/Sqrt[1 + (a t)^2], {t, -100, 100, 0.1}]; projection = Map[Module[{r = 2/(1 - #[[3]])}, {r #[[1]],r #[[2]], -1}] &, loxodrome]; Show[Graphics3D[{EdgeForm[], Sphere[0.99, 37, 19], Polygon[{{4, 4, -1}, {-4, 4, -1}, {-4, -4, -1}, {4, -4, -1}}],Line[loxodrome], Line[projection]},PlotRange -> {{-4, 4}, {-4, 4}, {-1, 1}}]], {phi, 0, Pi -Pi/12, Pi/12}]

Another kind of double spiral can be made by applying a special homography to a single logarithmic spiral:
(* runtime: 0.05 second *)
Show[Graphics[Table[Line[Table[z = Exp[r + (2 r + theta)I]; z = (1 + z)/(1 - z); {Re[z], Im[z]}, {r, -10, 10, 0.1}]], {theta, -Pi, Pi, Pi/3}], PlotRange -> {{-2, 2}, {-2, 2}}, AspectRatio -> Automatic]]

Here is some Mathematica code that uses the inverse method:
(* runtime: 17 seconds *)
Show[Graphics[RasterArray[Table[r1 = (x - 1)^2 + y^2; r2 = (x + 1)^2 + y^2; Hue[(Sign[y]ArcCos[(x^2 + y^2 - 1)/Sqrt[r1 r2]] -Log[r1/r2])/(2Pi)], {x, -2, 2, 4/274}, {y, -2, 2, 4/274}]], AspectRatio -> 1]]

and here is some POV-Ray code:
// runtime: 2 seconds
camera{orthographic location <0,0,-2> look_at 0 angle 90}
#declare r1=function(x,y) {(x-1)*(x-1)+y*y}; #declare r2=function(x,y) {(x+1)*(x+1)+y*y};
#declare f=function{(y/abs(y)*acos((x*x+y*y-1)/sqrt(r1(x,y)*r2(x,y)))-ln(r1(x,y)/r2(x,y)))/(2*pi)};
plane{z,0 pigment{function{f(x,y,0)}} finish{ambient 1}}

Links

Advertisements

4 Responses to “Double Spiral”


  1. 1 Clinton Bowen
    December 11, 2008 at 7:43 am

    Very Cool! I’m still amazed about how much math you know. It’s quite impressive.

  2. 2 Craig
    March 30, 2009 at 8:32 am

    Wow!

    The double spiral projected onto wood looks great.
    Did you render this with POVRAY?
    I don’t suppose you could share the .pov file?

    Cheers
    Craig.

  3. January 25, 2010 at 2:17 pm

    Hi Congratulations stunning work.
    we are working on a Logo with cycles / infinity / ying, yang zen feel and was wondering if you would be interested in helping us . Your stuff lookes evey more innovative!!
    we need something that can be printed easily and is scaleable.
    can we work out some deal pls ?

    thx

    BD
    UK


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Welcome !

You will find here some of my favorite hobbies and interests, especially science and art.

I hope you enjoy it!

Subscribe to the RSS feed to stay informed when I publish something new here.

I would love to hear from you! Please feel free to send me an email : bugman123-at-gmail-dot-com

Archives

Blog Stats

  • 549,858 hits

%d bloggers like this: