Exemplo n.º 1
0
import sys

sys.path.append('../hallucinator')
import hallucinator as hl
import math
import numpy as np

scene = hl.MonochromeScene()

f = hl.sin_wave(amplitude=0.3, frequency=6)

disturbance = hl.propagating_disturbance_2d(f, v=2)

surface = hl.surface(surface_func=hl.plane(p0=(0, 0, 0),
                                           v1=(0, 1, 0),
                                           v2=(0, 0, 1)),
                     a_range=(-5, 5),
                     b_range=(-5, 5))

surface.add_disturbance(disturbance=disturbance,
                        init_pos=(0, 0),
                        polarization=(-1, 0, 0))

scene.add_object(hl.cross(width=1,
                          depth=1,
                          span=2,
                          l_height=4,
                          u_height=2,
                          origin=(0, 0, 0)),
                 name="cross")
Exemplo n.º 2
0
import sys

sys.path.append('../hallucinator')
import hallucinator as hl
import math
import numpy as np
import random

scene = hl.MonochromeScene()

yz = hl.surface(surface_func=hl.plane(p0=(0, 0, 0),
                                      v1=(0, 1, 0),
                                      v2=(0, 0, 1)),
                a_range=(-5, 5),
                b_range=(-5, 5))

xy = hl.surface(surface_func=hl.plane(p0=(0, 0, 0),
                                      v1=(0, 1, 0),
                                      v2=(1, 0, 0)),
                a_range=(-5, 5),
                b_range=(-5, 5))

xz = hl.surface(surface_func=hl.plane(p0=(0, 0, 0),
                                      v1=(0, 0, 1),
                                      v2=(1, 0, 0)),
                a_range=(-5, 5),
                b_range=(-5, 5))

scene.add_object(xy, name="xy")
scene.add_object(yz, name="yz")
scene.add_object(xz, name="xz")