Schneemann.seq
;*******************************************************************
; Winter 2018
;*******************************************************************
; WIr wünschen Ihnen eine Frohe Weihnacht
; und
; einen guten Rutsch ins Jahr 2019
;
; imc Test & Measurement GmbH
;*******************************************************************
;----------------------------------------------------------------
; const
;----------------------------------------------------------------
;----- View
{imc:LineType.Bar} = 5
{imc:LineType.Dots} = 3
{imc:LineType.line} = 1
{imc:LineType.No} = 0
{imc:LineType.VertLine} = 4
{imc:LineType.Bar3d} = 7
{imc:LineType.Interpolation} = 8
;----- color
Color:Sky = RGB( 0, 8, 76)
Color:Earth = RGB( 0, 74, 192)
Color:Snow = RGB( 255,255, 255)
;Color:Snow = RGB( 176, 192, 255)
Color:Tree = RGB( 0, 0, 255)
Color:TreeLigth = RGB( 0, 0, 255)
Color:imc = RGB( 218, 0, 70)
Color:Star_M = RGB( 75,77, 255)
Color:Star_S = RGB( 75,112,255)
Color:Nr1 = RGB( 0, 255, 255)
Color:Nr2 =RGB( 0, 0, 96)
;Color:Snow = RGB( 255, 255, 225)
Color:Knopf = RGB( 0, 14, 76)
Color:Eye = RGB( 192, 0, 176)
;----------------------------------------------------------------
; some Measurement Signals
;----------------------------------------------------------------
;----- Landscape
Winter:Sky = Rampe(0, 0.01, 3000)*0+6
Winter:Earth = Rampe(0, 0.1, 300)/30*2
Winter:Earth_Color=(Rampe(0, 0.1, 300)/30)*6+2
Winter:Horizont = Rampe(0, 0.1, 300)*0 + 2
_t = Rampe(0, 0.1, 180)/30*Pi
_t = Sin( _t) * 0.5
_t = xOff( _t, 12)
Winter:Snow = _t - 0.1
Winter:SnowLine = _t
_t = random( 300, 1, 0, 0, 0 ) + 2
_t = xDel( _t, 0.1)
Winter:Stars_S = _t
_t = random( 300, 1, 0, 0, 0 ) + 2
_t = xDel( _t, 0.1)
Winter:Stars_M = _t
_t = Rampe(0, 0.1, 100)/20*Pi
_t = Cos( _t) + 3.5
_t = xOff( _t, 0.5)
Winter:StarLite = _t
Winter:StarLite_Color = (_t-3.5)*6
_Mask = Rampe(0, 1, 100)/100
_t = Random( 100, 1, 0, 0, 0)
_t = _t/max(_t)
_a = _t - _Mask
_x = (_t < _Mask)
_t = _t * _x
;Winter:Tree
;----- Snowman
Snowman:sky = Rampe(10,0.1,200)*0+5
Snowman:Earth = Rampe(10,0.1,200)*0+0.5
Snowman:Ball_1= xyVon( 20, 1)
Snowman:Ball_2= xyvon( 20, 2.5)
Snowman:Ball_3=xyVon( 20, 3.75)
Snowman:Knopf=xyVon( Rampe(0,1,4)*0+20, Rampe(0.7,0.7,4))
Snowman:Arms=xyVon( Binde( 17.5, 22.5), Binde( 2.66, 2.66))
Snowman:Eye=XYvon( Binde( 19.5, 20.5), Binde( 3.80, 3.80))
Snowman:EyeLight=XYvon( Binde( 19.7, 20.7), Binde( 3.85, 3.85))
Snowman:Nose=XYvon(20.2,3.65)
Snowman:Hat=Snowman:Eye+0.56
Snowman:Hat_01 = XYvon( Binde( 17.5, 22.5), Binde( 4.05, 4.05))
x = Rampe( Pi, Pi/100, 100)
y = 1.5*Sin( x) / 10 + 3.55
x = x / 2.5 + 18.1
Snowman:Mouth=XYvon( x, y)
x = Rampe( Pi, Pi/100, 100)
y1=Sin( x)
y2 = 2*Sin( x)
y = Binde( y1, Spieg(y2))
y = y / 10
y = y + 3.6
x = Binde( x, spieg(x))
x = x / 3
x = x + 18.5
yy=XYvon( x, y)
; das ist ein schöner Mund
; -> geht nicht
; da eine hysterese nicht im Kurvenfenster gefüllt werden kann
;----- Überschrift
XmasByImc = empty
;----------------------------------------------------------------
; color
;----------------------------------------------------------------
SetColor( Winter:Earth, color:Earth)
SetColor( Winter:Horizont, color:imc)
SetColor( Winter:Sky, color:sky)
SetColor( Winter:Snow, color:sky)
SetColor( Winter:StarLite, color:imc)
SetColor( Winter:Stars_S, color:Star_S)
SetColor( Winter:Stars_M, color:Star_M)
SetColor( Winter:SnowLine, color:imc)
SetColor( Snowman:Sky, color:Sky)
SetColor( Snowman:Earth, color:Earth)
SetColor( Snowman:Arms, color:Snow)
SetColor( Snowman:Ball_1, color:Snow)
SetColor( Snowman:Ball_2, color:Snow)
SetColor( Snowman:Ball_3, color:Snow)
SetColor( Snowman:Eye, color:Knopf)
SetColor( Snowman:EyeLight, color:snow)
SetColor( Snowman:Hat, color:imc)
SetColor( Snowman:Hat_01, color:imc)
SetColor( Snowman:Knopf, color:Knopf)
SetColor( Snowman:Mouth, color:knopf)
SetColor( Snowman:Nose, color:imc)
;----------------------------------------------------------------
; Painting
;----------------------------------------------------------------
{imc.Symbol.BigDots} = 8
WinterTime = empty
CwNewWindow( WinterTime, "show")
CwDisplaySet("legend.display",2) ; Legende.Off
CwDisplaySet("color palette", 1) ; Farbpalette.On
CwDisplaySet("3D.represent", 2);
CwDisplaySet("3D.color pattern", 1) ; 2 Farben
CwDisplaySet("3d.colors.number", 100)
CwDisplaySet("3D.color.fix1", Color:Nr1)
CwDisplaySet("3d.color.fix2", Color:Nr2)
CwSelectByIndex("z-axis", 1)
CwAxisSet( "Range", 4) ; fester Range
CwAxisSet( "min", 0) ; 0..6
CwAxisSet( "max", 6)
CwDisplaySet("win.dx", 800)
CwDisplaySet("win.dy", 500)
CwDisplaySet("win.x", 0)
CwDisplaySet("win.y", 0)
;----- Landscape
CwNewChannel( "first line", Winter:Sky)
CwLineSet( "type", {imc:LineType.Bar})
CwLineSet( "Width.screen", 6)
CwAxisSet( "Range", 4) ; fester Range
CwAxisSet( "min", 0) ; 0..5
CwAxisSet( "max", 5)
CwNewChannel( "first line", Winter:Earth)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", 9); hooriz. linie
CwLineSet( "Width.screen", -1)
CwNewChannel( "append line", Winter:Earth_Color)
CwSelectByChannel("data", Winter:Earth_Color) ; Select Channel
CwDataSet( "function", 1) ; Channel = Farbe
CwNewChannel( "first line", Winter:Stars_S)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 1)
CwNewChannel( "first line", Winter:Stars_M)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 1.5)
CwNewChannel( "first line", Winter:StarLite)
CwLineSet( "Width.screen", 1.5)
CwNewChannel( "append line", Winter:StarLite_Color) ; Color
CwSelectByChannel("data", Winter:StarLite_Color) ; Select Channel
CwDataSet( "function", 1) ; Channel = Farbe
;CwLineSet( "shift.x",)
CwNewChannel( "first line", Winter:Horizont)
;----- Snowman
CwSelectByChannel("line", Winter:Horizont) ; der Schneemann kommt hinter den Schnee
CwNewChannel( "insert line", SnowMan:Ball_1)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 45)
CwNewChannel( "insert line", SnowMan:Ball_2)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 30)
CwNewChannel( "insert line", SnowMan:Ball_3)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 20)
CwNewChannel( "insert line", SnowMan:Arms)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 10)
CwNewChannel( "insert line", SnowMan:Knopf)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 5)
CwNewChannel( "insert line", SnowMan:Eye)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 5)
CwNewChannel( "first line", SnowMan:EyeLight)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", {imc.Symbol.BigDots})
CwLineSet( "symbolsize.screen", 1)
CwNewChannel( "insert line", SnowMan:Hat)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", 15)
;CwLineSet( "symbol", 23)
;CwLineSet( "symbolsize.screen", 5)
CwLineSet( "symbolsize.screen", 10)
CwNewChannel( "insert line", SnowMan:Hat_01)
CwLineSet( "Width.screen", 2)
CwNewChannel( "insert line", SnowMan:Nose)
CwLineSet( "type", {imc:LineType.No})
CwLineSet( "symbol", 16)
CwLineSet( "symbolsize.screen", 3)
CwNewChannel( "first line", SnowMan:Mouth)
CwLineSet( "Width.screen", 1)
;----- Schnee
CwNewChannel( "first line", Winter:Snow)
CwLineSet( "type", {imc:LineType.Bar})
CwLineSet( "Width.screen", 2.25)
CwNewChannel( "first line", Winter:SnowLine)
CwLineSet( "Width.screen", 2.5)
;----- Caption
CwNewChannel( "first line", XmasByImc)
;----------------------------------------------------------------
; aufräumen
;----------------------------------------------------------------
Del _*
;----------------------------------------------------------------
; Blinkern
;----------------------------------------------------------------
exit
while 1
Color:Star_M = RGB( 75,77, 255)
Color:Star_S = RGB( 75,112,255)
SetColor( Winter:Stars_S, color:Star_M)
SetColor( Winter:Stars_M, color:Star_S)
sleep(0.5)
SetColor( Winter:Stars_S, color:Star_s)
SetColor( Winter:Stars_M, color:Star_m)
sleep(0.5)
Winter:StarLite_Color = winter:starLite_Color - 0.1
end