Vizard 8 » Command Index » Vizard modules » vizmat » <vizmat>.VectorToPoint
8.1

<vizmat>.VectorToPoint

Returns a normalized vector pointing from p1 to p2

<vizmat>.VectorToPoint(  
p1 # [x,y,z]
p2 # [x,y,z]
)  
p1
The first point
p2
The second point

Remarks

This command will return a normalized vector that points from p1 to p2

Return Value

A list of 3 numbers representing the normalized vector.

Example

import vizmat

p1 = [0,0,0]
p2 = [1,0,1]

#This will print out [0.707,0,0.707]
print(vizmat.VectorToPoint(p1,p2))