You're welcome.
It is currently November 29th, 2022, 10:27 am
Visions+ by Sgt. E. V. McKay (Updated)

 Rainmeter Sage
 Posts: 14744
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania

 Rainmeter Sage
 Posts: 4817
 Joined: February 27th, 2015, 2:38 pm
 Location: Terra Yincognita
Re: Visions+ by Sgt. E. V. McKay (Updated)
You're right, just got the chance to test it out and it worked without problems. I multiplied the scaling matrix with the rotation/skewing matrix (in this order), so in a hypothetical case that such a global scaling TM would be implemented at skin level, all it has to be done is to multiply the skin level TM with whatever local level TM a meter has. The problem is, of course, that the TM drawbacks regarding coordinates would still be present, unless the devs can figure a way to circumvent that (similar to how transformations are applied to Shape meters, for example).
For the record, assuming the normal {scale x};{skew y};{skew x};{scale y};{move x};{move y} form of a TM, used for the 1st transformation aka scaling, and a 2nd TM used for the 2nd transformation aka the rotation  where I replaced "scale" with "zoom" in order for stuff to fit nicely under each other and replaced "x" with "a" and "y" with "b" for the 2nd matrix, the multiplication is as follows (the matrices are written column after column in Rainmeter, obviously excluding the 3rd "0 0 1" row):
Code: Select all
 zoomx skewx movex   zooma skewa movea   zoomx*zooma+skewx*skewb+movex*0 zoomx*skewa+skewx*zoomb+movex*0 zoomx*movea+skewx*moveb+movex*1 
 skewy zoomy movey  x  skewb zoomb moveb  =  skewy*zooma+zoomy*skewb+movey*0 skewy*skewa+zoomy*zoomb+movey*0 skewy*movea+zoomy*moveb+movey*1 
 0 0 1   0 0 1   0*zooma+ 0*skewb+ 1*0 0*skewa+ 0*zoomb+ 1*0 0*movea+ 0*moveb+ 1*1 
P.S. Slightly off topic, but did anyone write a matrix multiplication skin for Rainmeter? Naturally, the vast majority of skin develpers and users don't use TMs, but it's kind of lame to have to manually multiply the above elements when a matrix multiplication skin could do it in an instant and yield the final formulas as strings, according to the two matrices' values, with the only thing the skin developer / user would need to do to be zeroing out or canceling out possible operands.

 Rainmeter Sage
 Posts: 14744
 Joined: October 11th, 2010, 6:27 pm
 Location: Gheorgheni, Romania
Re: Visions+ by Sgt. E. V. McKay (Updated)
I'm glad if you succeeded, but not sure I understand what you mean by "the skin level TM" and what by "whatever local level TM". What do you mean?Yincognito wrote: ↑July 9th, 2021, 8:11 pm You're right, just got the chance to test it out and it worked without problems. I multiplied the scaling matrix with the rotation/skewing matrix (in this order), so in a hypothetical case that such a global scaling TM would be implemented at skin level, all it has to be done is to multiply the skin level TM with whatever local level TM a meter has. The problem is, of course, that the TM drawbacks regarding coordinates would still be present, unless the devs can figure a way to circumvent that (similar to how transformations are applied to Shape meters, for example).

 Rainmeter Sage
 Posts: 4817
 Joined: February 27th, 2015, 2:38 pm
 Location: Terra Yincognita
Re: Visions+ by Sgt. E. V. McKay (Updated)
Well, the discussion was lately about how (or if) a "skin level" scaling could be done  see SilverAzide reply here. In that reply, he correctly wondered how would one try to scale a skin that already contains meters with their own Transformation Matrices ("local level TMs", in short). So, my "what if" scenario was what would the devs need to do to make sure the (hypothetical) skin level scaling works for already "locally transformed" meters, assuming both are done using TMs. The anticipated and confirmed answer was: a "simple" matrix multiplication, i.e. SkinLevelTM x LocalLevelTM (basically, scaling x rotation).
So, in hypothetical code:
Code: Select all
...
[Rainmeter]
...
SkinTransformationMatrix=#ScaleX#;0;0;#ScaleY#;0;0
...
...
...
[SomeMeter]
...
TransformationMatrix=SomeMeterTransformationMatrix
...
I hope I was clearer this time.

 Rainmeter Sage
 Posts: 2174
 Joined: March 23rd, 2015, 5:26 pm
