You are on page 1of 1

import blender

from blender import *


import math
from blender.draw import *
from blender.bgl import *
from math import *
from blender import mathutils
from blender.mathutils import *
time = 0
brush = []
scene = blender.scene.getcurrent()
obj = blender.mesh.new("freehand")
scene.objects.new(obj,"freehand") #<>
center = []
center.append([2.226,2.111,0])
sel = blender.object.getselected()
if sel:obj3=sel[0]
obj3 = obj3.getdata(mesh = 1)
verts = obj3.verts
faces = obj3.faces
edges = obj3.edges
for v in verts:
#v.co[0] =v.co[0]- v.co[0]*sin(60)
#v.co[1] =v.co[1]+ v.co[1]*sin(60)
xdist = v.co[0]-center[0][0]
ydist = v.co[1]-center[0][1]
dist = xdist/ydist
print "degrees sin :",(sin(radians(90)))
vx = v.co[0]
v.co[0] =(v.co[0]*(cos(radians(30))))+ v.co[1]*(sin(radians(30)))
v.co[1] =(v.co[1]*(cos(radians(30))))- vx*(sin(radians(30)))
blender.redraw()
#(center-raadius*sin(radians(stepz)),center+raadius*sin(radians(stepx)),0)

You might also like