Giter Site home page Giter Site logo

shrotation's Introduction

Spherical Harmonic Rotation

Don Williamson (http://donw.io), July 2004

I've had this implementation on my HD for quite a while, trying to find time to prepare it for the website. There were a few bugs in the original implementation which Richard Furse was kind enough to point out and I've repackaged everything so as to be useful in realtime game code. This is only a second design pass on the so you'll no doubt want to refactor the code yourself if you'll ever use it.

Screenshot

The simple goal is, provided with a 3x3 rotation matrix, generate an SH rotation matrix, non-analytically, over an abitrary number of bands. Two prominent methods for achieving this are provided by Ivanic/Ruedenberg and Choi. Implementations of both are provided that adhere to the respective papers (and corrections).

NOTE: Choi's method works by calculating the rotation matrices using complex numbers. We require real rotation matrices and the same paper documents a conversion process from complex to real matrices. Unfortunately the paper contains errors and there is no available corrections from the author. I've spoken to Choi about the errors and he's provided possible solutions (documented in the source code) but a more thourough analysis is required. If anybody has the time to do so, I would love to see the results!

Use

Original OpenGL rotated spherical function is on the left. SH rotated spherical function is on the right.

Hold [Space] = match rotation with Ivanic/Ruedenberg
Hold [Space] + [c] = match rotation with Choi

Acknowledgements

Thanks to Richard Furse for highlighing errors in the original code, Robin Green for the NRook pointer, Cheol Ho Choi for paying heed to my emails on his original paper, and Joseph Ivanic and Klaus Ruedenberg for discussing their original algorithm.

References

In the source code.

shrotation's People

Contributors

dwilliamson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.