'Find look at point and look up vector using quaternion

I have an origin point(x, y, z) from where I want to look a 3d model. I have quaternion data of type (scalar, i, j, k). From this how can I calculate look at or end point and look up vector.

cad


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source