Skip to content

Instantly share code, notes, and snippets.

@JokerMartini
Created January 29, 2016 02:57
Show Gist options
  • Save JokerMartini/b616ea2de26502a9e451 to your computer and use it in GitHub Desktop.
Save JokerMartini/b616ea2de26502a9e451 to your computer and use it in GitHub Desktop.
delete objects
theV = normalize [5,0,10] --the vector to rotate, normalized to unit vector
theStep = 180 --the step by which you want to rotate --rotate from 0 to 360-theStep with step TheStep:
for a = 0 to 360-theStep by theStep do
(
rm = rotateZMatrix a --create a rotation matrix from the value
theRotV = theV * rm --transform the original vector using the matrix
format "%: %\n" a theRotV --print the result to Listener
c = cylinder() --create a cylinder
c.dir = theRotV --orient along the vector to see what it looks like
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment