3rd Order Polynomials with Quaternion Coefficients

summary: 

The green line takes a slightly bigger step away from its real coefficient counterpart. Polynomials can be curved in space due to their quaternion coefficients.

description: 

The input in yellow passes through the origin. The red input has real coefficients, and stays exactly in line with the yellow. The green line with its complex coefficients curves though space, but has the same large scale features as the red line - a reverse s shape.

command: 
q_graph -out poly_3_q_coeffients -dir poly -box 5 -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c "1 0.1 0 0" -n 1 -c "3 0 .2 0" -n 0 -c "-2 .01 .01 .01"' -color green -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000 | q_poly -n 3 -c 1 -n 1 -c 3 -n 0 -c -2' -color red -command 'q_add_n -3 -3 -3 -3 .005 .005 .005 .005 1000' -color yellow
math
equation: 

Input: (-3, -3, -3, -3) to (2, 2, 2, 2)
Output in red: q^3 + 3 q - 2
Output in green: (1, .1, 0, 0) q^3 + (3, 0, .2, 0) q - (2, .1, .1, .1)

tags
Math Tag: 
polynomials
Programming Tag: 
command line quaternions
q_add
q_poly