<vizmat>.ReflectionVector

Compute the reflection vector given an incoming and normal vector

 

<vizmat>.ReflectionVector(
    incoming    # [x,y,z]
    normal    # [x,y,z]

)

 

incoming

A list of 3 numbers representing the incoming vector


normal

A list of 3 numbers representing the normal vector of the surface


Remarks

This command will return the reflection vector of the given incoming vector and the normal vector of the surface it is reflecting from.

Return Value

A list of 3 numbers representing the reflection vector

Example

import vizmat

incoming = [0,-1,0]
normal = [0,1,0]

#This will print out:
#    [0,1,0]
print vizmat.ReflectionVector(incoming,normal)