Dear Avogadro developers,
I’m a beginner of avogadro. I use avogadro for watching crystal
structures. Sometimes the angle of the default field of view is a
little bit wide for me and I want to make it narrower such as 10. I
looked for the button or menu for that, but I could not find it. Is
there a way to change it? If not, is it possible to be considered for
ToDo?
Because I have no idea about Qt and GUI implementations, I can not
contribute to the implementation directly now. I though at least I
should understand how the angle of the field of view is controled in
avogadro, and I have looked into the code.
The variable of angleOfViewY is defined as a member variable of the
Camera class. This is used when calling gluPerspective. When changing
angleOfViewY, the viewpoint distance should be changed, too. The
default angle is 20, so if the desired angle is ‘theta’, the viewpoint
distance will be multiplied by tan( 20/180 * PI ) / tan( theta/180 *
PI ). I think this multiplication can be done in the argument of
pretranslate in Camera::initializeViewPoint(). I hope this information
will be some help, though this may be quite common knowledge.
Best regards,
–
Atsushi Togo
http://atztogo.users.sourceforge.net/
atz.togo@gmail.com