fn rotatePointAroundCenter center dir radius steps:36 debug:false = (
local tm = (matrixFromNormal dir)
local p = center+(tm.row1*radius)
local div = 360/steps
local points = for i = 0 to (360 - div) by div collect (
local q = quat i (normalize dir)
(((p - center ) * q) + center)
)
if debug do for p in points do box pos:p dir:(p-center) wirecolor:green
points
)
for i in selection do (rotatePointAroundCenter i.pos i.dir 200 debug:true)