Discuss Scratch
- Champpeace1234
-
4 posts
Unit circle based angle system
The current system of rotating sprites is rather confusing. To the right is 90 degrees, up is 0 degrees, left is -90 degrees, and down is both 180 degrees AND -180 degrees. Needless to say, this makes working with angles very confusing for more people well versed in math who learned it with the unit circle. I propose to add a toggle which would allow for a new system based off of said unit circle concept: to the right is 0/360 degrees, up is 90 degrees, left is 180 degrees, down is 270 degrees. Of course, this would be implemented as an optional toggle, so that the site remains accessible to all.
Extra tips to make implementation easier: If an angle is set to a number above 360, we can do x/360 and subtract the decimal to get how many times we should subtract 360 to put it in an acceptable angle range, thereby allowing it to turn past 360 without causing a major issue. Example: if angle is 724, we divide it by 360 to get 2.011, get rid of the decimal to make it 2, subtract 360(2) from 724 to get a new angle of 4.
To deal with negatives, we can flip the sign to positive, and if the new number above 360 we can follow the previous protocol. Then, subtract that new number from 360 allowing the angle number to roll into the negatives without issue. Example: if angle is -724, we flip the sign to 724, follow the previous protocol to get 4, then we do 360-4 to get 356 and thus the new angle is 356.
Best regards, Champpeace1234
Extra tips to make implementation easier: If an angle is set to a number above 360, we can do x/360 and subtract the decimal to get how many times we should subtract 360 to put it in an acceptable angle range, thereby allowing it to turn past 360 without causing a major issue. Example: if angle is 724, we divide it by 360 to get 2.011, get rid of the decimal to make it 2, subtract 360(2) from 724 to get a new angle of 4.
To deal with negatives, we can flip the sign to positive, and if the new number above 360 we can follow the previous protocol. Then, subtract that new number from 360 allowing the angle number to roll into the negatives without issue. Example: if angle is -724, we flip the sign to 724, follow the previous protocol to get 4, then we do 360-4 to get 356 and thus the new angle is 356.
Best regards, Champpeace1234
- jackson49
-
1000+ posts
Unit circle based angle system
Good idea. By the way, there is a workaround:
define Unit Circle (degrees)Obviously, though, that doesn’t invalidate this suggestion. It’s bizarre that the current system doesn’t use the unit circle.
point in direction (((degrees) * (-1)) + (90))
Last edited by jackson49 (May 15, 2024 00:54:46)
- Za-Chary
-
1000+ posts
Unit circle based angle system
If this were a toggle, I'm trying to think about how this would work for those who are looking to edit someone else's project if their toggle settings are different. I worry this would be confusing and perhaps make projects run in a way that is not intended.
In fact, what will happen if you change the toggle within your own project?
It probably would have been nice to have the system be different from the start (even I can't think of a reason why the angle system is the way it is), but I don't think a toggle is the right solution at this point.
In fact, what will happen if you change the toggle within your own project?
It probably would have been nice to have the system be different from the start (even I can't think of a reason why the angle system is the way it is), but I don't think a toggle is the right solution at this point.
- han614698
-
1000+ posts
Unit circle based angle system
I believe this already works.
I can point the sprite in any number direction and it still works using the system that jackson49 mentioned.
I can point the sprite in any number direction and it still works using the system that jackson49 mentioned.
- Za-Chary
-
1000+ posts
Unit circle based angle system
I think you may be misunderstanding the suggestion. Based on the following quote, there is no way that the proposed system works the same as the current system (either that or I'm misunderstanding your comment): I believe this already works.
I can point the sprite in any number direction and it still works using the system that jackson49 mentioned.
To the right is 90 degrees, up is 0 degrees, […] I propose to add a toggle which would allow for a new system based off of said unit circle concept: to the right is 0/360 degrees, up is 90 degrees,The current system of rotating sprites is rather confusing.
- han614698
-
1000+ posts
Unit circle based angle system
Is there any way you can explain their proposed system in different words? I'm not quite understanding this. How do you rotate up in 2D?I think you may be misunderstanding the suggestion. Based on the following quote, there is no way that the proposed system works the same as the current system (either that or I'm misunderstanding your comment): I believe this already works.
I can point the sprite in any number direction and it still works using the system that jackson49 mentioned.To the right is 90 degrees, up is 0 degrees, […] I propose to add a toggle which would allow for a new system based off of said unit circle concept: to the right is 0/360 degrees, up is 90 degrees,The current system of rotating sprites is rather confusing.
- jackson49
-
1000+ posts
Unit circle based angle system
They’re proposing adding an option to change the current degree system on Scratch from this:Is there any way you can explain their proposed system in different words? I'm not quite understanding this. How do you rotate up in 2D?I think you may be misunderstanding the suggestion. Based on the following quote, there is no way that the proposed system works the same as the current system (either that or I'm misunderstanding your comment): I believe this already works.
I can point the sprite in any number direction and it still works using the system that jackson49 mentioned.To the right is 90 degrees, up is 0 degrees, […] I propose to add a toggle which would allow for a new system based off of said unit circle concept: to the right is 0/360 degrees, up is 90 degrees,The current system of rotating sprites is rather confusing.

to this:

The reason being that the latter placement of degrees (known as the unit circle) is the standard in math. The current Scratch direction system is offset and reversed from it, which could be confusing.
Last edited by jackson49 (May 15, 2024 03:43:10)
- Champpeace1234
-
4 posts
Unit circle based angle system
up in 2D?I mean facing up, as in facing North Is there any way you can explain their proposed system in different words? I'm not quite understanding this. How do you rotate
- endyourenite
-
100+ posts
Unit circle based angle system
Would this actually break projects? because changing the way of angles work (up from 0 degrees to 90 degrees) might actually change the direction incorrectly.
- Champpeace1234
-
4 posts
Unit circle based angle system
I apologize for being out of the loop… What is “bump” supposed to mean?
- TheCreatorOfUnTV
-
1000+ posts
Unit circle based angle system
EDIT: Never mind the message about trigonometry, it already works the same as in math. I still want the angle system for the rotation style to be considered, though. It should work like this:set rotation style [all around v] with angle system [new v] :: motion // Old is the backwards-compatible version, new is this one.Also, this should probably be added for the trigonometry blocks too:([sin v] of (9) @addInput :: operators)
([sin v] of (9) with angle system [old v] @delInput :: operators)
Last edited by TheCreatorOfUnTV (Aug. 14, 2024 01:08:52)
- Za-Chary
-
1000+ posts
Unit circle based angle system
The trigonometry blocks actually work as math usually works. For example, sin(90) = 1, even though a 90º direction of sprites is to the right. So there don't need to be any changes with the trigonometry blocks. Also, this should probably be added for the trigonometry blocks too:([sin v] of (9) @addInput :: operators)
([sin v] of (9) with angle system [old v] @delInput :: operators)
- han614698
-
1000+ posts
Unit circle based angle system
Not sure how I didn't understand this in May 2024 - I was literally in geometry. Anyway this for sure makes sense but I feel like this would completely break many projects and this also wouldn't really be able to be toggleable.
- TheCreatorOfUnTV
-
1000+ posts
Unit circle based angle system
Wait - it does? Edited the post.The trigonometry blocks actually work as math usually works. For example, sin(90) = 1, even though a 90º direction of sprites is to the right. So there don't need to be any changes with the trigonometry blocks. Also, this should probably be added for the trigonometry blocks too:([sin v] of (9) @addInput :: operators)
([sin v] of (9) with angle system [old v] @delInput :: operators)
Last edited by TheCreatorOfUnTV (Aug. 14, 2024 00:57:55)
- Ultracoder1010
-
100+ posts
Unit circle based angle system
Sorry if I’m not understanding your post correctly but if you just made the old system the default then the update wouldn’t break any projects and if Not sure how I didn't understand this in May 2024 - I was literally in geometry. Anyway this for sure makes sense but I feel like this would completely break many projects and this also wouldn't really be able to be toggleable.
Someone got curious they could just change it back and everything would be normal
Last edited by Ultracoder1010 (Aug. 14, 2024 01:12:56)
- Ultracoder1010
-
100+ posts
Unit circle based angle system
A bump is when you post in a forum so it goes to the newest post and gets more attentionI apologize for being out of the loop… What is “bump” supposed to mean?
- jackson49
-
1000+ posts
Unit circle based angle system
Here’s how the Scratch Wiki describes it:I apologize for being out of the loop… What is “bump” supposed to mean?
A bump is a post meant to bring a topic in the Scratch forums to the top of the forum, thus creating more activity on the said topic. A bump is generally performed by posting the text “bump” in the wanted topic. Bring Up My Post is a common acrostic for the word “bump”, or it could simply be used as “Bump my topic to the top”.
- SpyCoderX
-
1000+ posts
Unit circle based angle system
Support!
Using a different system of angles than is normal will confuse scratchers who learned angles in scratch and then have to deal with real world angles.
Scratch’s goal is to keep it simple, but this not simple at all. It’s just an arbitrary (I think) angle system.
Using a different system of angles than is normal will confuse scratchers who learned angles in scratch and then have to deal with real world angles.
Scratch’s goal is to keep it simple, but this not simple at all. It’s just an arbitrary (I think) angle system.