Re: Visions+ by Sgt. E. V. McKay (Updated)
This is really great... I would be so nice if the Transformation Matrix Guide had this example in it. The guide discusses how to do everything BUT how to do the actual math needed to multiply two 3x3 matrices together (or, if it's in there somewhere, it's not as clear as in your example).Yincognito wrote: ↑July 9th, 2021, 8:11 pmP.S. Slightly off topic, but did anyone write a matrix multiplication skin for Rainmeter? Naturally, the vast majority of skin develpers and users don't use TMs, but it's kind of lame to have to manually multiply the above elements when a matrix multiplication skin could do it in an instant and yield the final formulas as strings, according to the two matrices' values, with the only thing the skin developer / user would need to do to be zeroing out or canceling out possible operands.Code: Select all
 zoomx skewx movex   zooma skewa movea   zoomx*zooma+skewx*skewb+movex*0 zoomx*skewa+skewx*zoomb+movex*0 zoomx*movea+skewx*moveb+movex*1   skewy zoomy movey  x  skewb zoomb moveb  =  skewy*zooma+zoomy*skewb+movey*0 skewy*skewa+zoomy*zoomb+movey*0 skewy*movea+zoomy*moveb+movey*1   0 0 1   0 0 1   0*zooma+ 0*skewb+ 1*0 0*skewa+ 0*zoomb+ 1*0 0*movea+ 0*moveb+ 1*1 
Based on your pseudocode, I don't see why a Lua function couldn't be created to take two TM strings, multiply them together, and return the result in a RMstyle TM string.

 Rainmeter Sage
 Posts: 4817
 Joined: February 27th, 2015, 2:38 pm
 Location: Terra Yincognita
Re: Visions+ by Sgt. E. V. McKay (Updated)
Glad you like it, but, well, it's just a matrix multiplication, no big deal  summing up the products between the elements from the 1st matrix' rows and the 2nd matrix columns  though this can very easily get complicated. Yeah, the manual talks about the multiplication of the TM matrix, but mainly in the context of multiplying it with point coordinates, and only briefly about what (or how) to do to get more transformations on top of each other. Now, if one reads the guide closely, he can probably get hints about how things work or should be done (I only discovered this now, but it's there, hidden in a ton of info in the guide  had I known about this, I wouldn't have done the above manually since it apparently works with bare strings, though it was a nice exercise), but I agree that a standard example, applied to Rainmeter's context, is clearer.SilverAzide wrote: ↑July 9th, 2021, 9:50 pmThis is really great... I would be so nice if the Transformation Matrix Guide had this example in it. The guide discusses how to do everything BUT how to do the actual math needed to multiply two 3x3 matrices together (or, if it's in there somewhere, it's not as clear as in your example).
My thought as well, it's as simple as a couple of FOR loops, but I was thinking more of a general matrix multiplicator, not necessarily restricted to a transformation matrix. Remember, there are also color matrices, that work roughly the same way, yet with different number of elements...SilverAzide wrote: ↑July 9th, 2021, 9:50 pmBased on your pseudocode, I don't see why a Lua function couldn't be created to take two TM strings, multiply them together, and return the result in a RMstyle TM string.

 Rainmeter Sage
 Posts: 4879
 Joined: April 12th, 2012, 9:40 pm
 Location: Cedar Point, Ohio, USA
Re: Visions+ by Sgt. E. V. McKay (Updated)
Are we entering the TransformationMatrix?
Just follow the white rabbit...
Just follow the white rabbit...
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::

 Developer
 Posts: 22551
 Joined: April 19th, 2009, 11:02 pm
 Location: Fort Hunt, Virginia, USA
Re: Visions+ by Sgt. E. V. McKay (Updated)
Any technology where I need to care if the cat in the box is alive or dead is one I stay away from...eclectictech wrote: ↑July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Just follow the white rabbit...

 Rainmeter Sage
 Posts: 4879
 Joined: April 12th, 2012, 9:40 pm
 Location: Cedar Point, Ohio, USA
Re: Visions+ by Sgt. E. V. McKay (Updated)
This thread has been permanently hijacked for use as a discussion on scaling... go for it! 
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::

 Rainmeter Sage
 Posts: 4817
 Joined: February 27th, 2015, 2:38 pm
 Location: Terra Yincognita
Re: Visions+ by Sgt. E. V. McKay (Updated)
eclectictech wrote: ↑July 9th, 2021, 10:58 pm Are we entering the TransformationMatrix?
Just follow the white rabbit...
I guess I took the red pill, ate the rabbit and resurrected the cat instead  entered The Matrix only to trigger The Walking Dead...
P.S. Very nice skin(s), by the way, eclectictech. I would have probably noticed them if not for the captivating exchange between balala and SilverAzide on those little matrices.