PERSPECTIVE(nged)

get or set the view perspective angle

πŸ“… published 7.44.0, from nixpkgs unstable

πŸ’… PERSPECTIVE (nged) β€” the get/set-your-view-angle page

okay bestie, welcome to perspective(nged), a BRL-CAD User Command and honestly one of the most underrated little glow-ups in your mged toolbox ✨


🌸 SYNOPSIS 🌸

perspective
perspective angle

that's it. two modes. no cap. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

the perspective command gets or sets the perspective (field-of-view) angle for the current view. literally just vibes control for how much depth your eyeballs get. πŸ¦‹

  • no arguments 🫢 β€” returns the current value of gv_perspective as a floating-point number. a value of 0 (or any value ≀ SMALL_FASTF) means orthographic (parallel) projection, iykyk.
  • one argument, angle πŸ‘‘ β€” sets gv_perspective to the given value, in degrees. the behavior depends on the magnitude of the angle:
    • if angle > SMALL_FASTF (i.e. a positive, non-trivial value): a perspective projection matrix is constructed via persp_mat with aspect ratio 1.0, near clip at 0.01, and far clip at 1Γ—10^10. that matrix gets stored in gv_pmat and the view is updated via bv_update. main character energy fr fr πŸ”₯
    • if angle ≀ SMALL_FASTF (zero or negative): the perspective matrix gv_pmat is reset to the identity matrix, effectively switching to orthographic projection. bye bye depth πŸ’€
typical useful perspective angles range from about 15Β° (narrow, telephoto-like) to 90Β° (wide, distorted). values above 90Β° produce strongly distorted views β€” dramatic, but not cute πŸ™ˆ. setting the angle to 0 disables perspective entirely.

✨ EXAMPLES ✨

πŸ“ Example 1. Query the current perspective angle

mged> perspective

returns the current perspective angle, e.g. 0 when orthographic projection is active. a little vibe check for your view 🌈

🧚 Example 2. Enable a standard perspective view

mged> perspective 45

sets the field of view to 45Β°. objects farther from the viewer will appear smaller relative to nearby objects. the classic. the icon. πŸ’…

⭐ Example 3. Use a narrow telephoto-style perspective

mged> perspective 15

sets a narrow 15Β° field of view, compressing depth and making distant objects appear proportionally larger. zoom zoom, lowkey obsessed πŸ“Έ

πŸ’œ Example 4. Disable perspective (return to orthographic)

mged> perspective 0

resets gv_pmat to the identity matrix, switching the view back to orthographic (parallel) projection. flat, parallel, and honestly kind of chic. πŸŽ€


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” the devs behind the magic 🫢


😭 BUG REPORTS 😭

reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. be nice, they're doing their best πŸ’–


and that's the whole page, bestie! this was PERSPECTIVE(nged) from the BRL-CAD User Commands β€” go forth and set your angles wisely βœ¨πŸ’…πŸ¦‹

πŸ“¦ where this page comes from