How do we get the direction we're facing in 3D view?

pegasusroe shared this question 5 years ago
Answered

as title.

Comments (7)

photo
1

help of corner comand


Corner( <Graphics View>, <Number of Corner> )
    Creates a point at the corner of Menu view graphics.svg Graphics View (1, 2) which is never visible in that view. Supported values of number n are 1, 2, 3, 4 and 5 as above.
    Note: Corner( <Graphics View>, <Number of Corner> ) won't work inside other commands. Instead create eg C_1 = Corner(1, 1) and use that.
    Note: use -1 for the Perspectives algebra 3Dgraphics.svg 3D Graphics View's corners (available values for Number: from 1 to 8); for n = 9 returns point (w, h, 0), where w and h are width and height of the Graphics View in pixels; for n = 10 returns point (w, h, 0), where w and h are width and height of the main window in pixels; for n = 11 returns view direction  (for parallel projections) or eye position (for e.g. perspective projection).

photo
1

the values returned by Corner(11, n) seem useless in 3D view, any thoughts?

photo
1

useless for.........what?

see the example attached

Files: foro.ggb
photo
1

other useless divertimento

move the 3d screen

Files: foro.ggb
photo
1

Amazing, but where's the code?

Thanks.

photo
1

download the file , open and analize the scripts

photo
1

I think you can not get the ViewDirection in a simple way like yu can set the direction with this command.

https://wiki.geogebra.org/e...

You need to read mathmagics copy from the handbook completely

  Note: use -1 for the Perspectives algebra 3Dgraphics.svg 3D Graphics View's corners (available values for Number: from 1 to 8); for n = 9 returns point (w, h, 0), where w and h are width and height of the Graphics View in pixels; for n = 10 returns point (w, h, 0), where w and h are width and height of the main window in pixels; for n = 11 returns view direction  (for parallel projections) or eye position (for e.g. perspective projection).
or read the page: https://wiki.geogebra.org/e...

Comments have been locked on this page!

© 2023 International GeoGebra Institute