ajjackson / ascii-phonons

Blender extensions for illustrations of phonons
GNU General Public License v3.0
60 stars 22 forks source link

FEATURE: Crystallographic camera angles #2

Closed ajjackson closed 8 years ago

ajjackson commented 8 years ago

Crystallographers don't think about cameras and raytracing, they think about crystallographic axes. It should be possible to select a sensible camera angle with "a" "b" or "c".

BONUS feature: Accept a Miller index and face the camera to show the corresponding plane. Possibly use an orthographic lens (i.e. no perspective)?

ajjackson commented 8 years ago

Considering the camera position in polar coordinates, the mathematics for working out θ and ɸ is not too bad, but the distance r is more tricky. The existing algorithm is hard-coded for the frontal (010) view and takes into account the unit cell shape and supercell dimensions.