Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)

src/p/v/pvtrace-HEAD/pvtrace/ConstructiveGeometry.py   pvtrace(Download)
 
from Geometry import Box, Cylinder, Ray, cmp_points, separation
from external.transformations import translation_matrix, rotation_matrix
import external.transformations as tf
import numpy as np
def transform_direction(direction, transform):
    angle, axis, point = tf.rotation_from_matrix(transform)
    rotation_transform = tf.rotation_matrix(angle, axis)
    return np.array(np.dot(rotation_transform, np.matrix(np.concatenate((direction, [1.]))).transpose()).transpose()[0,0:3]).squeeze()
 

src/p/v/pvtrace-HEAD/pvtrace/Geometry.py   pvtrace(Download)
import numpy as np
import numpy.linalg
from external.transformations import translation_matrix, rotation_matrix
import external.transformations as tf
from external.quickhull import qhull3d
            # The ray direction needs to be reversed
            return np.array(direction) * -1.
    rotation_transform = tf.rotation_matrix(angle, axis)
    return np.array(np.dot(rotation_transform, np.matrix(np.concatenate((direction, [1.]))).transpose()).transpose()[0,0:3]).squeeze()
 
    axis = np.cross(before, after)            # get the axis of rotation
    angle = np.arccos(np.dot(before, after))  # get the rotation angle
    return rotation_matrix(angle, axis)
 
 
        #import pdb; pdb.set_trace()                                                      
        R = rotation_matrix_from_vector_alignment(V1, V2)
        R2 = rotation_matrix(np.pi, [1,0,0])
        V3 = transform_direction(V1, R)
        print R2

src/p/v/pvtrace-HEAD/pvtrace/LightSources.py   pvtrace(Download)
 
import numpy as np
from external.transformations import translation_matrix, rotation_matrix
import external.transformations as tf
from Trace import Photon
    def rotate(self, angle, axis):
        self.plane.append_transform(tf.rotation_matrix(angle, axis))
 
    def photon(self):
        photon = Photon()
    def rotate(self, angle, axis):
        self.shape.append_transform(tf.rotation_matrix(angle, axis))
 
    def photon(self):
        photon = Photon()

src/p/v/pvtrace-HEAD/pvtrace/Materials.py   pvtrace(Download)
from types import *
import os
from external.transformations import translation_matrix, rotation_matrix
import external.transformations as tf
 

src/p/v/pvtrace-HEAD/pvtrace/Devices.py   pvtrace(Download)
from  __future__ import division
import numpy as np
from external.transformations import translation_matrix, rotation_matrix
import external.transformations as tf
from Geometry import *