Created
November 21, 2016 16:10
-
-
Save Piyush3dB/23bf093f027cbc664cfd5f484914936c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pdb as pdb | |
# Angle per point | |
angle = np.pi/6 | |
# Total number of points to evaluate | |
N = 2*np.pi/angle | |
# Define rotation matrix | |
rM = np.array([[np.cos(angle), -np.sin(angle)], | |
[np.sin(angle), np.cos(angle)]]) | |
# Evaluate Points | |
pts = np.zeros((N, 2)) | |
r = 1 | |
pts[0,0] = 0 | |
pts[0,1] = r | |
pt = np.array([[r],[0]]) | |
pdb.set_trace() | |
for i in range(1, int(N)): | |
pt = np.dot(rM, pt) | |
print pt | |
#pts[:,0] = pt[:,0] | |
pdb.set_trace() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment