Change camera perspective in 3D view

Asked by Alexander Eulitz [Eugen]

Hi,
if you look at a cylinder whose axis is parallel to z axis from top in Yade (view plane XY looking in z direction) - you'll see kind of a perspective view. Is there a chance to look at it orthogonal - so that you will see a circular if you look from top at a cylinder and a rectangle if you look at it from the side?

Thank you, Eugen

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Eulitz [Eugen]
Solved:
Last query:
Last reply:
Revision history for this message
Christian Jakob (jakob-ifgt) said :
#1

hi,

when view is open, press t to toggle between perspective and orthogonal view.

for all options press h

regards,

christian

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

hit "h", go to "keyboard" tab, see what "t" is doing.
Enjoy :)

Bruno

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#3

Great guys! Thanks a lot!
I remember that I read about the magic "h-key" some time ago. But I dont know where.
What do you think, is it worth adding a hint about the h key at the last line before Yade I Pyhton interface?
Something like this:
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (in 3D View use h-key to see key assignments), F10 both, F9 generator, F8 plot. ]]

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#4

good idea, i think 99% of yade users does not know about the power of yade-view ...

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

> (in 3D View use h-key to see key assignments)

Maybe more concise but yes, good idea. What about "(h-key: 3D viewer's help)

>i think 99% of yade users does not know about the power of yade-view ...

It's in fact the power of QGLViewer (http://www.libqglviewer.com). Yade only inherits form it. :)
It is indeed widely ignored. The "h" key is mentionned in [1] but it is not really visible.

Even less known are the yade-specific tricks of the GUI like moving bodies with the mouse during a simulation (did you know it? example here [2] at t=10s). I think it was explained in the old wiki documentation but I can't see it anywhere in yade-dem.org now. Could be worth a note in [1].

[1] https://www.yade-dem.org/doc/introduction.html#graphical-interface
[2] http://www.youtube.com/watch?v=KKVk3YK0nu0&feature=player_embedded#!

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#6

> > (in 3D View use h-key to see key assignments)
> Maybe more concise but yes, good idea. What about "(h-key: 3D viewer's help)

Already done ;)

https://github.com/yade/trunk/commit/6f5f71310bb848387d99dcf624428f4c6a8b5f5d

> [2] http://www.youtube.com/watch?v=KKVk3YK0nu0&feature=player_embedded#!

cool, i didnt know that ...

Revision history for this message
liucheng83 (lcheng83) said :
#7

How to set defalut camera as z axis up positive, x axis right positive, and the background white. And is there a screenshot shortcut key in 3D view, thank you!

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#8

> How to set defalut camera as z axis up positive, x axis right positive

middle button on the bottom of qt.Controller (hotkey: F12)

> background white

click on "Display" tab in controller -> set bgColor (255 255 255)

or via command line:

from yade import qt
qt.Controller.bgColor=[255,255,255]
qt.Controller()

(did not test)

Revision history for this message
liucheng83 (lcheng83) said :
#9

Thank you, Jakob.
>middle button on the bottom of qt.Controller (hotkey: F12)

How to do it via command line?

>from yade import qt
qt.Controller.bgColor=[255,255,255]
qt.Controller()

(did not test)

I will test it when I'm in ubuntu.

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) said :
#10
Revision history for this message
liucheng83 (lcheng83) said :
#11

Unfortunately I cannot see the things in Youtube. wow

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#12

> >middle button on the bottom of qt.Controller (hotkey: F12)
> How to do it via command line?

e.g. see examples/mill.py at end:

v=qt.View()
v.eyePosition=(3,.8,.96); v.upVector=(-.4,-.4,.8); v.viewDir=(-.9,-.25,-.3); v.axes=True; v.sceneRadius=1.9

play around with these vectors until your view is as you want