Skip to content

Instantly share code, notes, and snippets.

@Piyush3dB
Created November 21, 2016 16:10
Show Gist options
  • Save Piyush3dB/23bf093f027cbc664cfd5f484914936c to your computer and use it in GitHub Desktop.
Save Piyush3dB/23bf093f027cbc664cfd5f484914936c to your computer and use it in GitHub Desktop.
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