It is currently October 19th, 2020, 9:13 pm

Rotate a shape around a specific point

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rotate a shape around a specific point

Post by Yincognito »

balala wrote: October 9th, 2020, 6:16 pm Yep, I do use it. But when I disabled it (just for a try) the planets have disapeared, so for me I only can see them if I have HA on.
Yes, this is a "feature" of Hardware Acceleration implementation in Rainmeter, it has nothing to do with a particular skin or another. It happened to me as well, for entirely different skins, with no relation to this one.
balala wrote: October 9th, 2020, 6:16 pm No, it's not normal at all in my opinion. The parameters should have such values for the planets to them be easily seen. There is no need (and in fact it's even impossible) to have the planets scaled. They have to be much larger than "normal" to can be seen and this would be required in order to have a usable skin - sorry, but this is my opinion.
Actually, it is possible to have both the planets and the distances scaled, it's just that it's not comfortable for the user because things become too small to be seen. The main purpose of designing this skin is to display things accurately, it was not meant to be a "nice" skin with a few circles having the wrong sizes, positions or orbits and rotating in the wrong directions (like the GIF that the OP's attached in his initial post in this thread), because the latter is trivial to do. Having said that, a skin where things are easily seen is a legitimate and correct concern, this is why I already included in the skin code a commented section with the values the user can set on various factors in the code in order to have nice and visible bodies being displayed:

Code: Select all

; --------------------------------------------------------------------------------------------------------------------------------------
; Alternative factors for larger view - radiuses to scale, distances not to scale (they can be set by scrolling over them in the panel):
; Solar System Zoom = 0.000001 | Body Radiuses = 40 | Body Distances (Sun to Pluto) = 1, 0.9, 0.7, 0.6, 0.5, 0.2, 0.15, 0.09, 0.07, 0.07
; --------------------------------------------------------------------------------------------------------------------------------------
I actually thought about making this "factor switch" automatic on some click somewhere in the skin, but decided against it, as it is really easy to modify them either by changing those factors in the code or scrolling things in the top right corner texts. Maybe I'll add this feature later on, if really needed, but for now I spent quite a bit of time on this skin and working again on it is not an urgent priority (I'm sure you get what I mean, sometimes one needs dealing with new stuff after a bit of time spent doing a certain task). Again, this is really easy to set already, I don't think that editing a few lines in the code or scrolling a little bit to get to the desired values is that hard, especially considering that the values are already identified and written there under the user's nose, so to speak - please correct me if I'm wrong. :confused:
balala wrote: October 9th, 2020, 6:16 pm Unfortunately I don't get a good result: I tried modifying the Radius of a planet (for instance Earth's) and for this I modified first the Amount for Earth's Radius to 1. Then I scrolled the Radius up to 10, or even higher, but the Earth is still not properly visible. Am I missing something?
Yes, you probably are: just how big the solar system distances are and how small every celestial body (including the huge Sun, not to mention the Earth) is compared to those distances. Try first setting the Solar System's Zoom to 0.000007 and then setting Earth's Radius factor to 40 and you'll barely get a 2px radius Earth. That's how small we all are (less than ants on a cosmic scale), and it's difficult to realize this when living on Earth and not checking out the scales that are common in the Universe. Obviously, a bigger zoom factor and a bigger radius factor are going to make Earth bigger as well. Jupiter would be more suited for easier visibility, since it's WAY bigger than Earth is (yet still tiny compared to the Sun).
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rotate a shape around a specific point

Post by balala »

