Пример #1
0
 def __init__(this, *args, **kwargs):
     heptagonsShape = Geom3D.IsometricShape(Vs=[],
                                            Fs=[],
                                            directIsometries=isometry.A4(),
                                            name='FoldedHeptagonsA4')
     xtraTrisShape = Geom3D.IsometricShape(Vs=[],
                                           Fs=[],
                                           directIsometries=isometry.A4(),
                                           name='xtraTrisA4')
     trisO3Shape = Geom3D.IsometricShape(Vs=[],
                                         Fs=[],
                                         directIsometries=isomsO3,
                                         colors=[([rgb.cyan[:]], [])],
                                         name='o3TrisA4')
     Heptagons.FldHeptagonShape.__init__(
         this, [heptagonsShape, xtraTrisShape, trisO3Shape],
         3,
         3,
         name='FoldedRegHeptA4')
     this.heptagonsShape = heptagonsShape
     this.xtraTrisShape = xtraTrisShape
     this.trisO3Shape = trisO3Shape
     this.posAngleMin = -math.pi
     this.posAngleMax = math.pi
     this.posAngle = 0
     this.setEdgeAlternative(trisAlt.strip_1_loose, trisAlt.strip_1_loose)
     this.initArrs()
     this.setV()
Пример #2
0
 def __init__(this, *args, **kwargs):
     heptagonsShape = Geom3D.IsometricShape(Vs=[],
                                            Fs=[],
                                            directIsometries=isomA5,
                                            name='FoldedHeptagonsA5',
                                            recreateEdges=False)
     xtraTrisShape = Geom3D.IsometricShape(Vs=[],
                                           Fs=[],
                                           directIsometries=isomA5,
                                           name='xtraTrisA5',
                                           recreateEdges=False)
     trisO3Shape = Geom3D.SymmetricShape(Vs=[],
                                         Fs=[],
                                         finalSym=isomA5,
                                         stabSym=isomO3,
                                         colors=[([rgb.cyan[:]], [])],
                                         name='o3TrisA5',
                                         recreateEdges=False)
     trisO5Shape = Geom3D.SymmetricShape(Vs=[],
                                         Fs=[],
                                         finalSym=isomA5,
                                         stabSym=isomO5,
                                         colors=[([rgb.cyan[:]], [])],
                                         name='o5PentasA5',
                                         recreateEdges=False)
     Heptagons.FldHeptagonShape.__init__(
         this, [heptagonsShape, xtraTrisShape, trisO3Shape, trisO5Shape],
         5,
         3,
         name='FoldedRegHeptA5xI')
     this.heptagonsShape = heptagonsShape
     this.xtraTrisShape = xtraTrisShape
     this.trisO3Shape = trisO3Shape
     this.trisO5Shape = trisO5Shape
     this.posAngleMin = -math.pi / 2
     this.posAngleMax = math.pi / 2
     this.height = 2.7
     this.dihedralAngle = Geom3D.Deg2Rad * 119
     this.initArrs()
     this.setTriangleFillPosition(0)
     this.setEdgeAlternative(trisAlt.strip_II, trisAlt.strip_II)
     this.setV()
Пример #3
0
    def __init__(this, *args, **kwargs):
	heptagonsShape = Geom3D.IsometricShape(
	    Vs = [], Fs = [], directIsometries = isomS4,
            name = 'FoldedHeptagonsS4',
	    recreateEdges = False
        )
	xtraTrisShape = Geom3D.IsometricShape(
	    Vs = [], Fs = [], directIsometries = isomS4,
            name = 'xtraTrisS4',
	    recreateEdges = False
        )
	trisO3Shape = Geom3D.SymmetricShape(
	    Vs = [], Fs = [],
	    finalSym = isomS4, stabSym = isomO3,
	    colors = [([rgb.cyan[:]], [])],
            name = 'o3TrisS4',
	    recreateEdges = False
        )
	trisO4Shape = Geom3D.SymmetricShape(
	    Vs = [], Fs = [],
	    finalSym = isomS4, stabSym = isomO4,
	    colors = [([rgb.cyan[:]], [])],
            name = 'o4SquareS4',
	    recreateEdges = False
        )
	Heptagons.FldHeptagonShape.__init__(this,
	    [heptagonsShape, xtraTrisShape, trisO3Shape, trisO4Shape],
	    4, 3,
            name = 'FoldedRegHeptS4xI'
        )
	this.heptagonsShape = heptagonsShape
	this.xtraTrisShape = xtraTrisShape
	this.trisO3Shape = trisO3Shape
	this.trisO4Shape = trisO4Shape
	this.posAngleMin = -pos_angle_refl_2
        this.posAngleMax = pos_angle_refl_2
	this.height = 3.9
        this.setEdgeAlternative(trisAlt.strip_1_loose, trisAlt.strip_1_loose)
	this.initArrs()
	this.setV()
