@name Hologramm
@inputs 
@outputs 
@persist T
@trigger all


interval(50)


if(first())
{
    holoCreate(1)
    holoCreate(2)
    holoCreate(3)
    holoCreate(4)
    holoCreate(5)
    holoCreate(6)
    holoCreate(7)
    holoCreate(8)
    holoCreate(9)
    holoCreate(10)
    holoCreate(11)
    holoCreate(12)
    holoCreate(13)
    holoCreate(14)
    holoCreate(15)
    holoCreate(16)
    holoCreate(17)
    holoCreate(18)
    holoCreate(19)
    holoCreate(20)
    holoCreate(21)
}



L=entity():boxSize():x()/12
W=entity():boxSize():y()/12


N=11
M=5
Ang=entity():angles()


Ho=1
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=2
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=3
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=4
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=5
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=6
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=7
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=8
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=9
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=10
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=11
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=12
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=13
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=14
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=15
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=16
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=17
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=18
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=19
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=20
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)

Ho=21
C=vec(((cos(T+Ho*M)+1)/2)*255,((cos(T+Ho*M+90)+1)/2)*255,((cos(T+Ho*M+180)+1)/2)*255)
H=(cos(T+(10*Ho))+1)*M
Pos=entity():pos()+entity():up()*(H/2*12)+((L*12*(Ho-N))*entity():forward())
holoColor(Ho,C)
holoPos(Ho,Pos)
holoScale(Ho,vec(L,W,H))
holoAng(Ho,Ang)


T++