Yincognito wrote: October 9th, 2020, 7:18 pm Actually, it is possible to have both the planets and the distances scaled, it's just that it's not comfortable for the user because things become too small to be seen. The main purpose of designing this skin is to display things accurately, it was not meant to be a "nice" skin with a few circles having the wrong sizes,
Yep, however I still believe the planets should have decent radiuses to can be seen, even if these radiuses are not scaled properly. But finally you being the author, it's completely up to you.
Yincognito wrote: October 9th, 2020, 7:18 pm it was not meant to be a "nice" skin with a few circles having the wrong sizes, positions or orbits and rotating in the wrong directions (like the GIF that the OP's attached in his initial post in this thread)
Oupsss. Didn't realize that GIF is wrong, but it definitely is.
Yincognito wrote: October 9th, 2020, 7:18 pm Yes, you probably are: just how big the solar system distances are and how small every celestial body (including the huge Sun, not to mention the Earth) is compared to those distances. Try first setting the Solar System's Zoom to 0.000007 and then setting Earth's Radius factor to 40 and you'll barely get a 2px radius Earth. That's how small we all are (less than ants on a cosmic scale), and it's difficult to realize this when living on Earth and not checking out the scales that are common in the Universe. Obviously, a bigger zoom factor and a bigger radius factor are going to make Earth bigger as well. Jupiter would be more suited for easier visibility, since it's WAY bigger than Earth is (yet still tiny compared to the Sun).
As I said more times previously, the sizes of planets should not be scaled, they should be bigger than scaled to the appropriate factor, because if you scale their sizes, they become "invisible" (too small), as in this case for instance. But again: it's finally up to you...
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rotate a shape around a specific point

Post by Yincognito »

balala wrote: October 9th, 2020, 7:51 pm Yep, however I still believe the planets should have decent radiuses to can be seen, even if these radiuses are not scaled properly. But finally you being the author, it's completely up to you.

Oupsss. Didn't realize that GIF is wrong, but it definitely is.

As I said more times previously, the sizes of planets should not be scaled, they should be bigger than scaled to the appropriate factor, because if you scale their sizes, they become "invisible" (too small), as in this case for instance. But again: it's finally up to you...
Done - add these 2 lines at the end of [FactorText] meter:

Code: Select all

LeftMouseUpAction=[!SetVariable ZoomFactorSolar System "0.0000000700"][!SetVariable RadiusFactorSun "1"][!SetVariable RadiusFactorMercury "1"][!SetVariable RadiusFactorVenus "1"][!SetVariable RadiusFactorEarth "1"][!SetVariable RadiusFactorMars "1"][!SetVariable RadiusFactorJupiter "1"][!SetVariable RadiusFactorSaturn "1"][!SetVariable RadiusFactorUranus "1"][!SetVariable RadiusFactorNeptune "1"][!SetVariable RadiusFactorPluto "1"][!SetVariable DistanceFactorSun "0"][!SetVariable DistanceFactorMercury "1"][!SetVariable DistanceFactorVenus "1"][!SetVariable DistanceFactorEarth "1"][!SetVariable DistanceFactorMars "1"][!SetVariable DistanceFactorJupiter "1"][!SetVariable DistanceFactorSaturn "1"][!SetVariable DistanceFactorUranus "1"][!SetVariable DistanceFactorNeptune "1"][!SetVariable DistanceFactorPluto "1"][!SetVariable ChangeIndex 2][!UpdateMeasureGroup ListsGroup][!UpdateMeter *][!Redraw]
MiddleMouseUpAction=[!SetVariable ZoomFactorSolar System "0.0000010000"][!SetVariable RadiusFactorSun "40"][!SetVariable RadiusFactorMercury "40"][!SetVariable RadiusFactorVenus "40"][!SetVariable RadiusFactorEarth "40"][!SetVariable RadiusFactorMars "40"][!SetVariable RadiusFactorJupiter "40"][!SetVariable RadiusFactorSaturn "40"][!SetVariable RadiusFactorUranus "40"][!SetVariable RadiusFactorNeptune "40"][!SetVariable RadiusFactorPluto "40"][!SetVariable DistanceFactorSun "0"][!SetVariable DistanceFactorMercury "0.9"][!SetVariable DistanceFactorVenus "0.7"][!SetVariable DistanceFactorEarth "0.6"][!SetVariable DistanceFactorMars "0.5"][!SetVariable DistanceFactorJupiter "0.2"][!SetVariable DistanceFactorSaturn "0.15"][!SetVariable DistanceFactorUranus "0.09"][!SetVariable DistanceFactorNeptune "0.07"][!SetVariable DistanceFactorPluto "0.07"][!SetVariable ChangeIndex 4][!UpdateMeasureGroup ListsGroup][!UpdateMeter *][!Redraw]
These will "reset" to the initial unary factors on left click and set to the larger factors that I mentioned in my previous reply on middle click (those clicks should be on the 'Factor' line in the top right corner of the skin). What do you think? Is it ok now?
Larger Factors.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rotate a shape around a specific point

Post by balala »

Yincognito wrote: October 9th, 2020, 8:33 pm These will "reset" to the initial unary factors on left click and set to the larger factors that I mentioned in my previous reply on middle click. What do you think? Is it ok now?
Not sure. When I middle click I get too small radius for the orbits of the planets, definitely not as you posted your screenshot.
SS.png
Is this what you wanted to achieve?
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rotate a shape around a specific point

Post by Yincognito »

balala wrote: October 9th, 2020, 8:44 pm Not sure. When I middle click I get too small radius for the orbits of the planets, definitely not as you posted your screenshot.
SS.png
Is this what you wanted to achieve?
No, it is not what I wanted to achieve, but I know why it happens: the forum software (or the browser itself) converts the ALT+255 character (which is not an ALT+32 "normal" space character) to a regular space character. The "space" in the ZoomFactorSolar System variable name is an ALT+255 space, aka an [\x00A0] character reference variable. Just replace ZoomFactorSolar System in those 2 lines with ZoomFactorSolar[\x00A0]System (or even better, replace the regular space in that name by pressing ALT+255 on your keyboard's numerical keypad) at it will work just fine.

I chose to use the ALT+255 space so that I could easily use the nested variable names as actual values, without having to create additional code to handle this.
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rotate a shape around a specific point

Post by balala »

Yincognito wrote: October 9th, 2020, 9:06 pm No, it is not what I wanted to achieve, but I know why it happens: the forum software (or the browser itself) converts the ALT+255 character (which is not an ALT+32 "normal" space character) to a regular space character. The "space" in the ZoomFactorSolar System variable name is an ALT+255 space, aka an [\x00A0] character reference variable. Just replace ZoomFactorSolar System in those 2 lines with ZoomFactorSolar[\x00A0]System (or even better, replace the regular space in that name by pressing ALT+255 on your keyboard's numerical keypad) at it will work just fine.

I chose to use the ALT+255 space so that I could easily use the nested variable names as actual values, without having to create additional code to handle this.
Right, now it look very good indeed and works properly :thumbup: .
Thanks for this wonderful skin and congratulations once again for the effort of creating it. :rosegift:
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rotate a shape around a specific point

Post by Yincognito »

balala wrote: October 10th, 2020, 10:22 am Right, now it look very good indeed and works properly :thumbup: .
Thanks for this wonderful skin and congratulations once again for the effort of creating it. :rosegift:
Thanks again - glad you like it now. As I said, it was trivial to add such a feature (which can obviously be adjusted, if necessary), I probably should have added it when I thought about it earlier, instead of deciding against it. Thanks for convincing me of the contrary - much appreciated. :great:
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rotate a shape around a specific point

Post by balala »

Yincognito wrote: October 10th, 2020, 12:18 pm Thanks for convincing me of the contrary - much appreciated. :great:
No, no, I don't want to convince anyone about nothing. You being the author of this skin, is entirely up to you how do you make it.
User avatar
Yincognito
Posts: 2760
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rotate a shape around a specific point

Post by Yincognito »

balala wrote: October 10th, 2020, 12:42 pm No, no, I don't want to convince anyone about nothing. You being the author of this skin, is entirely up to you how do you make it.
Too late, you already did, LOL. Not to worry, I like that you say what's on your mind, and naturally any user input is important, even though the author has the last say about the implementation. Even more so when the concern is legitimate and logically correct, as yours was. :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 11575
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rotate a shape around a specific point

Post by balala »

Yincognito wrote: October 10th, 2020, 1:14 pm Too late, you already did, LOL. Not to worry, I like that you say what's on your mind, and naturally any user input is important, even though the author has the last say about the implementation. Even more so when the concern is legitimate and logically correct, as yours was. :thumbup:
Alright and finally yes, all these are true. Additionally I'm glad if you think my concerns were "legitimate and logically correct".