Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Off-Topic > Rotation of the spherical harmonics
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
20.Sep: FOURTH CHAPTER IN `HISTORY OF...` PUBLISHED
13.Sep: NEWS ON THE FLY
06.Sep: APOLYTON DONATES TO HURRICANE RELIEF

bottom of page
   - CIVILIZATION 3 $9.99 - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - ALPHA CENTAURI + ALIEN CROSSFIRE (laptop collection) from $19.99 - ALPHA CENTAURI PC $9.99 -->
Author
Thread   
Pages (3): [ 1   2   3   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:37
  Old Post 08-06-2005 19:20 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#61 Report this post to a moderator
Inflate your Upload Space

reading it now

Asher is offline Asher
King
Calgary, Alberta
Nov 1999
time: 22:37
  Old Post 08-06-2005 19:29 Visit Asher's homepage!
Edit/Delete Message Reply w/Quote
#62 Report this post to a moderator
Got spare money?

It's a bigass Spherical Harmonic library coded in C. Hope it helps.

The second link, I mean, not the Sony PDF.

http://www.cs.dartmouth.edu/~geelong/sphere/

quote:
SpharmonicKit is a collection of routines, written in C, which implement discrete Legendre and spherical harmonic transforms by a number of different algorithms. For certain algorithms, code for the inverse transform is also provided. Included as well are routines for spherical convolutions.

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:37
  Old Post 08-06-2005 19:32 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#63 Report this post to a moderator
Get a bigger avatar today!

okay. didn't have quite what I wanted, but has something equivalently good (can adopt something they said about rotational properties).

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:37
  Old Post 08-06-2005 19:34 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#64 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

above post refers to the sony PDF

I can use the C library as a reference but I have to do everything in IDL and fortran90 (that's what this research group uses)

Asher is offline Asher
King
Calgary, Alberta
Nov 1999
time: 22:37
  Old Post 08-06-2005 19:38 Visit Asher's homepage!
Edit/Delete Message Reply w/Quote
#65 Report this post to a moderator
Support Apolyton buy from Amazon

http://www.csit.fsu.edu/~burkardt/f...lpak/polpak.f90

see the spherical harmonic function

code:
subroutine spherical_harmonic ( l, m, theta, phi, c, s ) !************************************************* ****************************** ! !! SPHERICAL_HARMONIC evaluates spherical harmonic functions. ! ! Discussion: ! ! The spherical harmonic function Y(L,M,THETA,PHI)(X) is the ! angular part of the solution to Laplace's equation in spherical ! coordinates. ! ! Y(L,M,THETA,PHI)(X) is related to the associated Legendre ! function as follows: ! ! Y(L,M,THETA,PHI)(X) = FACTOR * P(L,M)(cos(THETA)) * exp ( i * M * PHI ) ! ! Here, FACTOR is a normalization factor: ! ! FACTOR = sqrt ( ( 2 * L + 1 ) * ( L - 1 )! / ( 4 * PI * ( L + M )! ) ) ! ! In Mathematica, a spherical harmonic function can be evaluated by ! ! SphericalHarmonicY [ l, m, theta, phi ] ! ! Note that notational tradition in physics requires that THETA ! and PHI represent the reverse of what they would normally mean ! in mathematical notation; that is, THETA goes up and down, and ! PHI goes around. ! ! Modified: ! ! 04 March 2005 ! ! Author: ! ! John Burkardt ! ! Reference: ! ! Milton Abramowitz and Irene Stegun, ! Handbook of Mathematical Functions, ! US Department of Commerce, 1964. ! ! Eric Weisstein, ! CRC Concise Encyclopedia of Mathematics, ! CRC Press, 1999. ! ! Stephen Wolfram, ! The Mathematica Book, ! Fourth Edition, ! Wolfram Media / Cambridge University Press, 1999. ! ! Parameters: ! ! Input, integer L, the first index of the spherical harmonic function. ! Normally, 0 <= L. ! ! Input, integer M, the second index of the spherical harmonic function. ! Normally, -L <= M <= L. ! ! Input, real ( kind = 8 ) THETA, the polar angle, for which ! 0 <= THETA <= PI. ! ! Input, real ( kind = 8 ) PHI, the longitudinal angle, for which ! 0 <= PHI <= 2*PI. ! ! Output, real ( kind = 8 ) C(0:L), S(0:L), the real and imaginary ! parts of the functions Y(L,0:L,THETA,PHI). ! implicit none integer l real ( kind = 8 ) c(0:l) integer m integer m_abs real ( kind = 8 ) phi real ( kind = 8 ) plm(0:l) real ( kind = 8 ) s(0:l) real ( kind = 8 ) theta m_abs = abs ( m ) call legendre_associated_normalized ( l, m_abs, cos ( theta ), plm ) c(0:l) = plm(0:l) * cos ( real ( m, kind = 8 ) * phi ) s(0:l) = plm(0:l) * sin ( real ( m, kind = 8 ) * phi ) if ( m < 0 ) then c(0:l) = -c(0:l) s(0:l) = -s(0:l) end if return end subroutine spherical_harmonic_values ( n_data, l, m, theta, phi, yr, yi ) !************************************************* ****************************** ! !! SPHERICAL_HARMONIC_VALUES returns values of spherical harmonic functions. ! ! Discussion: ! ! In Mathematica, the function can be evaluated by ! ! SphericalHarmonicY [ l, m, theta, phi ] ! ! Modified: ! ! 05 March 2005 ! ! Author: ! ! John Burkardt ! ! Reference: ! ! Milton Abramowitz and Irene Stegun, ! Handbook of Mathematical Functions, ! US Department of Commerce, 1964. ! ! Eric Weisstein, ! CRC Concise Encyclopedia of Mathematics, ! CRC Press, 1998. ! ! Stephen Wolfram, ! The Mathematica Book, ! Fourth Edition, ! Wolfram Media / Cambridge University Press, 1999. ! ! Parameters: ! ! Input/output, integer N_DATA. ! On input, if N_DATA is 0, the first test data is returned, and ! N_DATA is set to the index of the test data. On each subsequent ! call, N_DATA is incremented and that test data is returned. When ! there is no more test data, N_DATA is set to 0. ! ! Output, integer L, integer M, real ( kind = 8 ) THETA, PHI, the arguments ! of the function. ! ! Output, real ( kind = 8 ) YR, YI, the real and imaginary parts of ! the function. ! implicit none integer, parameter :: nmax = 20 integer l integer, save, dimension ( nmax ) :: l_vec = (/ & 0, 1, 2, & 3, 4, 5, & 5, 5, 5, & 5, 4, 4, & 4, 4, 4, & 3, 3, 3, & 3, 3 /) integer m integer, save, dimension ( nmax ) :: m_vec = (/ & 0, 0, 1, & 2, 3, 5, & 4, 3, 2, & 1, 2, 2, & 2, 2, 2, & -1, -1, -1, & -1, -1 /) integer n_data real ( kind = 8 ) phi real ( kind = 8 ), save, dimension ( nmax ) :: phi_vec = (/ & 0.1047197551196598D+01, 0.1047197551196598D+01, 0.1047197551196598D+01, & 0.1047197551196598D+01, 0.1047197551196598D+01, 0.6283185307179586D+00, & 0.6283185307179586D+00, 0.6283185307179586D+00, 0.6283185307179586D+00, & 0.6283185307179586D+00, 0.7853981633974483D+00, 0.7853981633974483D+00, & 0.7853981633974483D+00, 0.7853981633974483D+00, 0.7853981633974483D+00, & 0.4487989505128276D+00, 0.8975979010256552D+00, 0.1346396851538483D+01, & 0.1795195802051310D+01, 0.2243994752564138D+01 /) real ( kind = 8 ) theta real ( kind = 8 ), save, dimension ( nmax ) :: theta_vec = (/ & 0.5235987755982989D+00, 0.5235987755982989D+00, 0.5235987755982989D+00, & 0.5235987755982989D+00, 0.5235987755982989D+00, 0.2617993877991494D+00, & 0.2617993877991494D+00, 0.2617993877991494D+00, 0.2617993877991494D+00, & 0.2617993877991494D+00, 0.6283185307179586D+00, 0.1884955592153876D+01, & 0.3141592653589793D+01, 0.4398229715025711D+01, 0.5654866776461628D+01, & 0.3926990816987242D+00, 0.3926990816987242D+00, 0.3926990816987242D+00, & 0.3926990816987242D+00, 0.3926990816987242D+00 /) real ( kind = 8 ) yi real ( kind = 8 ), save, dimension ( nmax ) :: yi_vec = (/ & 0.0000000000000000D+00, 0.0000000000000000D+00, -0.2897056515173922D+00, & 0.1916222768312404D+00, 0.0000000000000000D+00, 0.0000000000000000D+00, & 0.3739289485283311D-02, -0.4219517552320796D-01, 0.1876264225575173D+00, & -0.3029973424491321D+00, 0.4139385503112256D+00, -0.1003229830187463D+00, & 0.0000000000000000D+00, -0.1003229830187463D+00, 0.4139385503112256D+00, & -0.1753512375142586D+00, -0.3159720118970196D+00, -0.3940106541811563D+00, & -0.3940106541811563D+00, -0.3159720118970196D+00 /) real ( kind = 8 ) yr real ( kind = 8 ), save, dimension ( nmax ) :: yr_vec = (/ & 0.2820947917738781D+00, 0.4231421876608172D+00, -0.1672616358893223D+00, & -0.1106331731112457D+00, 0.1354974113737760D+00, 0.5390423109043568D-03, & -0.5146690442951909D-02, 0.1371004361349490D-01, 0.6096352022265540D-01, & -0.4170400640977983D+00, 0.0000000000000000D+00, 0.0000000000000000D+00, & 0.0000000000000000D+00, 0.0000000000000000D+00, 0.0000000000000000D+00, & 0.3641205966137958D+00, 0.2519792711195075D+00, 0.8993036065704300D-01, & -0.8993036065704300D-01, -0.2519792711195075D+00 /) if ( n_data < 0 ) then n_data = 0 end if n_data = n_data + 1 if ( nmax < n_data ) then n_data = 0 l = 0 m = 0 theta = 0.0D+00 phi = 0.0D+00 yr = 0.0D+00 yi = 0.0D+00 else l = l_vec(n_data) m = m_vec(n_data) theta = theta_vec(n_data) phi = phi_vec(n_data) yr = yr_vec(n_data) yi = yi_vec(n_data) end if return end


The Vagabond is offline The Vagabond
Chieftain
of realpolitik and counterpropaganda
Jan 1970
time: 05:37
  Old Post 09-06-2005 14:53
Edit/Delete Message Reply w/Quote
#66 Report this post to a moderator
Help yourself to an AD-FREE life

quote:
Originally posted by KrazyHorse
I want to transform an orthonormal basis for the set of (complex) scalar functions on the unit sphere

This orthonormal basis is called the spherical harmonics. Each element of this basis is the angular portion of the solution to laplace's equation in spherical coordinates. Think of an expansion in spherical harmonics as being similar to a fourier expansion, except with a different basis set. Fourier expansion is good for describing functions on a lone or a plane. The bessel functions ar good for circles and cyliners. The spherical harmonics are good for spheres.


Good for circles and cylinders are just the ordinary sines and cosines (Fourier series), smartass. The Bessel functions take care of what happens in the radial direction from a circle/cylinder. But they have nothing to do with what happens on circles or cylinders.

Ramo is offline Ramo
King
Austin, Texas, USA
Oct 1999
time: 23:37
  Old Post 09-06-2005 15:19 Visit Ramo's homepage!
Edit/Delete Message Reply w/Quote
#67 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Unless you've got a funky metric.

The Vagabond is offline The Vagabond
Chieftain
of realpolitik and counterpropaganda
Jan 1970
time: 05:37
  Old Post 09-06-2005 15:35
Edit/Delete Message Reply w/Quote
#68 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Yeah, after a couple of bottles of wine your metric may become funky indeed.

KrazyHorse is offline KrazyHorse
King
Macedonia
May 2001
time: 00:37
  Old Post 10-06-2005 01:47 Visit KrazyHorse's homepage!
Edit/Delete Message Reply w/Quote
#69 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri



I didn't remember the proper solutions to the Laplace equation in cylindrical coordinates while drunk. So shoot me...

 
Pages (3): [ 1   2   3   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:37.
Apolyton Time is 00:37.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0519 seconds (81.76% PHP - 18.24% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net