V2M_POINT(nged)

transform a point from view space to model space

πŸ“… published 7.44.0, from nixpkgs unstable

✨ NAME ✨

okay so this is v2m_point, and it lives in the (nged) manual β€” manual name folded in near the top, as requested bestie πŸ’…. The name line is literally: v2m_point - transform a point from view space to model space. Iconic. Periodt.

🌸 SYNOPSIS 🌸

v2m_point x y z
v2m_point "x y z"

πŸ¦‹ DESCRIPTION πŸ¦‹

v2m_point takes the current view-to-model transformation matrix and applies it to the point you give it. Then it hands back the result as a space-separated x y z triplet in model space. Slay.

Your input point is in view space, where (0, 0, 0) is the view center and the axes correspond to the screen orientation. The output is the equivalent position in model coordinates. Literally a coordinate glow-up ✨.

The transformation incorporates rotation, scale, and translation β€” the complete view-to-model mapping, not just rotation. That makes v2m_point the inverse of m2v_point. iykyk πŸ’–.

You can provide the input as three separate floating-point arguments or as a single quoted space-separated string. Any other number of arguments returns a usage error. No cap, that’s the rule πŸ™ˆ.

πŸŽ€ EXAMPLES πŸŽ€

Example 1. Convert the view center to model space

mged> v2m_point 0 0 0

Returns the model-space coordinates of the current view center β€” that’s the point at (0, 0, 0) in view space. Main character coordinate moment πŸ’….

Example 2. Convert a view-space point using a quoted string

mged> v2m_point "0.5 -0.25 0"

Returns the model-space coordinates of the view-space point (0.5, -0.25, 0). The single quoted string form is accepted for scripting convenience β€” cute and practical πŸŽ€.

Example 3. Round-trip check with m2v_point

mged> set vp [m2v_point 100 0 0] mged> v2m_point $vp

Converts the model point (100, 0, 0) to view space, then converts it back. The result should be approximately 100 0 0 (within floating-point precision). Round-trip queen behavior πŸ‘‘.

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” yes, the whole team. Respect 🫢.

πŸ’Œ BUG REPORTS πŸ’Œ

Found a bug or a problem? Reports should be submitted via electronic mail to devs@brlcad.org. Do it for the plot πŸ’Œ.


Catch you later bestie β€” this V2M_POINT(nged) page is brought to you by BRL-CAD πŸ’–. The footer didn’t give a date, so I’m not inventing one 🫢✨.

πŸ“¦ where this page comes from