Exemplo n.º 1
0
    def evolve(self, points, t):
        # Given points at time 0, return points at time t.
        lats = geometry.points_to_latitudes(points/self.radius, self.axis)
        vels = physics.fluid_rotation(self.eq_angvel, self.polar_angvel, lats)
        result = np.zeros(points.shape)

        mat = geometry.rotation_matrix(-vels * t, self.axis)
        return np.dot( points, mat.transpose() )
Exemplo n.º 2
0
 def angvel(self, points):
     # Takes points to angular velocities. Trivial constant function in this case.
     lats = geometry.points_to_latitudes(points/self.radius, self.axis)
     vels = physics.fluid_rotation(self.eq_angvel, self.polar_angvel, lats)
     return np.kron(self.axis, vels.reshape(len(vels), 1))