Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PieSlice
#15
(10-13-2024, 05:32 PM)SMcNeill Wrote:
(10-13-2024, 04:34 PM)bplus Wrote: Yep! I definitely like Steve's coding method for PieSlice.

It is very easy to adapt to different Compass Systems, here is my CW version to Steve's CCW

Usually, it shouldn't be too hard to ever adapt various compass systems. At the heart of the day, they're all basically just rotated or mirrored in some form. Like with the Atan function I shared, unless you're doing something *really* weird, in the end, you should be able to convert and toggle from one to the other without too much trouble. Just rotate/invert your angles until they fit the coordinate system you're using. After all, at the end of a day, a circle is still a circle, no matter how you plot it. Wink

(10-13-2024, 05:14 PM)CharlieJV Wrote: For whatever strange reason, I'm enjoying this thread of discussion.

The Wikipedia article on radians makes for a nice related reading.

Myself, I'm much too accustomed to 0 degrees is east, 90 degrees is north (matching the way radians work: counter clockwise) to change my way of thinking.

I'm with you @CharlieJV 

It's the way we were taught to read and use angles in school, and it'll probably always be the way my brain will default when thinking of any angle.  It's why I wrote this little pieslice routine the way I did -- it works with the coordinates as you've described them.  

I'm glad to see I'm not the only person in the world who was taught to think in that direction.  Big Grin

The Fundemental difference between the math graphs we were taught in school and Basic Screens coordinate system (x, y) point locations is:

The values on the Y axis increase going down screen in Basic coordinates whereas in Math class the Y axis ascended in value going up.

This is the reason Radians or Degrees go Counter Clockwise in math class and go Clockwise in Basic screens (and as _ATan2 works in Basic without monkey business Smile ).

This is the Quadrant System of a Math Graph:
   

In Basic because the Y axis increases in values going down, the Basic screen is all Quadrant 1, both x and y are positive. If we were to continue labeling Quadrants they would go Clockwise (CW) around because Y increases going down screen.
So Quadrant 2 would left of Quadrant 1, where all x's are neg and all y's are positive.
going CW, Quardrant 3 is above 2 because y's are negative and x's are negative
going CW, Quadrant 4 is to right of 3 above 1 because all x's are positive and all y's are negative.

Q3(-,-) Q4(+,-)
Q2(-,+) Q1(+,+) = Basic screen
The Quadrants go CW

also in math all x stuff is associated with Cos and all y stuff with Sin that still holds with the Y axis flipped on Basic screen.
This is why a vector x component should be calculated with Cos and y component with Sin.
b = b + ...
Reply


Messages In This Thread
PieSlice - by SMcNeill - 10-12-2024, 09:07 PM
RE: PieSlice - by bplus - 10-12-2024, 09:22 PM
RE: PieSlice - by bplus - 10-13-2024, 01:16 AM
RE: PieSlice - by bplus - 10-13-2024, 02:53 AM
RE: PieSlice - by SMcNeill - 10-13-2024, 03:06 AM
RE: PieSlice - by vince - 10-13-2024, 03:09 AM
RE: PieSlice - by bplus - 10-13-2024, 03:11 AM
RE: PieSlice - by SMcNeill - 10-13-2024, 03:28 AM
RE: PieSlice - by SMcNeill - 10-13-2024, 03:12 AM
RE: PieSlice - by bplus - 10-13-2024, 03:16 AM
RE: PieSlice - by bplus - 10-13-2024, 04:34 PM
RE: PieSlice - by SMcNeill - 10-13-2024, 05:32 PM
RE: PieSlice - by CharlieJV - 10-13-2024, 05:14 PM
RE: PieSlice - by Pete - 10-13-2024, 07:57 PM
RE: PieSlice - by bplus - 10-14-2024, 08:27 AM



Users browsing this thread: 5 Guest(s)