Пример #4
0

def Vlen(v0, v1):
    x = v1[0] - v0[0]
    y = v1[1] - v0[1]
    z = v1[2] - v0[2]
    return (math.sqrt(x * x + y * y + z * z))


# get the col faces array by using a similar shape here, so it is calculated
# only once
useIsom = isometry.A4()
egShape = Geom3D.IsometricShape(Vs=[
    GeomTypes.Vec3([0, 0, 1]),
    GeomTypes.Vec3([0, 1, 1]),
    GeomTypes.Vec3([1, 1, 1])
],
                                Fs=[[0, 1, 2]],
                                directIsometries=useIsom,
                                unfoldOrbit=True)
#colStabiliser = isometry.C2(setup = {'axis': [0.0, 1.0, 0.0]})
#colStabiliser = isometry.C2(setup = {'axis': [0.0, 0.0, 1.0]})
useSimpleColours = False
colStabiliser = isometry.C2(setup={'axis': [1.0, 0.0, 0.0]})
colQuotientSet = useIsom / colStabiliser
if useSimpleColours:
    useRgbCols = [
        rgb.gray95,
        rgb.gray80,
        rgb.gray65,
        rgb.gray50,
        rgb.gray35,
Пример #5
0
shape = Geom3D.IsometricShape(
    Vs = [
        GeomTypes.Vec3([1.0, 1.0, 1.0]),
        GeomTypes.Vec3([-1.0, 1.0, 1.0]),
        GeomTypes.Vec3([-1.0, -1.0, 1.0]),
        GeomTypes.Vec3([1.0, -1.0, 1.0]),
        GeomTypes.Vec3([1.0, 1.0, -1.0]),
        GeomTypes.Vec3([-1.0, 1.0, -1.0]),
        GeomTypes.Vec3([-1.0, -1.0, -1.0]),
        GeomTypes.Vec3([1.0, -1.0, -1.0])
    ],
    Fs = [
        [0, 1, 2, 3],
        [0, 3, 7, 4],
        [1, 0, 4, 5],
        [2, 1, 5, 6],
        [3, 2, 6, 7],
        [7, 6, 5, 4]
    ],
    Es = [0, 1, 1, 2, 2, 3, 0, 3, 3, 7, 4, 7, 0, 4, 4, 5, 1, 5, 5, 6, 2, 6, 6, 7],
    colors = [
        ([[0.99609400000000003, 0.83984400000000003, 0.0]], []),
        ([[0.13281200000000001, 0.54296900000000003, 0.13281200000000001]], []),
        ([[0.54296900000000003, 0.0, 0.0]], []),
        ([[0.0, 0.74609400000000003, 0.99609400000000003]], []),
        ([[0.54296900000000003, 0.0, 0.0]], []),
        ([[0.13281200000000001, 0.54296900000000003, 0.13281200000000001]], []),
        ([[0.0, 0.74609400000000003, 0.99609400000000003]], []),
        ([[0.0, 0.74609400000000003, 0.99609400000000003]], []),
        ([[0.99609400000000003, 0.83984400000000003, 0.0]], []),
        ([[0.54296900000000003, 0.0, 0.0]], []),
        ([[0.13281200000000001, 0.54296900000000003, 0.13281200000000001]], []),
        ([[0.99609400000000003, 0.83984400000000003, 0.0]], [])
    ],
    directIsometries = [
        GeomTypes.Rot3((
            GeomTypes.Quat([-0.5, 0.5, -0.5, -0.5]),
            GeomTypes.Quat([-0.5, -0.5, 0.5, 0.5]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([-0.707106781187, 1.04526690545e-16, -0.707106781187, 4.32963728536e-17]),
            GeomTypes.Quat([-0.707106781187, -1.04526690545e-16, 0.707106781187, -4.32963728536e-17]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([-1.22460635382e-16, 6.12303176911e-17, -0.707106781187, -0.707106781187]),
            GeomTypes.Quat([-1.22460635382e-16, -6.12303176911e-17, 0.707106781187, 0.707106781187]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([0.707106781187, -0.707106781187, -6.12303176911e-17, -6.12303176911e-17]),
            GeomTypes.Quat([0.707106781187, 0.707106781187, 6.12303176911e-17, 6.12303176911e-17]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([-3.33066907388e-16, -0.707106781187, 0.707106781187, 3.08170915002e-16]),
            GeomTypes.Quat([-3.33066907388e-16, 0.707106781187, -0.707106781187, -3.33066907388e-16]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([0.5, -0.5, -0.5, -0.5]),
            GeomTypes.Quat([0.5, 0.5, 0.5, 0.5]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([-0.5, -0.5, 0.5, -0.5]),
            GeomTypes.Quat([-0.5, 0.5, -0.5, 0.5]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([3.74915180456e-33, 0.707106781187, 6.12303176911e-17, -0.707106781187]),
            GeomTypes.Quat([3.74915180456e-33, -0.707106781187, -6.12303176911e-17, 0.707106781187]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([-0.707106781187, -0.707106781187, -6.12303176911e-17, 6.12303176911e-17]),
            GeomTypes.Quat([-0.707106781187, 0.707106781187, 6.12303176911e-17, -6.12303176911e-17]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([6.12303176911e-17, 0.707106781187, -2.46519032882e-32, 0.707106781187]),
            GeomTypes.Quat([6.12303176911e-17, -0.707106781187, 2.46519032882e-32, -0.707106781187]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([3.33066907388e-16, 1.11022302463e-16, -0.707106781187, 0.707106781187]),
            GeomTypes.Quat([3.33066907388e-16, -1.11022302463e-16, 0.707106781187, -0.707106781187]),
        )),
        GeomTypes.Rot3((
            GeomTypes.Quat([0.707106781187, 4.32963728536e-17, -0.707106781187, -1.04526690545e-16]),
            GeomTypes.Quat([0.707106781187, -4.32963728536e-17, 0.707106781187, 1.04526690545e-16]),
        ))
    ],
    unfoldOrbit = False,
    name = '12cubes.py',
    orientation = GeomTypes.Rot3((
        GeomTypes.Quat([0.953020613871, 0.214186495298, 0.0, 0.214186495298]),
        GeomTypes.Quat([0.953020613871, -0.214186495298, -0.0, -0.214186495298]),
    ))
)
Пример #6
0
shape = Geom3D.IsometricShape(
    Vs=[
        GeomTypes.Vec3([1.0, 1.0, 1.0]),
        GeomTypes.Vec3([-1.0, 1.0, 1.0]),
        GeomTypes.Vec3([-1.0, -1.0, 1.0]),
        GeomTypes.Vec3([1.0, -1.0, 1.0]),
        GeomTypes.Vec3([1.0, 1.0, -1.0]),
        GeomTypes.Vec3([-1.0, 1.0, -1.0]),
        GeomTypes.Vec3([-1.0, -1.0, -1.0]),
        GeomTypes.Vec3([1.0, -1.0, -1.0]),
    ],
    Fs=[
        [0, 1, 2, 3],
        [0, 3, 7, 4],
        [1, 0, 4, 5],
        [2, 1, 5, 6],
        [3, 2, 6, 7],
        [7, 6, 5, 4],
    ],
    Es=[
        0, 1, 1, 2, 2, 3, 0, 3, 3, 7, 4, 7, 0, 4, 4, 5, 1, 5, 5, 6, 2, 6, 6, 7
    ],
    colors=[
        ([[0.99609400000000003, 0.83984400000000003, 0.0]], []),
        ([[0.13281200000000001, 0.54296900000000003,
           0.13281200000000001]], []),
        ([[0.54296900000000003, 0.0, 0.0]], []),
        ([[0.0, 0.74609400000000003, 0.99609400000000003]], []),
        ([[0.54296900000000003, 0.52343799999999996,
           0.30468800000000001]], []),
    ],
    directIsometries=[
        GeomTypes.Rot3(
            (GeomTypes.Quat(
                [-0.809016994375, -0.5, 0.309016994375, -3.08426926158e-14]),
             GeomTypes.Quat(
                 [-0.809016994375, 0.5, -0.309016994375, 3.08426926158e-14]))),
        GeomTypes.Rot3(
            (GeomTypes.Quat(
                [0.809016994375, -0.309016994375, -4.98739097981e-14, -0.5]),
             GeomTypes.Quat(
                 [0.809016994375, 0.309016994375, 4.98739097981e-14, 0.5]))),
        GeomTypes.Rot3(
            (GeomTypes.Quat([0.5, 0.5, -0.5,
                             -0.5]), GeomTypes.Quat([0.5, -0.5, 0.5, 0.5]))),
        GeomTypes.Rot3(
            (GeomTypes.Quat(
                [0.5, -4.53526105559e-14, -0.309016994375, 0.809016994375]),
             GeomTypes.Quat(
                 [0.5, 4.53526105559e-14, 0.309016994375, -0.809016994375]))),
        GeomTypes.Rot3(
            (GeomTypes.Quat(
                [4.582785177e-15, -0.5, 0.809016994375, 0.309016994375]),
             GeomTypes.Quat(
                 [4.582785177e-15, 0.5, -0.809016994375, -0.309016994375]))),
    ],
    unfoldOrbit=False,
    name="5cubes.py",
    orientation=GeomTypes.Rot3(
        (GeomTypes.Quat([1.0, 0.0, 0.0,
                         0.0]), GeomTypes.Quat([1.0, -0.0, -0.0, -0.0]))))