Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import numpy as np
- def test():
- """
- :rtype: test
- """
- # 平面を定義
- center = np.array([2, 2, 2])
- p1 = np.array([2, 0, 2])
- p2 = np.array([0, 2, 2])
- vec1 = p1 - center
- vec2 = p2 - center
- cross = np.cross(vec1, vec2)
- print("Plane Normal", cross)
- a1 = np.array([3, 3, 2])
- vec3 = a1 -center
- vec4 = np.dot(vec3, cross)
- print("vec4", vec4)
- if __name__ == '__main__':
- test()
Add Comment
Please, Sign In to add comment