Esempio n. 1
0
def rotate_curve_z(curve, angle, scale):
    control_points = np.copy(curve.get_control_points())
    control_points = control_points[:, 0], control_points[:,
                                                          1], control_points[:,
                                                                             2]
    rhos, phis, zs = to_cylindrical_np(control_points, mode='radians')
    xs, ys, zs = from_cylindrical_np(rhos * scale,
                                     phis + angle,
                                     zs,
                                     mode='radians')
    control_points = np.stack((xs, ys, zs)).T
    return curve.copy(control_points=control_points)
Esempio n. 2
0
 def out_coordinates(rho, phi, z):
     return from_cylindrical_np(rho, phi, z, mode='radians')