It is currently March 29th, 2024, 2:16 pm

Pendulum (Newton's cradle)

Clocks and timer skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Pendulum (Newton's cradle)

Post by balala »

Do you know what Newton's cradle is? It's a tool which uses (usually) five balls, to demonstrate the conservation of momentum and energy.
This skin is its Rainmeter version and it uses the TransformationMatrix. It has not too much practical purposes, maybe just a clock and date. I've created it just for my own fun, after I was inspired by the Pendulum Sphere Clock Xwidget.
So, how it works? You can start moving one:
Image
two:
Image
three:
Image
or four balls:
Image
or you can start moving just the last ball, but this time in opposite direction:
Image
The skin has a settings tool, which can be opened with the settings button:
Image
In the settings, you can set if the movement of the balls would be attenuated (and in this case you can set the length of attenuation) or not. Also can set the shadows of the balls and the sound playing and the size of the skin (between some limits).
With the Stop button, you can stop the movement of the balls.
Also, clicking to the clock (or where it should be), you can hide or show it:
Image
In my work, I got a lot of help with the image processing, by Chevin. Many thanks to him.

Please let me know what you think about this skin.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

A new release, after a discussion with Yincognito, into another topic.
This is not a finished version yet. I uploaded you to can test it, if interested. I fixed a few errors reported by Yincognito.
You can read a short description of how does work this skin, here. The skin posted in the above post has the errors I was talking about above. Those errors are fixed in this version.
Many thanks to Yincognito for the new balls images.
Please let me know if you encounter any problem or error. Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Pendulum (Newton's cradle)

Post by qwerky »

That is absolutely lovely. Love the new balls. :beer: I noticed that when the new balls are displayed, the clock does not go away when clicked--perhaps that is intentional? :Whistle
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

qwerky wrote: March 17th, 2019, 7:45 pm That is absolutely lovely. Love the new balls. :beer: I noticed that when the new balls are displayed, the clock does not go away when clicked--perhaps that is intentional? :Whistle
Yes, it is. The new balls have the numbers onto themselves, wouldn't be a good idea to add the numbers once again, above the balls. That's why I removed the possibility to switch to the "on balls" numbers in this case.
As I said, those new balls are Yincognito's work.
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Pendulum (Newton's cradle)

Post by qwerky »

balala wrote: March 17th, 2019, 7:50 pm Yes, it is. The new balls have the numbers onto themselves, wouldn't be a good idea to add the numbers once again, above the balls. That's why I removed the possibility to switch to the "on balls" numbers in this case.
As I said, those new balls are Yincognito's work.
That makes sense. Just thought that the clock could be switched off, without adding the additional numbers to the balls, so that the shadows could be seen? ;-)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

qwerky wrote: March 17th, 2019, 7:58 pm That makes sense. Just thought that the clock could be switched off, without adding the additional numbers to the balls, so that the shadows could be seen? ;-)
Yes, possible and makes sense. I'll make this into the next release. Thanks for the idea...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

qwerky wrote: March 17th, 2019, 7:58 pm Just thought that the clock could be switched off, without adding the additional numbers to the balls, so that the shadows could be seen?
Added this option as well. I don't pack again the whole config, since one single measure ([MeasureTimeOnBalls]) is updated into the Pendulum.ini file. When I'll finish the whole work (updating the Settings.ini as well), I'll realize a new installer, with all needed details. But test this update as well, if you're interested and let me know your opinion.
So, the new code of Pendulum.ini is posted below. Replace the old code with this one:

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1
MouseOverAction=[!ShowMeter "MeterSettingsButton"][!SetVariable ShowStop "1"][!UpdateMeter "MeterStopButton"][!Redraw]
MouseLeaveAction=[!HideMeter "MeterSettingsButton"][!SetVariable ShowStop "0"][!UpdateMeter "MeterStopButton"][!Redraw]

[Metadata]
Name=Pendulum (Newton's Cradle)
Author=Yincognito & Chevin & Balala
Version=2
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Information=It shows a fully functional Newton's cradle, with clock. You can start moving from one to four balls.

[Variables]
@Include=#@#Settings.inc
Balls=0
Start=0
Stop=0
ShowStop=0
ShowStop2=1
TimeOnBalls=0

[DateTimeStyle]
X=(#Width#/2)
Y=([MeterCenter:H]-#Width#/20)
Padding=13,0,15,2
FontSize=(#Width#/30)
FontFace=SF Digital Readout
StringStyle=BOLD
StringAlign=CENTER
AntiAlias=1
Text=%2#CRLF#%1
InlineSetting=Size | (#Width#/20)
InlinePattern=^(.*)#CRLF#.*$
DynamicVariables=1

[TimeDigitStyle]
FontColor=0,0,0
FontEffectColor=220,220,220
StringEffect=Shadow
FontSize=(#Width#/18.75)
FontFace=SF Digital Readout
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Text=%1

[MeasureDate]
Measure=Time
Format=locale-date
UpdateDivider=5

[MeasureTime]
Measure=Time
Format=%H:%M
OnChangeAction=[!UpdateMeasureGroup "TimeDigits"]

[MeasureColon]
Measure=Calc
Formula=#UseBalls#
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!Setoption MeterCenter ColorMatrix1 "1;0;0;0;0"][!Setoption MeterCenter ColorMatrix2 "0;1;0;0;0"][!Setoption MeterCenter ColorMatrix3 "0;0;1;0;0"][!SetOption MeterCenter Imagename "#@#Balls\Colon.png"][!UpdateMeter "MeterCenter"][!Redraw]
IfFalseAction=[!SetOption MeterCenter ColorMatrix1 "(246/255);0;0;0;0"][!SetOption MeterCenter ColorMatrix2 "0;(117/255);0;0;0"][!SetOption MeterCenter ColorMatrix3 "0;0;(45/255);0;0"][!SetOption MeterCenter Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterCenter"][!Redraw]
UpdateDivider=-1

[MeasureTimeOnBalls]
Measure=Calc
Formula=(( #UseBalls# = 0 ) ? #TimeOnBalls# : ( -1 - #TimeOnBalls# ))
IfCondition=(#CURRENTSECTION#=-2)
IfTrueAction=[!HideMeter "MeterDateTime"][!HideMeterGroup "TimeDigits"][!Redraw]
IfCondition2=(#CURRENTSECTION#=-1)
IfTrueAction2=[!ShowMeter "MeterDateTime"][!HideMeterGroup "TimeDigits"][!Redraw]
IfCondition3=(#CURRENTSECTION#=0)
IfTrueAction3=[!ShowMeter "MeterDateTime"][!HideMeterGroup "TimeDigits"][!Redraw]
IfCondition4=(#CURRENTSECTION#=1)
IfTrueAction4=[!HideMeter "MeterDateTime"][!ShowMeterGroup "TimeDigits"][!Redraw]
DynamicVariables=1
UpdateDivider=-1

[MeasureTime1Digit]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="^(\d{1})(\d{1})(.)(\d{1})(\d{1})$":"\1"
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime1DigitSet]
Measure=Calc
Formula=(( #UseBalls# >= 1 ) ? ( -[MeasureTime1Digit] - 1 ) : [MeasureTime1Digit] )
IfCondition=(#CURRENTSECTION#=-3)
IfTrueAction=[!Setoption MeterLeft ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft Imagename "#@#Balls\2.png"][!UpdateMeter "MeterLeft"][!Redraw]
IfCondition2=(#CURRENTSECTION#=-2)
IfTrueAction2=[!Setoption MeterLeft ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft Imagename "#@#Balls\1.png"][!UpdateMeter "MeterLeft"][!Redraw]
IfCondition3=(#CURRENTSECTION#=-1)
IfTrueAction3=[!Setoption MeterLeft ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft Imagename "#@#Balls\0.png"][!UpdateMeter "MeterLeft"][!Redraw]
IfCondition4=(#CURRENTSECTION#=0)
IfTrueAction4=[!Setoption MeterLeft ColorMatrix1 "(148/255);0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;(158/255);0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;(225/255);0;0"][!SetOption MeterLeft Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft"][!Redraw]
IfCondition5=(#CURRENTSECTION#=1)
IfTrueAction5=[!Setoption MeterLeft ColorMatrix1 "(242/255);0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;(196/255);0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterLeft Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft"][!Redraw]
IfCondition6=(#CURRENTSECTION#=2)
IfTrueAction6=[!Setoption MeterLeft ColorMatrix1 "(145/255);0;0;0;0"][!Setoption MeterLeft ColorMatrix2 "0;(153/255);0;0;0"][!Setoption MeterLeft ColorMatrix3 "0;0;(218/255);0;0"][!SetOption MeterLeft Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft"][!Redraw]
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime2Digit]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="^(\d{1})(\d{1})(.)(\d{1})(\d{1})$":"\2"
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime2DigitSet]
Measure=Calc
Formula=(( #UseBalls# >= 1 ) ? ( -[MeasureTime2Digit] - 1 ) : [MeasureTime2Digit] )
IfCondition=(#CURRENTSECTION#=-10)
IfTrueAction=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\9.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition2=(#CURRENTSECTION#=-9)
IfTrueAction2=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\8.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition3=(#CURRENTSECTION#=-8)
IfTrueAction3=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\7.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition4=(#CURRENTSECTION#=-7)
IfTrueAction4=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\6.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition5=(#CURRENTSECTION#=-6)
IfTrueAction5=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\5.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition6=(#CURRENTSECTION#=-5)
IfTrueAction6=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\4.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition7=(#CURRENTSECTION#=-4)
IfTrueAction7=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\3.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition8=(#CURRENTSECTION#=-3)
IfTrueAction8=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\2.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition9=(#CURRENTSECTION#=-2)
IfTrueAction9=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\1.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition10=(#CURRENTSECTION#=-1)
IfTrueAction10=[!Setoption MeterLeft2 ColorMatrix1 "1;0;0;0;0""][!Setoption MeterLeft2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\0.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition11=(#CURRENTSECTION#=0)
IfTrueAction11=[!Setoption MeterLeft2 ColorMatrix1 "(148/255);0;0;0;0""][!Setoption MeterLeft2 ColorMatrix2 "0;(158/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(225/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition12=(#CURRENTSECTION#=1)
IfTrueAction12=[!Setoption MeterLeft2 ColorMatrix1 "(242/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(196/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition13=(#CURRENTSECTION#=2)
IfTrueAction13=[!Setoption MeterLeft2 ColorMatrix1 "(145/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(153/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(218/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition14=(#CURRENTSECTION#=3)
IfTrueAction14=[!Setoption MeterLeft2 ColorMatrix1 "(245/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(84/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(68/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition15=(#CURRENTSECTION#=4)
IfTrueAction15=[!Setoption MeterLeft2 ColorMatrix1 "(142/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(123/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(169/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition16=(#CURRENTSECTION#=5)
IfTrueAction16=[!Setoption MeterLeft2 ColorMatrix1 "(249/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(124/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(52/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition17=(#CURRENTSECTION#=6)
IfTrueAction17=[!Setoption MeterLeft2 ColorMatrix1 "(96/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(134/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(131/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition18=(#CURRENTSECTION#=7)
IfTrueAction18=[!Setoption MeterLeft2 ColorMatrix1 "(191/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(88/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(93/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition19=(#CURRENTSECTION#=8)
IfTrueAction19=[!Setoption MeterLeft2 ColorMatrix1 "(146/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(135/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(147/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
IfCondition20=(#CURRENTSECTION#=9)
IfTrueAction20=[!Setoption MeterLeft2 ColorMatrix1 "(240/255);0;0;0;0"][!Setoption MeterLeft2 ColorMatrix2 "0;(194/255);0;0;0"][!Setoption MeterLeft2 ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterLeft2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterLeft2"][!Redraw]
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime3Digit]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="^(\d{1})(\d{1})(.)(\d{1})(\d{1})$":"\3"
DynamicVariables=1
UpdateDivider=-1

[MeasureTime4Digit]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="^(\d{1})(\d{1})(.)(\d{1})(\d{1})$":"\4"
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime4DigitSet]
Measure=Calc
Formula=(( #UseBalls# >= 1 ) ? ( -[MeasureTime4Digit] - 1 ) : [MeasureTime4Digit] )
IfCondition=(#CURRENTSECTION#=-10)
IfTrueAction=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\9.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition2=(#CURRENTSECTION#=-9)
IfTrueAction2=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\8.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition3=(#CURRENTSECTION#=-8)
IfTrueAction3=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\7.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition4=(#CURRENTSECTION#=-7)
IfTrueAction4=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\6.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition5=(#CURRENTSECTION#=-6)
IfTrueAction5=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\5.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition6=(#CURRENTSECTION#=-5)
IfTrueAction6=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\4.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition7=(#CURRENTSECTION#=-4)
IfTrueAction7=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\3.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition8=(#CURRENTSECTION#=-3)
IfTrueAction8=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\2.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition9=(#CURRENTSECTION#=-2)
IfTrueAction9=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\1.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition10=(#CURRENTSECTION#=-1)
IfTrueAction10=[!Setoption MeterRight2 ColorMatrix1 "1;0;0;0;0""][!Setoption MeterRight2 ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight2 Imagename "#@#Balls\0.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition11=(#CURRENTSECTION#=0)
IfTrueAction11=[!Setoption MeterRight2 ColorMatrix1 "(148/255);0;0;0;0""][!Setoption MeterRight2 ColorMatrix2 "0;(158/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(225/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition12=(#CURRENTSECTION#=1)
IfTrueAction12=[!Setoption MeterRight2 ColorMatrix1 "(242/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(196/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition13=(#CURRENTSECTION#=2)
IfTrueAction13=[!Setoption MeterRight2 ColorMatrix1 "(145/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(153/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(218/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition14=(#CURRENTSECTION#=3)
IfTrueAction14=[!Setoption MeterRight2 ColorMatrix1 "(245/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(84/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(68/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition15=(#CURRENTSECTION#=4)
IfTrueAction15=[!Setoption MeterRight2 ColorMatrix1 "(142/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(123/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(169/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition16=(#CURRENTSECTION#=5)
IfTrueAction16=[!Setoption MeterRight2 ColorMatrix1 "(249/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(124/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(52/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition17=(#CURRENTSECTION#=6)
IfTrueAction17=[!Setoption MeterRight2 ColorMatrix1 "(96/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(134/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(131/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition18=(#CURRENTSECTION#=7)
IfTrueAction18=[!Setoption MeterRight2 ColorMatrix1 "(191/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(88/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(93/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition19=(#CURRENTSECTION#=8)
IfTrueAction19=[!Setoption MeterRight2 ColorMatrix1 "(146/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(135/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(147/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
IfCondition20=(#CURRENTSECTION#=9)
IfTrueAction20=[!Setoption MeterRight2 ColorMatrix1 "(240/255);0;0;0;0"][!Setoption MeterRight2 ColorMatrix2 "0;(194/255);0;0;0"][!Setoption MeterRight2 ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterRight2 Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight2"][!Redraw]
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime5Digit]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="^(\d{1})(\d{1})(.)(\d{1})(\d{1})$":"\5"
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[MeasureTime5DigitSet]
Measure=Calc
Formula=(( #UseBalls# >= 1 ) ? ( -[MeasureTime5Digit] - 1 ) : [MeasureTime5Digit] )
IfCondition=(#CURRENTSECTION#=-10)
IfTrueAction=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\9.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition2=(#CURRENTSECTION#=-9)
IfTrueAction2=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\8.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition3=(#CURRENTSECTION#=-8)
IfTrueAction3=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\7.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition4=(#CURRENTSECTION#=-7)
IfTrueAction4=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\6.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition5=(#CURRENTSECTION#=-6)
IfTrueAction5=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\5.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition6=(#CURRENTSECTION#=-5)
IfTrueAction6=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\4.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition7=(#CURRENTSECTION#=-4)
IfTrueAction7=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\3.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition8=(#CURRENTSECTION#=-3)
IfTrueAction8=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\2.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition9=(#CURRENTSECTION#=-2)
IfTrueAction9=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\1.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition10=(#CURRENTSECTION#=-1)
IfTrueAction10=[!Setoption MeterRight ColorMatrix1 "1;0;0;0;0""][!Setoption MeterRight ColorMatrix2 "0;1;0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;1;0;0"][!SetOption MeterRight Imagename "#@#Balls\0.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition11=(#CURRENTSECTION#=0)
IfTrueAction11=[!Setoption MeterRight ColorMatrix1 "(148/255);0;0;0;0""][!Setoption MeterRight ColorMatrix2 "0;(158/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(225/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition12=(#CURRENTSECTION#=1)
IfTrueAction12=[!Setoption MeterRight ColorMatrix1 "(242/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(196/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition13=(#CURRENTSECTION#=2)
IfTrueAction13=[!Setoption MeterRight ColorMatrix1 "(145/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(153/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(218/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition14=(#CURRENTSECTION#=3)
IfTrueAction14=[!Setoption MeterRight ColorMatrix1 "(245/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(84/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(68/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition15=(#CURRENTSECTION#=4)
IfTrueAction15=[!Setoption MeterRight ColorMatrix1 "(142/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(123/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(169/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition16=(#CURRENTSECTION#=5)
IfTrueAction16=[!Setoption MeterRight ColorMatrix1 "(249/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(124/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(52/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition17=(#CURRENTSECTION#=6)
IfTrueAction17=[!Setoption MeterRight ColorMatrix1 "(96/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(134/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(131/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition18=(#CURRENTSECTION#=7)
IfTrueAction18=[!Setoption MeterRight ColorMatrix1 "(191/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(88/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(93/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition19=(#CURRENTSECTION#=8)
IfTrueAction19=[!Setoption MeterRight ColorMatrix1 "(146/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(135/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(147/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
IfCondition20=(#CURRENTSECTION#=9)
IfTrueAction20=[!Setoption MeterRight ColorMatrix1 "(240/255);0;0;0;0"][!Setoption MeterRight ColorMatrix2 "0;(194/255);0;0;0"][!Setoption MeterRight ColorMatrix3 "0;0;(11/255);0;0"][!SetOption MeterRight Imagename "#@#Balls\Ball.png"][!UpdateMeter "MeterRight"][!Redraw]
DynamicVariables=1
Group=TimeDigits
UpdateDivider=-1

[Timer]
Measure=Calc
Formula=( Timer + 1 )
IfCondition=((MeasureTimerLeft>-0.4)&&(MeasureTimerRight<0.4)&&(#Stop#=1))
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"]
IfCondition2=(Timer*#Attenuated#>9*#Attenuation#*#Attenuated#)
IfTrueAction2=[!DisableMeasure "#CURRENTSECTION#"]
DynamicVariables=1
Disabled=1

[Timer2]
Measure=Calc
Formula=Timer
IfCondition=(Timer2=0)
IfTrueAction=[!SetOption MeterLeft LeftMouseUpAction """[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "0"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]"""][!SetOption MeterLeft2 LeftMouseUpAction """[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "1"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]"""][!SetOption MeterCenter LeftMouseUpAction """[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "2"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]"""][!SetOption MeterRight2 LeftMouseUpAction """[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "3"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]"""][!SetOption MeterRight LeftMouseUpAction """[!SetVariable Start "1"][!SetVariable Stop "0"][!SetVariable Balls "0"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]"""][!SetVariable ShowStop2 "0"][!UpdateMeterGroup "Balls"][!UpdateMeter "MeterStopButton"]
IfFalseAction=[!SetOption MeterLeft LeftMouseUpAction ""][!SetOption MeterLeft2 LeftMouseUpAction ""][!SetOption MeterCenter LeftMouseUpAction ""][!SetOption MeterRight2 LeftMouseUpAction ""][!SetOption MeterRight LeftMouseUpAction ""][!SetVariable ShowStop2 "1"][!UpdateMeterGroup "Balls"][!UpdateMeter "MeterStopButton"]

[MeasureSound]
Measure=Calc
Formula=#Sound#
IfCondition=(MeasureSound=1)
IfTrueAction=[!SetOption MeasureTimer IfTrueAction """[PLAY "#@#Newtons_Cradle.wav"]"""][!UpdateMeasure "MeasureTimer"]
IfFalseAction=[!SetOption MeasureTimer IfTrueAction ""][!UpdateMeasure "MeasureTimer"]

[MeasureShadow]
Measure=Calc
Formula=#Shadow#
IfCondition=(MeasureShadow=1)
IfTrueAction=[!ShowMeterGroup "Shadow"][!Redraw]
IfFalseAction=[!HideMeterGroup "Shadow"][!Redraw]

[MeasureTimer]
Measure=Calc
Formula=(( 1 - #Attenuated# * Timer / ( 9 * #Attenuation# )) * Sin ( 2 * PI * ( Timer % 21 ) / 20 ))
IfCondition=(Abs(MeasureTimer)<0.01)

[MeasureTimerLeft]
Measure=Calc
Formula=( Clamp (( #Start# * MeasureTimer ), -1, 0 ))
DynamicVariables=1
Group=Timers

[MeasureTimerRight]
Measure=Calc
Formula=( Clamp (( #Start# * MeasureTimer ), 0, 1 ))
DynamicVariables=1
Group=Timers

[MeterLeft]
Meter=Image
X=((#Width#-5*[MeterLeft:W]-4*((#Width#<250)?-2:((#Width#<450)?-3:-4)))/2)
Y=(-6*#Width#/100)
W=(#Width#/12)
PreserveAspectRatio=1
TransformationMatrix=(Cos([MeasureTimerLeft]*PI/8));(-(Sin([MeasureTimerLeft]*PI/8)));(Sin([MeasureTimerLeft]*PI/8));(Cos([MeasureTimerLeft]*PI/8));(([MeterLeft:X]+([MeterLeft:W]/2))-([MeterLeft:X]+([MeterLeft:W]/2))*Cos([MeasureTimerLeft]*PI/8)-(0.022*#Width#)*Sin([MeasureTimerLeft]*PI/8));((0.022*#Width#)+([MeterLeft:X]+([MeterLeft:W]/2))*Sin([MeasureTimerLeft]*PI/8)-(0.022*#Width#)*Cos([MeasureTimerLeft]*PI/8))
LeftMouseUpAction=[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "0"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]
DynamicVariables=1
Group=Balls

[MeterLeft2]
Meter=Image
X=((#Width#<250)?-2:((#Width#<450)?-3:-4))R
Y=0r
W=[MeterLeft:W]
PreserveAspectRatio=1
TransformationMatrix=((#Balls#>=1)?(Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)):1);(-(#Balls#>=1)*(Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)));((#Balls#>=1)*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8));((#Balls#>=1)?(Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)):1);((#Balls#>=1)*(([MeterLeft2:X]+([MeterLeft2:W]/2))-([MeterLeft2:X]+([MeterLeft2:W]/2))*Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)));((#Balls#>=1)*((0.022*#Width#)+([MeterLeft2:X]+([MeterLeft2:W]/2))*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)))
LeftMouseUpAction=[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "1"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]
DynamicVariables=1
Group=Balls

[MeterCenter]
Meter=Image
Imagename=#@#Balls\Colon.png
X=((#Width#<250)?-2:((#Width#<450)?-3:-4))R
Y=0r
W=[MeterLeft:W]
PreserveAspectRatio=1
TransformationMatrix=((#Balls#>=2)?(Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)):1);(-(#Balls#>=2)*(Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)));((#Balls#>=2)*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8));((#Balls#>=2)?(Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)):1);((#Balls#>=2)*(([MeterCenter:X]+([MeterCenter:W]/2))-([MeterCenter:X]+([MeterCenter:W]/2))*Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)));((#Balls#>=2)*((0.022*#Width#)+([MeterCenter:X]+([MeterCenter:W]/2))*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)))
LeftMouseUpAction=[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "2"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]
DynamicVariables=1
Group=Balls

[MeterRight2]
Meter=Image
X=((#Width#<250)?-2:((#Width#<450)?-3:-4))R
Y=0r
W=[MeterLeft:W]
PreserveAspectRatio=1
TransformationMatrix=((#Balls#>=1)?(Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)):1);(-(#Balls#>=1)*(Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)));((#Balls#>=1)*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8));((#Balls#>=1)?(Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)):1);((#Balls#>=1)*(([MeterRight2:X]+([MeterRight2:W]/2))-([MeterRight2:X]+([MeterRight2:W]/2))*Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)));((#Balls#>=1)*((0.022*#Width#)+([MeterRight2:X]+([MeterRight2:W]/2))*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)))
LeftMouseUpAction=[!SetVariable Start "-1"][!SetVariable Stop "0"][!SetVariable Balls "3"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]
DynamicVariables=1
Group=Balls

[MeterRight]
Meter=Image
X=((#Width#<250)?-2:((#Width#<450)?-3:-4))R
Y=0r
W=[MeterLeft:W]
PreserveAspectRatio=1
TransformationMatrix=(Cos([MeasureTimerRight]*PI/8));(-(Sin([MeasureTimerRight]*PI/8)));(Sin([MeasureTimerRight]*PI/8));(Cos([MeasureTimerRight]*PI/8));(([MeterRight:X]+([MeterRight:W]/2))-([MeterRight:X]+([MeterRight:W]/2))*Cos([MeasureTimerRight]*PI/8)-(0.022*#Width#)*Sin([MeasureTimerRight]*PI/8));((0.022*#Width#)+([MeterRight:X]+([MeterRight:W]/2))*Sin([MeasureTimerRight]*PI/8)-(0.022*#Width#)*Cos([MeasureTimerRight]*PI/8))
LeftMouseUpAction=[!SetVariable Start "1"][!SetVariable Stop "0"][!SetVariable Balls "0"][!UpdateMeasureGroup "Timers"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"][!UpdateMeterGroup "Balls"]
DynamicVariables=1
Group=Balls

[MeterLeftTimeDigit]
Meter=String
MeasureName=MeasureTime1Digit
MeterStyle=TimeDigitStyle
X=([MeterLeft:X]+[MeterLeft:W]/2-1)
Y=([MeterLeft:Y]+[MeterLeft:H]-[MeterLeft:W]/2-2)
TransformationMatrix=(Cos([MeasureTimerLeft]*PI/8));(-(Sin([MeasureTimerLeft]*PI/8)));(Sin([MeasureTimerLeft]*PI/8));(Cos([MeasureTimerLeft]*PI/8));(([MeterLeft:X]+([MeterLeft:W]/2))-([MeterLeft:X]+([MeterLeft:W]/2))*Cos([MeasureTimerLeft]*PI/8)-(0.022*#Width#)*Sin([MeasureTimerLeft]*PI/8));((0.022*#Width#)+([MeterLeft:X]+([MeterLeft:W]/2))*Sin([MeasureTimerLeft]*PI/8)-(0.022*#Width#)*Cos([MeasureTimerLeft]*PI/8))
DynamicVariables=1
Hidden=1
Group=Balls | TimeDigits

[MeterLeft2TimeDigit]
Meter=String
MeasureName=MeasureTime2Digit
MeterStyle=TimeDigitStyle
X=([MeterLeft2:X]+[MeterLeft2:W]/2-1)
Y=0r
TransformationMatrix=((#Balls#>=1)?(Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)):1);(-(#Balls#>=1)*(Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)));((#Balls#>=1)*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8));((#Balls#>=1)?(Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)):1);((#Balls#>=1)*(([MeterLeft2:X]+([MeterLeft2:W]/2))-([MeterLeft2:X]+([MeterLeft2:W]/2))*Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)));((#Balls#>=1)*((0.022*#Width#)+([MeterLeft2:X]+([MeterLeft2:W]/2))*Sin(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*PI/8)))
DynamicVariables=1
Hidden=1
Group=Balls | TimeDigits

[MeterCenterTimeDigit]
Meter=String
MeasureName=MeasureTime3Digit
MeterStyle=TimeDigitStyle
X=([MeterCenter:X]+[MeterCenter:W]/2-1)
Y=0r
TransformationMatrix=((#Balls#>=2)?(Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)):1);(-(#Balls#>=2)*(Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)));((#Balls#>=2)*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8));((#Balls#>=2)?(Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)):1);((#Balls#>=2)*(([MeterCenter:X]+([MeterCenter:W]/2))-([MeterCenter:X]+([MeterCenter:W]/2))*Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)));((#Balls#>=2)*((0.022*#Width#)+([MeterCenter:X]+([MeterCenter:W]/2))*Sin(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerLeft]+[MeasureTimerRight])*PI/8)))
DynamicVariables=1
Hidden=1
Group=Balls | TimeDigits

[MeterRight2TimeDigit]
Meter=String
MeasureName=MeasureTime4Digit
MeterStyle=TimeDigitStyle
X=([MeterRight2:X]+[MeterRight2:W]/2-1)
Y=0r
TransformationMatrix=((#Balls#>=1)?(Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)):1);(-(#Balls#>=1)*(Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)));((#Balls#>=1)*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8));((#Balls#>=1)?(Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)):1);((#Balls#>=1)*(([MeterRight2:X]+([MeterRight2:W]/2))-([MeterRight2:X]+([MeterRight2:W]/2))*Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)-(0.022*#Width#)*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)));((#Balls#>=1)*((0.022*#Width#)+([MeterRight2:X]+([MeterRight2:W]/2))*Sin(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)-(0.022*#Width#)*Cos(([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*PI/8)))
DynamicVariables=1
Hidden=1
Group=Balls | TimeDigits

[MeterRightTimeDigit]
Meter=String
MeasureName=MeasureTime5Digit
MeterStyle=TimeDigitStyle
X=([MeterRight:X]+[MeterRight:W]/2-1)
Y=0r
TransformationMatrix=(Cos([MeasureTimerRight]*PI/8));(-(Sin([MeasureTimerRight]*PI/8)));(Sin([MeasureTimerRight]*PI/8));(Cos([MeasureTimerRight]*PI/8));(([MeterRight:X]+([MeterRight:W]/2))-([MeterRight:X]+([MeterRight:W]/2))*Cos([MeasureTimerRight]*PI/8)-(0.022*#Width#)*Sin([MeasureTimerRight]*PI/8));((0.022*#Width#)+([MeterRight:X]+([MeterRight:W]/2))*Sin([MeasureTimerRight]*PI/8)-(0.022*#Width#)*Cos([MeasureTimerRight]*PI/8))
DynamicVariables=1
Hidden=1
Group=Balls | TimeDigits

[MeterUpperBar]
Meter=Image
ImageName=#@#Deck.png
X=0
Y=0
W=#Width#
PreserveAspectRatio=1
Hidden=0

[MeterBallShadowLeft]
Meter=Image
ImageName=#@#Ball-shadow.png
X=([MeterLeft:X]-2*(#Width#>250)+0.12*#Width#*[MeasureTimerLeft])
Y=(0.394*#Width#)
W=(#Width#/11)
PreserveAspectRatio=1
DynamicVariables=1
Group=Shadow

[MeterBallShadowLeft2]
Meter=Image
ImageName=#@#Ball-shadow.png
X=([MeterLeft2:X]-2*(#Width#>250)+0.12*#Width#*([MeasureTimerLeft]+(#Balls#>=3)*[MeasureTimerRight])*(#Balls#>=1))
Y=0r
W=[MeterBallShadowLeft:W]
PreserveAspectRatio=1
DynamicVariables=1
Group=Shadow

[MeterBallShadowCenter]
Meter=Image
ImageName=#@#Ball-shadow.png
X=([MeterCenter:X]-2*(#Width#>250)+0.12*#Width#*([MeasureTimerLeft]+[MeasureTimerRight])*(#Balls#>=2))
Y=0r
W=[MeterBallShadowLeft:W]
PreserveAspectRatio=1
DynamicVariables=1
Group=Shadow

[MeterBallShadowRight2]
Meter=Image
ImageName=#@#Ball-shadow.png
X=([MeterRight2:X]-2*(#Width#>250)+0.12*#Width#*([MeasureTimerRight]+(#Balls#>=3)*[MeasureTimerLeft])*(#Balls#>=1))
Y=0r
W=[MeterBallShadowLeft:W]
PreserveAspectRatio=1
DynamicVariables=1
Group=Shadow

[MeterBallShadowRight]
Meter=Image
ImageName=#@#Ball-shadow.png
X=([MeterRight:X]-2*(#Width#>250)+0.12*#Width#*[MeasureTimerRight])
Y=0r
W=[MeterBallShadowLeft:W]
PreserveAspectRatio=1
DynamicVariables=1
Group=Shadow

[MeterShowHideDateTime]
MeasureName=MeasureDate
MeasureName2=MeasureTime
Meter=STRING
MeterStyle=DateTimeStyle
FontColor=0,0,0,1
SolidColor=0,0,0,1
LeftMouseUpAction=[!SetVariable TimeOnBalls "(1-#TimeOnBalls#)"][!UpdateMeasure "MeasureTimeOnBalls"]

[MeterDateTime]
MeasureName=MeasureDate
MeasureName2=MeasureTime
Meter=STRING
MeterStyle=DateTimeStyle
FontColor=0,0,0
SolidColor=180,180,180,180
BevelType=1

[MeterSettingsButton]
Meter=STRING
X=(#Width#/15)
Y=(0.47*#Width#)
H=(#Width#/10)
W=(#Width#/20)
StringEffect=Border
FontSize=(#Width#/20)
FontFace=ToolTime
FontColor=255,255,255
SolidColor=199,80,80,1
StringAlign=CENTERCENTER
AntiAlias=1
Text=C
TransformationMatrix=(Cos(PI/2));(-Sin(PI/2));(Sin(PI/2));(Cos(PI/2));((#Width#/15)-(#Width#/15)*Cos(PI/2)-(0.47*#Width#*Sin(PI/2)));((0.47*#Width#)+(#Width#/15)*Sin(PI/2)-(0.47*#Width#*Cos(PI/2)))
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "229,229,229,120"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "199,80,80,1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseDownAction=[!SetOption #CURRENTSECTION# X "(#Width#/15-1)"][!SetOption #CURRENTSECTION# Y "(0.47*#Width#+1)"][!SetOption #CURRENTSECTION# SolidColor "229,229,229,200"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!ActivateConfig "#CURRENTCONFIG#" "Settings.ini"][!SetOption #CURRENTSECTION# X "(#Width#/15)"][!SetOption #CURRENTSECTION# Y "(0.47*#Width#)"][!SetOption #CURRENTSECTION# SolidColor "229,229,229,120"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Group=Buttons
Hidden=1

[MeterStopButton]
Meter=STRING
X=(3+#Width#/6)
Y=(0.47*#Width#)
W=(#Width#/10)
H=(#Width#/20)
StringEffect=Border
FontSize=(#Width#/37.5)
FontFace=Wingdings
FontColor=255,255,255
SolidColor=199,80,80,1
StringAlign=CENTERCENTER
AntiAlias=1
Text=n
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "229,229,229,120"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "199,80,80,1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseDownAction=[!SetOption #CURRENTSECTION# X "(4+#Width#/6)"][!SetOption #CURRENTSECTION# Y "(0.47*#Width#+1)"][!SetOption #CURRENTSECTION# SolidColor "229,229,229,200"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetOption #CURRENTSECTION# X "(3+#Width#/6)"][!SetOption #CURRENTSECTION# Y "(0.47*#Width#)"][!SetOption #CURRENTSECTION# SolidColor "229,229,229,120"][!SetVariable Stop "1"][!UpdateMeasure "Timer"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
Group=Buttons
DynamicVariables=1
Hidden=(1-#ShowStop#*#ShowStop2#)
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Pendulum (Newton's cradle)

Post by qwerky »

balala wrote: March 19th, 2019, 9:08 pm Added this option as well. I don't pack again the whole config, since one single measure ([MeasureTimeOnBalls]) is updated into the Pendulum.ini file. When I'll finish the whole work (updating the Settings.ini as well), I'll realize a new installer, with all needed details. But test this update as well, if you're interested and let me know your opinion.
So, the new code of Pendulum.ini is posted below. Replace the old code with this one:
Yes, tested all the balls and it looks very good. The shadows add a nice touch. Well done. :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

qwerky wrote: March 19th, 2019, 9:33 pm Yes, tested all the balls and it looks very good. The shadows add a nice touch. Well done. :thumbup:
Thank you...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Pendulum (Newton's cradle)

Post by balala »

The greatest disadvantage of both previous versions of this skin, is the low Update (set to 100), which made the skin to use a lot of resources, to make all needed calculations ten times per second. I rewrote a lot of things, to make the skin to use an ActionTimer plugin measure, to update the skin often only while needed. Here is the result.
I also added a few new features and rewrote the Settings.ini accordingly, to can use and set up all new features.
Please let me know what you think. Thanks.
You do not have the required permissions to view the files attached to this post.