Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlling the perspective of drawing #13

Open
mitsuaki1987 opened this issue Jun 20, 2023 · 1 comment
Open

Controlling the perspective of drawing #13

mitsuaki1987 opened this issue Jun 20, 2023 · 1 comment

Comments

@mitsuaki1987
Copy link
Owner

(2021-07-27 23:10 by simon_rss )
Dear developers,

The fermisurfer always show fermi surface in BZ with obvious perspective. Is it possible to add an option to control the perspective so that I can adjust it even completely switch it off to get views like xcrysden(edge of BZ are visually parallel).

I played with gluPerspective function in operation.cpp. If I set a very small first parameter, after open file, I have to adjust scale much and then I can see a view almost without perspective. But anyway, that is not a satisfactory solution, and I don't full understand gluPerspective function.

best regards

@mitsuaki1987
Copy link
Owner Author

(2021-08-07 01:56 by mitsuaki1987 )
Dear simon_rss

alternative to

gluPerspective(30.0, (GLfloat)event.GetSize().x / (GLfloat)event.GetSize().y, 1.0, 100.0);

in operation.cpp, please put

glOrtho(-1, 1, -(GLfloat)event.GetSize().y / (GLfloat)event.GetSize().x, (GLfloat)event.GetSize().y / (GLfloat)event.GetSize().x, 1.0, 100.0);

As you said, it is better to add the option to turn on/off the perspective.

Best regards,
Mitsuaki Kawamura

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant