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

How to make perspective/orthogonal projection setting? #6

Open
eftalgezer opened this issue Oct 3, 2022 · 4 comments
Open

How to make perspective/orthogonal projection setting? #6

eftalgezer opened this issue Oct 3, 2022 · 4 comments

Comments

@eftalgezer
Copy link
Contributor

I need to get an orthogonal projection of a structure but the mogli gives a perspective view. Is there any easy solution to get orthogonal projection?

@FlorianRhiem
Copy link
Member

You can add something like gr3.setorthographicprojection(-10, 10, -10, 10, -10, 10) to the code, e.g. in show() you could add it before the line gr3.setbackgroundcolor(255, 255, 255, 0).

@eftalgezer
Copy link
Contributor Author

@FlorianRhiem It solved the orthogonal projection but it crops the edges of the structure. The camera does not work.

@FlorianRhiem
Copy link
Member

The values like -10 to 10 were an example. The function takes the size of the viewing frustum as parameters, so everything outside this will be clipped. The parameters are left, right, bottom, top, near_plane, far_plane

@eftalgezer
Copy link
Contributor Author

@FlorianRhiem Thank you.

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

No branches or pull requests

2 participants