MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: 3D Animations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105898] Re: [mg105889] Re: 3D Animations
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Thu, 24 Dec 2009 00:15:23 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <hgq21f$g51$1@smc.vnet.net> <200912230742.CAA21830@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Another approach, which gives excellent results, within a generally 
easier-to-use paradigm than the built-in Mathematica format for doing 
graphics, is to use some of the functions from the ComplexGraphics 
section of David Park's "Presentations" application...

   http://home.comcast.net/~djmpark/DrawGraphicsPage.html

These include functions for displaying the Riemann sphere as well as 
functions for creating many kinds of 2D complex graphics objects 
(points, lines, curves, cartesian and polar grids, etc.) and then 
StereographicMap for then mapping them to the Riemann sphere.

For example, slightly modified from the documentation supplied with 
Presentations:

    (* create 2 circles upon background polar grid from r=1 to r=4 *)
    graphics2D={
       DrawPolarMap[z,{z,ComplexPolar[1,0],ComplexPolar[4,2\[Pi]]}],
       Thick,
       Red, ComplexCurve[-1+3 E^(I \[Theta]),{\[Theta],0,2\[Pi]}],
       Blue, ComplexCurve[1+2 E^(I \[Theta]),{\[Theta],0,2\[Pi]}]
    }

    (* map the 2D graphics onto Riemann sphere *)
     Draw3DItems[{
        ColoredRiemannSphere[],
        graphics2D//StereographicMap},
     ViewRiemann]


dh wrote:
> Hi Arthur,
> 
> you are asking for a stereographic projection between a sphere and a plane.
> 
> We may identify the points on a sphere by 2 angles (spherical 
> 
> coordinates: elevation and azimuth): theta and phi. We may the give 
> 
> transformations between cartesian coordinates: x,y on the plane and 
> 
> corresponding spherical coordinates on the sphere. If we assume the 
> 
> center of the sphere to be at: p0={p0x,p0y,p0z}:
> 
> 
> 
> toPlane[{theta_, phi_}, p0_] :=
> 
>    p0[[{1, 2}]] + Tan[theta] p0[[3]] {Sin[phi], Cos[phi]};
> 
> toSphere[{x_, y_},
> 
>    p0_] := {ArcTan[p0[[3]], Norm[{x, y} - p0[[{1, 2}]]]], ArcTan[x, y]}
> 
> 
> 
> we may now e.g. create a grid and project it from the sphere to the 
> 
> plane or vice versa:
> 
> 
> 
> grid = Flatten[
> 
>     Table[{{theta, phi}, k + {theta, phi}}, {theta, 0,
> 
>       1, .1}, {phi, -1, 1, .2}, {k, {{.1, 0}, {0, .2}}}], 2];
> 
> 
> 
> Show@Graphics[Line /@ grid, Axes -> True]
> 
> s2 = Map[toSphere[#, p0] &, grid, {2}];
> 
> p2 = Map[toPlane[#, p0] &, grid, {2}];
> 
> 
> 
> Show@Graphics[(Line /@ p2), Axes -> True]
> 
> Show@Graphics[(Line /@ s2), Axes -> True]
> 
> 
> 
> If you project a figure from the plane to the sphere, the move and/or 
> 
> rotate the sphere, you can generate all the pictures in the video.
> 
> Daniel
> 
> 
> 
> Artur wrote:
> 
>> Dear Mathematica Gurus,
> 
>> I would like to ask that in version up 6 are available such 3D 
> 
>> animations like follwing (I'm mean about second part of this video):
> 
>> http://www.youtube.com/watch?v=JX3VmDgiFnY&feature=related
> 
>> Merry Christmas
> 
>> Artur
> 
> 
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: solving equations
  • Next by Date: Re: Functions with variable number of arguments and options
  • Previous by thread: Re: 3D Animations
  • Next by thread: Re: 3D Animations