Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Web Analytics
Cookie Policy Terms and Conditions Image:Rotating spherical harmonics.gif - Wikipedia, the free encyclopedia

Image:Rotating spherical harmonics.gif

From Wikipedia, the free encyclopedia

No higher resolution available.

Rotating_spherical_harmonics.gif (134 × 134 pixel, file size: 161 KB, MIME type: image/gif)

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is attempting to create a freely licensed media file repository. You can help.

Rotating spherical harmonics, l=0 to 4 vertical, m=0 to ±4 horizontal,

GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

العربية | Asturianu | Български | বাংলা | ইমার ঠার | Brezhoneg | Bosanski | Català | Sinugboanong Binisaya | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Galego | עברית | Hrvatski | Magyar | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | 한국어 | Kurdî / كوردي | Latina | Lëtzebuergesch | Lietuvių | Bahasa Melayu | Nnapulitano | Nederlands | Norsk (nynorsk) | Norsk (bokmål) | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски | Svenska | తెలుగు | ไทย | Türkçe | Українська | اردو | Tiếng Việt | Volapük | 中文(简体) | 中文(繁體) | +/-


The somewhat scary source...:

//GPL (as if anyone would want this anyway...)
#include <stdio.h>
#include <math.h>

#define PI 3.14159265358979323846264338327950288

//m>=0
double cfac(int l, int m, double z) {
  int x;
  int i;
  double r, s, t;
  r=log((2*l+1)*(.25/PI))*.5;
  r-=log(2)*l;
  i=(l+m+1)>>1;
  for(x=2;x<=l-i;++x) r-=   log(x);
 if(l-m<i) {
/*for(   ;x<=l-m;++x) r+= 0*log(x);*/ x=l-m+1;
  for(   ;x<=i  ;++x) r-=.5*log(x);
 } else {
/*for(   ;x<=i  ;++x) r-= 0*log(x);*/ x=i+1;
  for(   ;x<=l-m;++x) r+=   log(x);
 }
  for(   ;x<=l+m;++x) r+=.5*log(x);
  for(   ;x<=2*i;++x) r+=   log(x);

  if(m) r+=.5*log(2);

  r=exp(r)*((l^i)&1?-1:1)*(2*i-l-m?z:1);
  s=-z*z;
  t=r;
  for(i=((l+m+1)>>1)+1;i<=l;++i) t+=r*=s*(2*i-1)*(2*i)*(l-i+1)/((double)(2*i-l-m-1)*(2*i-l-m)*i);
  return(t);
}

double cval(int m, double x, double y) {
  int i;
  _Complex double d=x+1i*y, r;
  for(r=1;m;m>>=1,d*=d) if(m&1) r*=d;
  return(__real__ r);
}

void rend(unsigned char *c, int sx, int sy, int pit, int l, int m, double ang) {
  int a, b;
  double x, y, z, sa, ca, f, t, r;
  sa=sin(ang); ca=cos(ang);
  for(b=0;b<sy;++b) {
    for(a=0;a<sx;++a) {
    z=1-b*2/(sy-1.);
      x=a*2/(sx-1.)-1;
      t=1-x*x-z*z;
      if(t<0) t=1e99; else {
        y=-sqrt(t);
        t=cos(.2)*z-sin(.2)*y;
        y=sin(.2)*z+cos(.2)*y;
        z=t;
        t=ca*x+sa*y;
        y=-sa*x+ca*y;
        x=t;
    f=cfac(l, m, z);
        t=cval(m, x, y)*f;//printf("a%lf, %lf, %lf, %lf\n", t, x, y, z);
      }
      r=128+t*512; if(r<0) r=0; else if(r>255) r=255; c[a*3+b*pit  ]=(int)r|31;
      r=128+t*256; if(r<0) r=0; else if(r>255) r=255; c[a*3+b*pit+1]=(int)r|15;
      r=128+t*128; if(r<0) r=0; else if(r>255) r=255; c[a*3+b*pit+2]=(int)r|7;
    }
  }
}

unsigned char pic[256*256*3];

int main() {
  FILE *f;
  char fn[100];
  int a, l, m;
  for(a=0;a<256*256*3;++a) pic[a]=255;
  for(a=0;a<100;++a) {
    for(l=0;l<=4;++l) for(m=0;m<=l;++m) rend(pic+m*27*3+l*27*134*3, 26, 26, 134*3, l, m, PI*2/100*a);
//    for(l=0;l<=4;++l) for(m=0;m<=l;++m) rend(pic+m*51*3+l*51*256*3, 50, 50, 256*3, l, m, PI*2/100*a);
//    rend(pic+4*51*3+0*51*256*3, 50, 50, 256*3, 47, 1, PI*2/100*a);
//    rend(pic+4*51*3+0*51*256*3, 50, 50, 256*3, 47, 11, PI*2/100*a);
//    rend(pic, 256, 256, 256*3, 5, 2, PI*2/100*a);
    sprintf(fn, "sph%04d.ppm", a);
    f=fopen(fn, "wb");
    fprintf(f, "P6\n%d %d\n255\n", 134, 134);
    fwrite(pic, 134*134*3, 1, f);
    fclose(f);
  }
/*  int l, m, i;
  double r;
  for(l=0;l<=7;++l) for(m=0;m<=l;++m) {
    printf("%d,%d: %lf", l, m, r=cfac(l, m));
    for(i=((l+m+1)>>1)+1;i<=l;++i) printf(", %lf", r*=(double)(2*i-1)*(2*i)*(l-i+1)/((double)(2*i-l-m-1)*(2*i-l-m)*i));
    printf("\n");
  }*/
  return(0);
}

The following pages on the English Wikipedia link to this file (pages on other projects are not listed):

Static Wikipedia 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu