diff --git a/public/usage-examples/geometry/center_point-1-example.txt b/public/usage-examples/geometry/center_point-1-example.txt deleted file mode 100644 index 0e626a369..000000000 --- a/public/usage-examples/geometry/center_point-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Glowing Circle \ No newline at end of file diff --git a/public/usage-examples/geometry/center_point-1-example-oop.cs b/public/usage-examples/geometry/center_point/center_point-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/center_point-1-example-oop.cs rename to public/usage-examples/geometry/center_point/center_point-1-example-oop.cs index 5c512379a..377426563 100644 --- a/public/usage-examples/geometry/center_point-1-example-oop.cs +++ b/public/usage-examples/geometry/center_point/center_point-1-example-oop.cs @@ -31,4 +31,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/center_point-1-example-top-level.cs b/public/usage-examples/geometry/center_point/center_point-1-example-top-level.cs similarity index 96% rename from public/usage-examples/geometry/center_point-1-example-top-level.cs rename to public/usage-examples/geometry/center_point/center_point-1-example-top-level.cs index 74e3fc931..b78b6ad62 100644 --- a/public/usage-examples/geometry/center_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/center_point/center_point-1-example-top-level.cs @@ -23,4 +23,4 @@ } RefreshScreen(); } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/center_point-1-example.cpp b/public/usage-examples/geometry/center_point/center_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/center_point-1-example.cpp rename to public/usage-examples/geometry/center_point/center_point-1-example.cpp index d6f9cf203..3d0d097a2 100644 --- a/public/usage-examples/geometry/center_point-1-example.cpp +++ b/public/usage-examples/geometry/center_point/center_point-1-example.cpp @@ -27,4 +27,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/center_point-1-example.png b/public/usage-examples/geometry/center_point/center_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/center_point-1-example.png rename to public/usage-examples/geometry/center_point/center_point-1-example.png diff --git a/public/usage-examples/geometry/center_point-1-example.py b/public/usage-examples/geometry/center_point/center_point-1-example.py similarity index 96% rename from public/usage-examples/geometry/center_point-1-example.py rename to public/usage-examples/geometry/center_point/center_point-1-example.py index 0e4bf50b0..415b05708 100644 --- a/public/usage-examples/geometry/center_point-1-example.py +++ b/public/usage-examples/geometry/center_point/center_point-1-example.py @@ -18,4 +18,4 @@ for i in range(outer_circle_radius, 5, -1): fill_circle_record(rgb_color(0, 0, 255 - i), circle_at(circle_centre, i)) refresh_screen() -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/center_point/center_point-1-example.txt b/public/usage-examples/geometry/center_point/center_point-1-example.txt new file mode 100644 index 000000000..aa9aa8bc2 --- /dev/null +++ b/public/usage-examples/geometry/center_point/center_point-1-example.txt @@ -0,0 +1 @@ +Glowing Circle diff --git a/public/usage-examples/geometry/circle_radius-1-example.txt b/public/usage-examples/geometry/circle_radius-1-example.txt deleted file mode 100644 index ab3ded268..000000000 --- a/public/usage-examples/geometry/circle_radius-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Using the Circle Radius \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_radius-1-example-oop.cs b/public/usage-examples/geometry/circle_radius/circle_radius-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/circle_radius-1-example-oop.cs rename to public/usage-examples/geometry/circle_radius/circle_radius-1-example-oop.cs index 4bbd5cf54..6f6384168 100644 --- a/public/usage-examples/geometry/circle_radius-1-example-oop.cs +++ b/public/usage-examples/geometry/circle_radius/circle_radius-1-example-oop.cs @@ -95,4 +95,4 @@ public static void Main() arial.Free(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/circle_radius-1-example-top-level.cs b/public/usage-examples/geometry/circle_radius/circle_radius-1-example-top-level.cs similarity index 99% rename from public/usage-examples/geometry/circle_radius-1-example-top-level.cs rename to public/usage-examples/geometry/circle_radius/circle_radius-1-example-top-level.cs index 70583dc54..a295d9635 100644 --- a/public/usage-examples/geometry/circle_radius-1-example-top-level.cs +++ b/public/usage-examples/geometry/circle_radius/circle_radius-1-example-top-level.cs @@ -87,4 +87,4 @@ } CloseWindow(window); -FreeFont(arial); \ No newline at end of file +FreeFont(arial); diff --git a/public/usage-examples/geometry/circle_radius-1-example.cpp b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/circle_radius-1-example.cpp rename to public/usage-examples/geometry/circle_radius/circle_radius-1-example.cpp index 0fbb32a6e..7185282d3 100644 --- a/public/usage-examples/geometry/circle_radius-1-example.cpp +++ b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.cpp @@ -90,4 +90,4 @@ int main() free_font(arial); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/circle_radius-1-example.png b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.png similarity index 100% rename from public/usage-examples/geometry/circle_radius-1-example.png rename to public/usage-examples/geometry/circle_radius/circle_radius-1-example.png diff --git a/public/usage-examples/geometry/circle_radius-1-example.py b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.py similarity index 99% rename from public/usage-examples/geometry/circle_radius-1-example.py rename to public/usage-examples/geometry/circle_radius/circle_radius-1-example.py index 1e8122e2c..325239a9f 100644 --- a/public/usage-examples/geometry/circle_radius-1-example.py +++ b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.py @@ -73,4 +73,4 @@ refresh_screen_with_target_fps(60) close_window(window) -free_font(arial) \ No newline at end of file +free_font(arial) diff --git a/public/usage-examples/geometry/circle_radius/circle_radius-1-example.txt b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.txt new file mode 100644 index 000000000..5e2eb41e3 --- /dev/null +++ b/public/usage-examples/geometry/circle_radius/circle_radius-1-example.txt @@ -0,0 +1 @@ +Using the Circle Radius diff --git a/public/usage-examples/geometry/circle_x-1-example.txt b/public/usage-examples/geometry/circle_x-1-example.txt deleted file mode 100644 index b1a8abc60..000000000 --- a/public/usage-examples/geometry/circle_x-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -X-coordinate in middle of Circle \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_x-1-example-oop.cs b/public/usage-examples/geometry/circle_x/circle_x-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/circle_x-1-example-oop.cs rename to public/usage-examples/geometry/circle_x/circle_x-1-example-oop.cs index 2b46719b6..b1c048a30 100644 --- a/public/usage-examples/geometry/circle_x-1-example-oop.cs +++ b/public/usage-examples/geometry/circle_x/circle_x-1-example-oop.cs @@ -21,4 +21,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/circle_x-1-example-top-level.cs b/public/usage-examples/geometry/circle_x/circle_x-1-example-top-level.cs similarity index 95% rename from public/usage-examples/geometry/circle_x-1-example-top-level.cs rename to public/usage-examples/geometry/circle_x/circle_x-1-example-top-level.cs index 7fef2a829..f8431c8b7 100644 --- a/public/usage-examples/geometry/circle_x-1-example-top-level.cs +++ b/public/usage-examples/geometry/circle_x/circle_x-1-example-top-level.cs @@ -13,4 +13,4 @@ RefreshScreen(); Delay(4000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/circle_x-1-example.cpp b/public/usage-examples/geometry/circle_x/circle_x-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/circle_x-1-example.cpp rename to public/usage-examples/geometry/circle_x/circle_x-1-example.cpp index 841094092..f89acfe29 100644 --- a/public/usage-examples/geometry/circle_x-1-example.cpp +++ b/public/usage-examples/geometry/circle_x/circle_x-1-example.cpp @@ -15,4 +15,4 @@ int main() delay(4000); close_all_windows(); -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/circle_x-1-example.png b/public/usage-examples/geometry/circle_x/circle_x-1-example.png similarity index 100% rename from public/usage-examples/geometry/circle_x-1-example.png rename to public/usage-examples/geometry/circle_x/circle_x-1-example.png diff --git a/public/usage-examples/geometry/circle_x-1-example.py b/public/usage-examples/geometry/circle_x/circle_x-1-example.py similarity index 95% rename from public/usage-examples/geometry/circle_x-1-example.py rename to public/usage-examples/geometry/circle_x/circle_x-1-example.py index 76870943d..185e9b94e 100644 --- a/public/usage-examples/geometry/circle_x-1-example.py +++ b/public/usage-examples/geometry/circle_x/circle_x-1-example.py @@ -12,4 +12,4 @@ refresh_screen() delay(4000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/circle_x/circle_x-1-example.txt b/public/usage-examples/geometry/circle_x/circle_x-1-example.txt new file mode 100644 index 000000000..d043c510e --- /dev/null +++ b/public/usage-examples/geometry/circle_x/circle_x-1-example.txt @@ -0,0 +1 @@ +X-coordinate in middle of Circle diff --git a/public/usage-examples/geometry/circle_y-1-example.txt b/public/usage-examples/geometry/circle_y-1-example.txt deleted file mode 100644 index 319a6b09b..000000000 --- a/public/usage-examples/geometry/circle_y-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Using the Circle Y-coordinate \ No newline at end of file diff --git a/public/usage-examples/geometry/circle_y-1-example-oop.cs b/public/usage-examples/geometry/circle_y/circle_y-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/circle_y-1-example-oop.cs rename to public/usage-examples/geometry/circle_y/circle_y-1-example-oop.cs index 4211d6c49..6fc49b88c 100644 --- a/public/usage-examples/geometry/circle_y-1-example-oop.cs +++ b/public/usage-examples/geometry/circle_y/circle_y-1-example-oop.cs @@ -30,4 +30,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/circle_y-1-example-top-level.cs b/public/usage-examples/geometry/circle_y/circle_y-1-example-top-level.cs similarity index 97% rename from public/usage-examples/geometry/circle_y-1-example-top-level.cs rename to public/usage-examples/geometry/circle_y/circle_y-1-example-top-level.cs index 0b5efc598..52fa106e0 100644 --- a/public/usage-examples/geometry/circle_y-1-example-top-level.cs +++ b/public/usage-examples/geometry/circle_y/circle_y-1-example-top-level.cs @@ -22,4 +22,4 @@ RefreshScreen(); Delay(4000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/circle_y-1-example.cpp b/public/usage-examples/geometry/circle_y/circle_y-1-example.cpp similarity index 100% rename from public/usage-examples/geometry/circle_y-1-example.cpp rename to public/usage-examples/geometry/circle_y/circle_y-1-example.cpp diff --git a/public/usage-examples/geometry/circle_y-1-example.png b/public/usage-examples/geometry/circle_y/circle_y-1-example.png similarity index 100% rename from public/usage-examples/geometry/circle_y-1-example.png rename to public/usage-examples/geometry/circle_y/circle_y-1-example.png diff --git a/public/usage-examples/geometry/circle_y-1-example.py b/public/usage-examples/geometry/circle_y/circle_y-1-example.py similarity index 97% rename from public/usage-examples/geometry/circle_y-1-example.py rename to public/usage-examples/geometry/circle_y/circle_y-1-example.py index 8d0a8d96b..1892df5fb 100644 --- a/public/usage-examples/geometry/circle_y-1-example.py +++ b/public/usage-examples/geometry/circle_y/circle_y-1-example.py @@ -19,4 +19,4 @@ refresh_screen() delay(4000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/circle_y/circle_y-1-example.txt b/public/usage-examples/geometry/circle_y/circle_y-1-example.txt new file mode 100644 index 000000000..7161aff1e --- /dev/null +++ b/public/usage-examples/geometry/circle_y/circle_y-1-example.txt @@ -0,0 +1 @@ +Using the Circle Y-coordinate diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example.txt b/public/usage-examples/geometry/closest_point_on_circle-1-example.txt deleted file mode 100644 index 05d5764cc..000000000 --- a/public/usage-examples/geometry/closest_point_on_circle-1-example.txt +++ /dev/null @@ -1,3 +0,0 @@ -Closest Point to Mouse on Circle - -Note: The blue dot represents the "Mouse" point. \ No newline at end of file diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example-oop.cs b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/closest_point_on_circle-1-example-oop.cs rename to public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-oop.cs index 30dc0d41a..d2f9e75c7 100644 --- a/public/usage-examples/geometry/closest_point_on_circle-1-example-oop.cs +++ b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-oop.cs @@ -35,4 +35,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example-top-level.cs b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/closest_point_on_circle-1-example-top-level.cs rename to public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-top-level.cs index 67cc18dee..8a4de2b35 100644 --- a/public/usage-examples/geometry/closest_point_on_circle-1-example-top-level.cs +++ b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example-top-level.cs @@ -27,4 +27,4 @@ RefreshScreen(); } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example.cpp b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/closest_point_on_circle-1-example.cpp rename to public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.cpp index 135298fef..126dba249 100644 --- a/public/usage-examples/geometry/closest_point_on_circle-1-example.cpp +++ b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.cpp @@ -31,4 +31,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example.png b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.png similarity index 100% rename from public/usage-examples/geometry/closest_point_on_circle-1-example.png rename to public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.png diff --git a/public/usage-examples/geometry/closest_point_on_circle-1-example.py b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.py similarity index 97% rename from public/usage-examples/geometry/closest_point_on_circle-1-example.py rename to public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.py index ed017ae20..e84fadbf1 100644 --- a/public/usage-examples/geometry/closest_point_on_circle-1-example.py +++ b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.py @@ -24,4 +24,4 @@ fill_circle(color_red(), closest_point.x, closest_point.y, 5) refresh_screen() -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.txt b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.txt new file mode 100644 index 000000000..62c2c1014 --- /dev/null +++ b/public/usage-examples/geometry/closest_point_on_circle/closest_point_on_circle-1-example.txt @@ -0,0 +1,3 @@ +Closest Point to Mouse on Circle + +Note: The blue dot represents the "Mouse" point. diff --git a/public/usage-examples/geometry/same_point-1-example-oop.cs b/public/usage-examples/geometry/game_2dpoint/same_point-1-example-oop.cs similarity index 97% rename from public/usage-examples/geometry/same_point-1-example-oop.cs rename to public/usage-examples/geometry/game_2dpoint/same_point-1-example-oop.cs index 72e0dae54..0bf208ed5 100644 --- a/public/usage-examples/geometry/same_point-1-example-oop.cs +++ b/public/usage-examples/geometry/game_2dpoint/same_point-1-example-oop.cs @@ -60,4 +60,4 @@ public static void Main() SplashKit.WriteLine("You Win!"); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/same_point-1-example-top-level.cs b/public/usage-examples/geometry/game_2dpoint/same_point-1-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/same_point-1-example-top-level.cs rename to public/usage-examples/geometry/game_2dpoint/same_point-1-example-top-level.cs index 436845223..f8be5a4dc 100644 --- a/public/usage-examples/geometry/same_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/game_2dpoint/same_point-1-example-top-level.cs @@ -52,4 +52,4 @@ static Point2D GetPoint(string prompt) WriteLine("Try Again!"); guessPoint = GetPoint("Enter your coordinates as x,y: "); } -WriteLine("You Win!"); \ No newline at end of file +WriteLine("You Win!"); diff --git a/public/usage-examples/geometry/same_point-1-example.cpp b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/same_point-1-example.cpp rename to public/usage-examples/geometry/game_2dpoint/same_point-1-example.cpp index 8376ff2a7..c6b55d3e7 100644 --- a/public/usage-examples/geometry/same_point-1-example.cpp +++ b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.cpp @@ -56,4 +56,4 @@ int main() write_line("You Win!"); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/same_point-1-example.png b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/same_point-1-example.png rename to public/usage-examples/geometry/game_2dpoint/same_point-1-example.png diff --git a/public/usage-examples/geometry/same_point-1-example.py b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.py similarity index 99% rename from public/usage-examples/geometry/same_point-1-example.py rename to public/usage-examples/geometry/game_2dpoint/same_point-1-example.py index f83252bb2..449723c8d 100644 --- a/public/usage-examples/geometry/same_point-1-example.py +++ b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.py @@ -48,4 +48,4 @@ def main(): write_line("You Win!") -main() \ No newline at end of file +main() diff --git a/public/usage-examples/geometry/game_2dpoint/same_point-1-example.txt b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.txt new file mode 100644 index 000000000..febcbd24f --- /dev/null +++ b/public/usage-examples/geometry/game_2dpoint/same_point-1-example.txt @@ -0,0 +1 @@ +Point 2D Guessing Game diff --git a/public/usage-examples/geometry/line_length-1-example.txt b/public/usage-examples/geometry/line_length-1-example.txt deleted file mode 100644 index d4b9a2434..000000000 --- a/public/usage-examples/geometry/line_length-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Simple Line Length \ No newline at end of file diff --git a/public/usage-examples/geometry/line_length-1-example-oop.cs b/public/usage-examples/geometry/line_length/line_length-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/line_length-1-example-oop.cs rename to public/usage-examples/geometry/line_length/line_length-1-example-oop.cs index 50d5ba02e..76f6e94f4 100644 --- a/public/usage-examples/geometry/line_length-1-example-oop.cs +++ b/public/usage-examples/geometry/line_length/line_length-1-example-oop.cs @@ -26,4 +26,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_length-1-example-top-level.cs b/public/usage-examples/geometry/line_length/line_length-1-example-top-level.cs similarity index 96% rename from public/usage-examples/geometry/line_length-1-example-top-level.cs rename to public/usage-examples/geometry/line_length/line_length-1-example-top-level.cs index 9266fc2be..9f38004ed 100644 --- a/public/usage-examples/geometry/line_length-1-example-top-level.cs +++ b/public/usage-examples/geometry/line_length/line_length-1-example-top-level.cs @@ -18,4 +18,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/line_length-1-example.cpp b/public/usage-examples/geometry/line_length/line_length-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/line_length-1-example.cpp rename to public/usage-examples/geometry/line_length/line_length-1-example.cpp index fc4ef5a23..8447678b2 100644 --- a/public/usage-examples/geometry/line_length-1-example.cpp +++ b/public/usage-examples/geometry/line_length/line_length-1-example.cpp @@ -21,4 +21,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_length-1-example.png b/public/usage-examples/geometry/line_length/line_length-1-example.png similarity index 100% rename from public/usage-examples/geometry/line_length-1-example.png rename to public/usage-examples/geometry/line_length/line_length-1-example.png diff --git a/public/usage-examples/geometry/line_length-1-example.py b/public/usage-examples/geometry/line_length/line_length-1-example.py similarity index 96% rename from public/usage-examples/geometry/line_length-1-example.py rename to public/usage-examples/geometry/line_length/line_length-1-example.py index 3d2f969b5..bcc97d101 100644 --- a/public/usage-examples/geometry/line_length-1-example.py +++ b/public/usage-examples/geometry/line_length/line_length-1-example.py @@ -22,4 +22,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/line_length/line_length-1-example.txt b/public/usage-examples/geometry/line_length/line_length-1-example.txt new file mode 100644 index 000000000..33de5a6cb --- /dev/null +++ b/public/usage-examples/geometry/line_length/line_length-1-example.txt @@ -0,0 +1 @@ +Simple Line Length diff --git a/public/usage-examples/geometry/line_length_squared-1-example.txt b/public/usage-examples/geometry/line_length_squared-1-example.txt deleted file mode 100644 index 1a0e55004..000000000 --- a/public/usage-examples/geometry/line_length_squared-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Simple Line Length Squared \ No newline at end of file diff --git a/public/usage-examples/geometry/line_length_squared-1-example-oop.cs b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/line_length_squared-1-example-oop.cs rename to public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-oop.cs index 4d3a0e7ec..1f3759ed7 100644 --- a/public/usage-examples/geometry/line_length_squared-1-example-oop.cs +++ b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-oop.cs @@ -26,4 +26,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_length_squared-1-example-top-level.cs b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-top-level.cs similarity index 96% rename from public/usage-examples/geometry/line_length_squared-1-example-top-level.cs rename to public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-top-level.cs index 638f4c8bc..e4660ff0f 100644 --- a/public/usage-examples/geometry/line_length_squared-1-example-top-level.cs +++ b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example-top-level.cs @@ -18,4 +18,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/line_length_squared-1-example.cpp b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/line_length_squared-1-example.cpp rename to public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.cpp index 9fefdddbd..b383a4895 100644 --- a/public/usage-examples/geometry/line_length_squared-1-example.cpp +++ b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.cpp @@ -21,4 +21,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_length_squared-1-example.png b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.png similarity index 100% rename from public/usage-examples/geometry/line_length_squared-1-example.png rename to public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.png diff --git a/public/usage-examples/geometry/line_length_squared-1-example.py b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.py similarity index 96% rename from public/usage-examples/geometry/line_length_squared-1-example.py rename to public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.py index 07248775e..2e738fef4 100644 --- a/public/usage-examples/geometry/line_length_squared-1-example.py +++ b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.py @@ -23,4 +23,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.txt b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.txt new file mode 100644 index 000000000..c858c1fa4 --- /dev/null +++ b/public/usage-examples/geometry/line_length_squared/line_length_squared-1-example.txt @@ -0,0 +1 @@ +Simple Line Length Squared diff --git a/public/usage-examples/geometry/line_mid_point-1-example.txt b/public/usage-examples/geometry/line_mid_point-1-example.txt deleted file mode 100644 index 43ceafb17..000000000 --- a/public/usage-examples/geometry/line_mid_point-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Simple Line Mid Point \ No newline at end of file diff --git a/public/usage-examples/geometry/line_mid_point-1-example-oop.cs b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/line_mid_point-1-example-oop.cs rename to public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-oop.cs index f023897df..d8844a523 100644 --- a/public/usage-examples/geometry/line_mid_point-1-example-oop.cs +++ b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-oop.cs @@ -29,4 +29,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_mid_point-1-example-top-level.cs b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-top-level.cs similarity index 97% rename from public/usage-examples/geometry/line_mid_point-1-example-top-level.cs rename to public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-top-level.cs index e1e97dc39..7cbbb38e8 100644 --- a/public/usage-examples/geometry/line_mid_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example-top-level.cs @@ -21,4 +21,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/line_mid_point-1-example.cpp b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/line_mid_point-1-example.cpp rename to public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.cpp index 54c7efa26..189de7ad2 100644 --- a/public/usage-examples/geometry/line_mid_point-1-example.cpp +++ b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.cpp @@ -24,4 +24,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_mid_point-1-example.png b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/line_mid_point-1-example.png rename to public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.png diff --git a/public/usage-examples/geometry/line_mid_point-1-example.py b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.py similarity index 97% rename from public/usage-examples/geometry/line_mid_point-1-example.py rename to public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.py index 049799b54..b293a5e20 100644 --- a/public/usage-examples/geometry/line_mid_point-1-example.py +++ b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.py @@ -26,4 +26,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.txt b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.txt new file mode 100644 index 000000000..ec9889741 --- /dev/null +++ b/public/usage-examples/geometry/line_mid_point/line_mid_point-1-example.txt @@ -0,0 +1 @@ +Simple Line Mid Point diff --git a/public/usage-examples/geometry/line_to_string-1-example.txt b/public/usage-examples/geometry/line_to_string-1-example.txt deleted file mode 100644 index cd46ad415..000000000 --- a/public/usage-examples/geometry/line_to_string-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Display Line Information \ No newline at end of file diff --git a/public/usage-examples/geometry/line_to_string-1-example-oop.cs b/public/usage-examples/geometry/line_to_string/line_to_string-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/line_to_string-1-example-oop.cs rename to public/usage-examples/geometry/line_to_string/line_to_string-1-example-oop.cs index 98d95924e..d72321bdc 100644 --- a/public/usage-examples/geometry/line_to_string-1-example-oop.cs +++ b/public/usage-examples/geometry/line_to_string/line_to_string-1-example-oop.cs @@ -26,4 +26,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_to_string-1-example-top-level.cs b/public/usage-examples/geometry/line_to_string/line_to_string-1-example-top-level.cs similarity index 96% rename from public/usage-examples/geometry/line_to_string-1-example-top-level.cs rename to public/usage-examples/geometry/line_to_string/line_to_string-1-example-top-level.cs index 3a8537f72..eea94151f 100644 --- a/public/usage-examples/geometry/line_to_string-1-example-top-level.cs +++ b/public/usage-examples/geometry/line_to_string/line_to_string-1-example-top-level.cs @@ -18,4 +18,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/line_to_string-1-example.cpp b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/line_to_string-1-example.cpp rename to public/usage-examples/geometry/line_to_string/line_to_string-1-example.cpp index b8790818b..0d794b30f 100644 --- a/public/usage-examples/geometry/line_to_string-1-example.cpp +++ b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.cpp @@ -21,4 +21,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/line_to_string-1-example.png b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.png similarity index 100% rename from public/usage-examples/geometry/line_to_string-1-example.png rename to public/usage-examples/geometry/line_to_string/line_to_string-1-example.png diff --git a/public/usage-examples/geometry/line_to_string-1-example.py b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.py similarity index 96% rename from public/usage-examples/geometry/line_to_string-1-example.py rename to public/usage-examples/geometry/line_to_string/line_to_string-1-example.py index 3f082acec..aaf89a60b 100644 --- a/public/usage-examples/geometry/line_to_string-1-example.py +++ b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.py @@ -22,4 +22,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/line_to_string/line_to_string-1-example.txt b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.txt new file mode 100644 index 000000000..58b651a5f --- /dev/null +++ b/public/usage-examples/geometry/line_to_string/line_to_string-1-example.txt @@ -0,0 +1 @@ +Display Line Information diff --git a/public/usage-examples/geometry/lines_intersect-1-example.txt b/public/usage-examples/geometry/lines_intersect-1-example.txt deleted file mode 100644 index aa5c90278..000000000 --- a/public/usage-examples/geometry/lines_intersect-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Simple Line Intersect Check \ No newline at end of file diff --git a/public/usage-examples/geometry/lines_intersect-1-example-oop.cs b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/lines_intersect-1-example-oop.cs rename to public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-oop.cs index 77e931025..b39f69057 100644 --- a/public/usage-examples/geometry/lines_intersect-1-example-oop.cs +++ b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-oop.cs @@ -56,4 +56,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/lines_intersect-1-example-top-level.cs b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-top-level.cs similarity index 98% rename from public/usage-examples/geometry/lines_intersect-1-example-top-level.cs rename to public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-top-level.cs index 1ea24a430..c94c06991 100644 --- a/public/usage-examples/geometry/lines_intersect-1-example-top-level.cs +++ b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example-top-level.cs @@ -48,4 +48,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/lines_intersect-1-example.cpp b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/lines_intersect-1-example.cpp rename to public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.cpp index 53a1259b3..4633d2057 100644 --- a/public/usage-examples/geometry/lines_intersect-1-example.cpp +++ b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.cpp @@ -51,4 +51,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/lines_intersect-1-example.png b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.png similarity index 100% rename from public/usage-examples/geometry/lines_intersect-1-example.png rename to public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.png diff --git a/public/usage-examples/geometry/lines_intersect-1-example.py b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.py similarity index 98% rename from public/usage-examples/geometry/lines_intersect-1-example.py rename to public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.py index 59e9de2bf..af3592da6 100644 --- a/public/usage-examples/geometry/lines_intersect-1-example.py +++ b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.py @@ -54,4 +54,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.txt b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.txt new file mode 100644 index 000000000..2fe5b3c55 --- /dev/null +++ b/public/usage-examples/geometry/lines_intersect/lines_intersect-1-example.txt @@ -0,0 +1 @@ +Simple Line Intersect Check diff --git a/public/usage-examples/geometry/point_to_string-1-example-oop.cs b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/point_to_string-1-example-oop.cs rename to public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-oop.cs index 90ad9207c..9df2fee86 100644 --- a/public/usage-examples/geometry/point_to_string-1-example-oop.cs +++ b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-oop.cs @@ -29,4 +29,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_to_string-1-example-top-level.cs b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-top-level.cs similarity index 92% rename from public/usage-examples/geometry/point_to_string-1-example-top-level.cs rename to public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-top-level.cs index a631ae99a..c18ff52db 100644 --- a/public/usage-examples/geometry/point_to_string-1-example-top-level.cs +++ b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example-top-level.cs @@ -21,4 +21,4 @@ RefreshScreen(); } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_to_string-1-example.cpp b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_to_string-1-example.cpp rename to public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.cpp index b89091a2c..54a60ea09 100644 --- a/public/usage-examples/geometry/point_to_string-1-example.cpp +++ b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.cpp @@ -24,4 +24,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_to_string-1-example.png b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.png similarity index 100% rename from public/usage-examples/geometry/point_to_string-1-example.png rename to public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.png diff --git a/public/usage-examples/geometry/point_to_string-1-example.py b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.py similarity index 96% rename from public/usage-examples/geometry/point_to_string-1-example.py rename to public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.py index d485c1eea..d15c9a540 100644 --- a/public/usage-examples/geometry/point_to_string-1-example.py +++ b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.py @@ -16,4 +16,4 @@ draw_text_no_font_no_size(mouse_position_text, color_black(), 100, 300) refresh_screen() -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.txt b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.txt new file mode 100644 index 000000000..5ead0c784 --- /dev/null +++ b/public/usage-examples/geometry/mouse_click_location/point_to_string-1-example.txt @@ -0,0 +1 @@ +Mouse Click Location diff --git a/public/usage-examples/geometry/point_point_distance-1-example.cpp b/public/usage-examples/geometry/point_angle/point_distance/point_point_distance-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_point_distance-1-example.cpp rename to public/usage-examples/geometry/point_angle/point_distance/point_point_distance-1-example.cpp index 557ee4e1c..1ac2be7aa 100644 --- a/public/usage-examples/geometry/point_point_distance-1-example.cpp +++ b/public/usage-examples/geometry/point_angle/point_distance/point_point_distance-1-example.cpp @@ -31,4 +31,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_point_angle-1-example-oop.cs b/public/usage-examples/geometry/point_angle/point_point_angle-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_point_angle-1-example-oop.cs rename to public/usage-examples/geometry/point_angle/point_point_angle-1-example-oop.cs index aaaddcc25..16128d286 100644 --- a/public/usage-examples/geometry/point_point_angle-1-example-oop.cs +++ b/public/usage-examples/geometry/point_angle/point_point_angle-1-example-oop.cs @@ -59,4 +59,4 @@ public static void Main() arial.Free(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_point_angle-1-example-top-level.cs b/public/usage-examples/geometry/point_angle/point_point_angle-1-example-top-level.cs similarity index 99% rename from public/usage-examples/geometry/point_point_angle-1-example-top-level.cs rename to public/usage-examples/geometry/point_angle/point_point_angle-1-example-top-level.cs index 9cd9cdb4c..7481bcae3 100644 --- a/public/usage-examples/geometry/point_point_angle-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_angle/point_point_angle-1-example-top-level.cs @@ -52,4 +52,4 @@ } CloseAllWindows(); -FreeAllFonts(); \ No newline at end of file +FreeAllFonts(); diff --git a/public/usage-examples/geometry/point_point_angle-1-example.cpp b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_point_angle-1-example.cpp rename to public/usage-examples/geometry/point_angle/point_point_angle-1-example.cpp index ed21305ea..4a8cfb906 100644 --- a/public/usage-examples/geometry/point_point_angle-1-example.cpp +++ b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.cpp @@ -55,4 +55,4 @@ int main() free_all_fonts(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_point_angle-1-example.gif b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.gif similarity index 100% rename from public/usage-examples/geometry/point_point_angle-1-example.gif rename to public/usage-examples/geometry/point_angle/point_point_angle-1-example.gif diff --git a/public/usage-examples/geometry/point_point_angle-1-example.py b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.py similarity index 100% rename from public/usage-examples/geometry/point_point_angle-1-example.py rename to public/usage-examples/geometry/point_angle/point_point_angle-1-example.py diff --git a/public/usage-examples/geometry/point_angle/point_point_angle-1-example.txt b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.txt new file mode 100644 index 000000000..cf898ac76 --- /dev/null +++ b/public/usage-examples/geometry/point_angle/point_point_angle-1-example.txt @@ -0,0 +1 @@ +How Does "Point Point Angle" Work? diff --git a/public/usage-examples/geometry/point_at-1-example.txt b/public/usage-examples/geometry/point_at-1-example.txt deleted file mode 100644 index 8ba8c20cf..000000000 --- a/public/usage-examples/geometry/point_at-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Flower Grid \ No newline at end of file diff --git a/public/usage-examples/geometry/point_at-1-example-oop.cs b/public/usage-examples/geometry/point_at/point_at-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_at-1-example-oop.cs rename to public/usage-examples/geometry/point_at/point_at-1-example-oop.cs index d54b71dab..d1dae4501 100644 --- a/public/usage-examples/geometry/point_at-1-example-oop.cs +++ b/public/usage-examples/geometry/point_at/point_at-1-example-oop.cs @@ -61,4 +61,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at-1-example-top-level.cs b/public/usage-examples/geometry/point_at/point_at-1-example-top-level.cs similarity index 98% rename from public/usage-examples/geometry/point_at-1-example-top-level.cs rename to public/usage-examples/geometry/point_at/point_at-1-example-top-level.cs index 74f17421a..bcce38dbc 100644 --- a/public/usage-examples/geometry/point_at-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_at/point_at-1-example-top-level.cs @@ -53,4 +53,4 @@ static void DrawFlower(Color petal_color, Point2D location) RefreshScreen(); } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_at-1-example.cpp b/public/usage-examples/geometry/point_at/point_at-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_at-1-example.cpp rename to public/usage-examples/geometry/point_at/point_at-1-example.cpp index 8163ebb21..e358734e6 100644 --- a/public/usage-examples/geometry/point_at-1-example.cpp +++ b/public/usage-examples/geometry/point_at/point_at-1-example.cpp @@ -57,4 +57,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at-1-example.png b/public/usage-examples/geometry/point_at/point_at-1-example.png similarity index 100% rename from public/usage-examples/geometry/point_at-1-example.png rename to public/usage-examples/geometry/point_at/point_at-1-example.png diff --git a/public/usage-examples/geometry/point_at-1-example.py b/public/usage-examples/geometry/point_at/point_at-1-example.py similarity index 98% rename from public/usage-examples/geometry/point_at-1-example.py rename to public/usage-examples/geometry/point_at/point_at-1-example.py index d83924ef2..8e9696a85 100644 --- a/public/usage-examples/geometry/point_at-1-example.py +++ b/public/usage-examples/geometry/point_at/point_at-1-example.py @@ -41,4 +41,4 @@ def draw_flower(petal_color, location): draw_flower(flower_colors[x][y], points[x][y]) refresh_screen() -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_at/point_at-1-example.txt b/public/usage-examples/geometry/point_at/point_at-1-example.txt new file mode 100644 index 000000000..d7131dc5e --- /dev/null +++ b/public/usage-examples/geometry/point_at/point_at-1-example.txt @@ -0,0 +1 @@ +Flower Grid diff --git a/public/usage-examples/geometry/point_at_origin-1-example.txt b/public/usage-examples/geometry/point_at_origin-1-example.txt deleted file mode 100644 index 29188b99a..000000000 --- a/public/usage-examples/geometry/point_at_origin-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Red Dot At Origin \ No newline at end of file diff --git a/public/usage-examples/geometry/point_at_origin-2-example.txt b/public/usage-examples/geometry/point_at_origin-2-example.txt deleted file mode 100644 index 893d3a3bf..000000000 --- a/public/usage-examples/geometry/point_at_origin-2-example.txt +++ /dev/null @@ -1 +0,0 @@ -Hot Summer Sun \ No newline at end of file diff --git a/public/usage-examples/geometry/point_at_origin-2-example-oop.cs b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_at_origin-2-example-oop.cs rename to public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-oop.cs index 28e0a0caf..4b8e86fe1 100644 --- a/public/usage-examples/geometry/point_at_origin-2-example-oop.cs +++ b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-oop.cs @@ -23,4 +23,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at_origin-2-example-top-level.cs b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/point_at_origin-2-example-top-level.cs rename to public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-top-level.cs index 6fd1a71e7..bf2348e04 100644 --- a/public/usage-examples/geometry/point_at_origin-2-example-top-level.cs +++ b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example-top-level.cs @@ -15,4 +15,4 @@ RefreshScreen(); Delay(4000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_at_origin-2-example.cpp b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_at_origin-2-example.cpp rename to public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.cpp index bc80d72d1..d03af4be0 100644 --- a/public/usage-examples/geometry/point_at_origin-2-example.cpp +++ b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.cpp @@ -17,4 +17,4 @@ int main() delay(4000); close_all_windows(); -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at_origin-2-example.png b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.png similarity index 100% rename from public/usage-examples/geometry/point_at_origin-2-example.png rename to public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.png diff --git a/public/usage-examples/geometry/point_at_origin-2-example.py b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.py similarity index 93% rename from public/usage-examples/geometry/point_at_origin-2-example.py rename to public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.py index a5f2045b3..ff712b8e3 100644 --- a/public/usage-examples/geometry/point_at_origin-2-example.py +++ b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.py @@ -12,4 +12,4 @@ refresh_screen() delay(4000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.txt b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.txt new file mode 100644 index 000000000..63e9b6f2d --- /dev/null +++ b/public/usage-examples/geometry/point_at_origin-2/point_at_origin-2-example.txt @@ -0,0 +1 @@ +Hot Summer Sun diff --git a/public/usage-examples/geometry/point_at_origin-1-example-oop.cs b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_at_origin-1-example-oop.cs rename to public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-oop.cs index 7650a0f72..53f94b6f3 100644 --- a/public/usage-examples/geometry/point_at_origin-1-example-oop.cs +++ b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-oop.cs @@ -20,4 +20,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at_origin-1-example-top-level.cs b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-top-level.cs similarity index 93% rename from public/usage-examples/geometry/point_at_origin-1-example-top-level.cs rename to public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-top-level.cs index ea95538c6..125730288 100644 --- a/public/usage-examples/geometry/point_at_origin-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example-top-level.cs @@ -12,4 +12,4 @@ RefreshScreen(); Delay(4000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_at_origin-1-example.cpp b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_at_origin-1-example.cpp rename to public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.cpp index 508a25c38..f6d92c837 100644 --- a/public/usage-examples/geometry/point_at_origin-1-example.cpp +++ b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.cpp @@ -14,4 +14,4 @@ int main() delay(4000); close_all_windows(); -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_at_origin-1-example.png b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.png similarity index 100% rename from public/usage-examples/geometry/point_at_origin-1-example.png rename to public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.png diff --git a/public/usage-examples/geometry/point_at_origin-1-example.py b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.py similarity index 92% rename from public/usage-examples/geometry/point_at_origin-1-example.py rename to public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.py index 0c2b14bac..066021764 100644 --- a/public/usage-examples/geometry/point_at_origin-1-example.py +++ b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.py @@ -11,4 +11,4 @@ refresh_screen() delay(4000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.txt b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.txt new file mode 100644 index 000000000..4ca8a341f --- /dev/null +++ b/public/usage-examples/geometry/point_at_origin/point_at_origin-1-example.txt @@ -0,0 +1 @@ +Red Dot At Origin diff --git a/public/usage-examples/geometry/point_point_distance-1-example-oop.cs b/public/usage-examples/geometry/point_distance/point_point_distance-1-example-oop.cs similarity index 97% rename from public/usage-examples/geometry/point_point_distance-1-example-oop.cs rename to public/usage-examples/geometry/point_distance/point_point_distance-1-example-oop.cs index ea2304735..4b4850e17 100644 --- a/public/usage-examples/geometry/point_point_distance-1-example-oop.cs +++ b/public/usage-examples/geometry/point_distance/point_point_distance-1-example-oop.cs @@ -35,4 +35,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_point_distance-1-example-top-level.cs b/public/usage-examples/geometry/point_distance/point_point_distance-1-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/point_point_distance-1-example-top-level.cs rename to public/usage-examples/geometry/point_distance/point_point_distance-1-example-top-level.cs index d7ab01978..32597eae3 100644 --- a/public/usage-examples/geometry/point_point_distance-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_distance/point_point_distance-1-example-top-level.cs @@ -27,4 +27,4 @@ } // Close all opened windows -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_point_distance-1-example.png b/public/usage-examples/geometry/point_distance/point_point_distance-1-example.png similarity index 100% rename from public/usage-examples/geometry/point_point_distance-1-example.png rename to public/usage-examples/geometry/point_distance/point_point_distance-1-example.png diff --git a/public/usage-examples/geometry/point_point_distance-1-example.py b/public/usage-examples/geometry/point_distance/point_point_distance-1-example.py similarity index 97% rename from public/usage-examples/geometry/point_point_distance-1-example.py rename to public/usage-examples/geometry/point_distance/point_point_distance-1-example.py index 78b7b225c..d04772e86 100644 --- a/public/usage-examples/geometry/point_point_distance-1-example.py +++ b/public/usage-examples/geometry/point_distance/point_point_distance-1-example.py @@ -24,4 +24,4 @@ refresh_screen() # Close all opened windows -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_distance/point_point_distance-1-example.txt b/public/usage-examples/geometry/point_distance/point_point_distance-1-example.txt new file mode 100644 index 000000000..9ac75ba7a --- /dev/null +++ b/public/usage-examples/geometry/point_distance/point_point_distance-1-example.txt @@ -0,0 +1 @@ +Distance To Center diff --git a/public/usage-examples/geometry/point_in_circle-1-example.txt b/public/usage-examples/geometry/point_in_circle-1-example.txt deleted file mode 100644 index afb47582b..000000000 --- a/public/usage-examples/geometry/point_in_circle-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Mouse in a Circle \ No newline at end of file diff --git a/public/usage-examples/geometry/point_in_circle-1-example-oop.cs b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_in_circle-1-example-oop.cs rename to public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-oop.cs index a9e9ab549..b7014f8c9 100644 --- a/public/usage-examples/geometry/point_in_circle-1-example-oop.cs +++ b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-oop.cs @@ -38,4 +38,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_circle-1-example-top-level.cs b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-top-level.cs similarity index 97% rename from public/usage-examples/geometry/point_in_circle-1-example-top-level.cs rename to public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-top-level.cs index 262bc80c0..e4c1e87a2 100644 --- a/public/usage-examples/geometry/point_in_circle-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example-top-level.cs @@ -30,4 +30,4 @@ DrawText(text, ColorRed(), 100, 100); RefreshScreen(); } -CloseWindow(window); \ No newline at end of file +CloseWindow(window); diff --git a/public/usage-examples/geometry/point_in_circle-1-example.cpp b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_in_circle-1-example.cpp rename to public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.cpp index 4ac30ccee..4c22f9a5f 100644 --- a/public/usage-examples/geometry/point_in_circle-1-example.cpp +++ b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.cpp @@ -34,4 +34,4 @@ int main() close_window(window); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_circle-1-example.gif b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.gif similarity index 100% rename from public/usage-examples/geometry/point_in_circle-1-example.gif rename to public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.gif diff --git a/public/usage-examples/geometry/point_in_circle-1-example.py b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.py similarity index 97% rename from public/usage-examples/geometry/point_in_circle-1-example.py rename to public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.py index adf3d7df5..2d7d47e9b 100644 --- a/public/usage-examples/geometry/point_in_circle-1-example.py +++ b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.py @@ -24,4 +24,4 @@ draw_text_no_font_no_size(text, color_red(), 100, 100) refresh_screen() -close_window(window) \ No newline at end of file +close_window(window) diff --git a/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.txt b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.txt new file mode 100644 index 000000000..57a2de610 --- /dev/null +++ b/public/usage-examples/geometry/point_in_circle/point_in_circle-1-example.txt @@ -0,0 +1 @@ +Mouse in a Circle diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example.txt b/public/usage-examples/geometry/point_in_rectangle-1-example.txt deleted file mode 100644 index b2e8c5e02..000000000 --- a/public/usage-examples/geometry/point_in_rectangle-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Cursor Jail \ No newline at end of file diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example-oop.cs b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/point_in_rectangle-1-example-oop.cs rename to public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-oop.cs index e7f31413f..9c2a7a65d 100644 --- a/public/usage-examples/geometry/point_in_rectangle-1-example-oop.cs +++ b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-oop.cs @@ -62,4 +62,4 @@ public static void Main() SplashKit.CloseAllWindows(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example-top-level.cs b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/point_in_rectangle-1-example-top-level.cs rename to public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-top-level.cs index 2eef8ecb5..08aef230e 100644 --- a/public/usage-examples/geometry/point_in_rectangle-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example-top-level.cs @@ -53,4 +53,4 @@ ResetTimer(flashingTimer); } } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example.cpp b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_in_rectangle-1-example.cpp rename to public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.cpp index f6e650807..47395557e 100644 --- a/public/usage-examples/geometry/point_in_rectangle-1-example.cpp +++ b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.cpp @@ -58,4 +58,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example.gif b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.gif similarity index 100% rename from public/usage-examples/geometry/point_in_rectangle-1-example.gif rename to public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.gif diff --git a/public/usage-examples/geometry/point_in_rectangle-1-example.py b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.py similarity index 98% rename from public/usage-examples/geometry/point_in_rectangle-1-example.py rename to public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.py index b2d7cd691..414f5df90 100644 --- a/public/usage-examples/geometry/point_in_rectangle-1-example.py +++ b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.py @@ -44,4 +44,4 @@ if timer_ticks(flashing_timer) >= 1000: reset_timer(flashing_timer) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.txt b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.txt new file mode 100644 index 000000000..15dc2f80d --- /dev/null +++ b/public/usage-examples/geometry/point_in_rectangle/point_in_rectangle-1-example.txt @@ -0,0 +1 @@ +Cursor Jail diff --git a/public/usage-examples/geometry/point_in_triangle-1-example.txt b/public/usage-examples/geometry/point_in_triangle-1-example.txt deleted file mode 100644 index 825e2a748..000000000 --- a/public/usage-examples/geometry/point_in_triangle-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Mouse in a Triangle \ No newline at end of file diff --git a/public/usage-examples/geometry/point_in_triangle-1-example-oop.cs b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-oop.cs similarity index 99% rename from public/usage-examples/geometry/point_in_triangle-1-example-oop.cs rename to public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-oop.cs index 2d52c59fd..dfd908e39 100644 --- a/public/usage-examples/geometry/point_in_triangle-1-example-oop.cs +++ b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-oop.cs @@ -38,4 +38,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_triangle-1-example-top-level.cs b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-top-level.cs similarity index 97% rename from public/usage-examples/geometry/point_in_triangle-1-example-top-level.cs rename to public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-top-level.cs index 12147e27d..501ae5584 100644 --- a/public/usage-examples/geometry/point_in_triangle-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example-top-level.cs @@ -30,4 +30,4 @@ DrawText(text, ColorRed(), 100, 100); RefreshScreen(); } -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/point_in_triangle-1-example.cpp b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_in_triangle-1-example.cpp rename to public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.cpp index 29358ca43..b0e1dd6a1 100644 --- a/public/usage-examples/geometry/point_in_triangle-1-example.cpp +++ b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.cpp @@ -35,4 +35,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_in_triangle-1-example.gif b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.gif similarity index 100% rename from public/usage-examples/geometry/point_in_triangle-1-example.gif rename to public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.gif diff --git a/public/usage-examples/geometry/point_in_triangle-1-example.py b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.py similarity index 97% rename from public/usage-examples/geometry/point_in_triangle-1-example.py rename to public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.py index 134885209..45379de84 100644 --- a/public/usage-examples/geometry/point_in_triangle-1-example.py +++ b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.py @@ -25,4 +25,4 @@ draw_text_no_font_no_size(text, color_red(), 100, 100) refresh_screen() -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.txt b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.txt new file mode 100644 index 000000000..914f66656 --- /dev/null +++ b/public/usage-examples/geometry/point_in_triangle/point_in_triangle-1-example.txt @@ -0,0 +1 @@ +Mouse in a Triangle diff --git a/public/usage-examples/geometry/point_on_line-1-example.txt b/public/usage-examples/geometry/point_on_line-1-example.txt deleted file mode 100644 index a3c5fcf31..000000000 --- a/public/usage-examples/geometry/point_on_line-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Mouse Point On Line? \ No newline at end of file diff --git a/public/usage-examples/geometry/point_on_line-2-example.txt b/public/usage-examples/geometry/point_on_line-2-example.txt deleted file mode 100644 index dffa4f23d..000000000 --- a/public/usage-examples/geometry/point_on_line-2-example.txt +++ /dev/null @@ -1 +0,0 @@ -Volume Slider Simulation \ No newline at end of file diff --git a/public/usage-examples/geometry/point_on_line-1-example-oop.cs b/public/usage-examples/geometry/point_on_line/point_on_line-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/point_on_line-1-example-oop.cs rename to public/usage-examples/geometry/point_on_line/point_on_line-1-example-oop.cs index 9eff6f9ba..042cfaa99 100644 --- a/public/usage-examples/geometry/point_on_line-1-example-oop.cs +++ b/public/usage-examples/geometry/point_on_line/point_on_line-1-example-oop.cs @@ -31,4 +31,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_on_line-1-example-top-level.cs b/public/usage-examples/geometry/point_on_line/point_on_line-1-example-top-level.cs similarity index 92% rename from public/usage-examples/geometry/point_on_line-1-example-top-level.cs rename to public/usage-examples/geometry/point_on_line/point_on_line-1-example-top-level.cs index 19ef9185d..f1371fdec 100644 --- a/public/usage-examples/geometry/point_on_line-1-example-top-level.cs +++ b/public/usage-examples/geometry/point_on_line/point_on_line-1-example-top-level.cs @@ -22,4 +22,4 @@ RefreshScreen(); ProcessEvents(); } -CloseWindow(window); \ No newline at end of file +CloseWindow(window); diff --git a/public/usage-examples/geometry/point_on_line-1-example.cpp b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_on_line-1-example.cpp rename to public/usage-examples/geometry/point_on_line/point_on_line-1-example.cpp index 259fbe497..b77a3c25b 100644 --- a/public/usage-examples/geometry/point_on_line-1-example.cpp +++ b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.cpp @@ -26,4 +26,4 @@ int main() close_window(window); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_on_line-1-example.png b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.png similarity index 100% rename from public/usage-examples/geometry/point_on_line-1-example.png rename to public/usage-examples/geometry/point_on_line/point_on_line-1-example.png diff --git a/public/usage-examples/geometry/point_on_line-1-example.py b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.py similarity index 96% rename from public/usage-examples/geometry/point_on_line-1-example.py rename to public/usage-examples/geometry/point_on_line/point_on_line-1-example.py index 1552a5f10..b4b418869 100644 --- a/public/usage-examples/geometry/point_on_line-1-example.py +++ b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.py @@ -18,4 +18,4 @@ refresh_screen() process_events() -close_window(window) \ No newline at end of file +close_window(window) diff --git a/public/usage-examples/geometry/point_on_line/point_on_line-1-example.txt b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.txt new file mode 100644 index 000000000..df3a4f68d --- /dev/null +++ b/public/usage-examples/geometry/point_on_line/point_on_line-1-example.txt @@ -0,0 +1 @@ +Mouse Point On Line? diff --git a/public/usage-examples/geometry/point_on_line-2-example-oop.cs b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example-oop.cs similarity index 97% rename from public/usage-examples/geometry/point_on_line-2-example-oop.cs rename to public/usage-examples/geometry/point_on_line2/point_on_line-2-example-oop.cs index 81c541cc5..3fcb6af9c 100644 --- a/public/usage-examples/geometry/point_on_line-2-example-oop.cs +++ b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example-oop.cs @@ -49,4 +49,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_on_line-2-example-top-level.cs b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example-top-level.cs similarity index 94% rename from public/usage-examples/geometry/point_on_line-2-example-top-level.cs rename to public/usage-examples/geometry/point_on_line2/point_on_line-2-example-top-level.cs index 4841be9ea..07500e631 100644 --- a/public/usage-examples/geometry/point_on_line-2-example-top-level.cs +++ b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example-top-level.cs @@ -41,4 +41,4 @@ DrawText($"Volume: {percent}", ColorBlack(), 200, 450); RefreshScreen(); } -CloseWindow(window); \ No newline at end of file +CloseWindow(window); diff --git a/public/usage-examples/geometry/point_on_line-2-example.cpp b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.cpp similarity index 99% rename from public/usage-examples/geometry/point_on_line-2-example.cpp rename to public/usage-examples/geometry/point_on_line2/point_on_line-2-example.cpp index 66c97b3eb..4a5c57162 100644 --- a/public/usage-examples/geometry/point_on_line-2-example.cpp +++ b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.cpp @@ -45,4 +45,4 @@ int main() close_window(window); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/point_on_line-2-example.gif b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.gif similarity index 100% rename from public/usage-examples/geometry/point_on_line-2-example.gif rename to public/usage-examples/geometry/point_on_line2/point_on_line-2-example.gif diff --git a/public/usage-examples/geometry/point_on_line-2-example.py b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.py similarity index 98% rename from public/usage-examples/geometry/point_on_line-2-example.py rename to public/usage-examples/geometry/point_on_line2/point_on_line-2-example.py index aa5eb8895..d3b235947 100644 --- a/public/usage-examples/geometry/point_on_line-2-example.py +++ b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.py @@ -33,4 +33,4 @@ draw_text_no_font_no_size("Volume: " + str(percent), color_black(), 200, 450) refresh_screen() -close_window(window) \ No newline at end of file +close_window(window) diff --git a/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.txt b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.txt new file mode 100644 index 000000000..9ecce4180 --- /dev/null +++ b/public/usage-examples/geometry/point_on_line2/point_on_line-2-example.txt @@ -0,0 +1 @@ +Volume Slider Simulation diff --git a/public/usage-examples/geometry/point_point_angle-1-example.txt b/public/usage-examples/geometry/point_point_angle-1-example.txt deleted file mode 100644 index 60cc4acd9..000000000 --- a/public/usage-examples/geometry/point_point_angle-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -How Does "Point Point Angle" Work? \ No newline at end of file diff --git a/public/usage-examples/geometry/point_point_distance-1-example.txt b/public/usage-examples/geometry/point_point_distance-1-example.txt deleted file mode 100644 index f6df21760..000000000 --- a/public/usage-examples/geometry/point_point_distance-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Distance To Center \ No newline at end of file diff --git a/public/usage-examples/geometry/point_to_string-1-example.txt b/public/usage-examples/geometry/point_to_string-1-example.txt deleted file mode 100644 index 189516e55..000000000 --- a/public/usage-examples/geometry/point_to_string-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Mouse Click Location \ No newline at end of file diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example.txt b/public/usage-examples/geometry/random_bitmap_point-1-example.txt deleted file mode 100644 index f825c790c..000000000 --- a/public/usage-examples/geometry/random_bitmap_point-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Random Triangles \ No newline at end of file diff --git a/public/usage-examples/geometry/random_window_point-1-example-oop.cs b/public/usage-examples/geometry/random_portals/random_window_point-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/random_window_point-1-example-oop.cs rename to public/usage-examples/geometry/random_portals/random_window_point-1-example-oop.cs index abca7b649..a876c701b 100644 --- a/public/usage-examples/geometry/random_window_point-1-example-oop.cs +++ b/public/usage-examples/geometry/random_portals/random_window_point-1-example-oop.cs @@ -30,4 +30,4 @@ public static void Main() Window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_window_point-1-example-top-level.cs b/public/usage-examples/geometry/random_portals/random_window_point-1-example-top-level.cs similarity index 93% rename from public/usage-examples/geometry/random_window_point-1-example-top-level.cs rename to public/usage-examples/geometry/random_portals/random_window_point-1-example-top-level.cs index db8b95b4d..17c6d2efd 100644 --- a/public/usage-examples/geometry/random_window_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/random_portals/random_window_point-1-example-top-level.cs @@ -22,4 +22,4 @@ RefreshScreen(); Delay(5000); -CloseWindow(Window); \ No newline at end of file +CloseWindow(Window); diff --git a/public/usage-examples/geometry/random_window_point-1-example.cpp b/public/usage-examples/geometry/random_portals/random_window_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/random_window_point-1-example.cpp rename to public/usage-examples/geometry/random_portals/random_window_point-1-example.cpp index 7bb3f01bd..2a03c1540 100644 --- a/public/usage-examples/geometry/random_window_point-1-example.cpp +++ b/public/usage-examples/geometry/random_portals/random_window_point-1-example.cpp @@ -26,4 +26,4 @@ int main() close_window(window); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_window_point-1-example.png b/public/usage-examples/geometry/random_portals/random_window_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/random_window_point-1-example.png rename to public/usage-examples/geometry/random_portals/random_window_point-1-example.png diff --git a/public/usage-examples/geometry/random_window_point-1-example.py b/public/usage-examples/geometry/random_portals/random_window_point-1-example.py similarity index 96% rename from public/usage-examples/geometry/random_window_point-1-example.py rename to public/usage-examples/geometry/random_portals/random_window_point-1-example.py index 2ccac9e84..5f9442be5 100644 --- a/public/usage-examples/geometry/random_window_point-1-example.py +++ b/public/usage-examples/geometry/random_portals/random_window_point-1-example.py @@ -21,4 +21,4 @@ refresh_screen() delay(5000) -close_window(window) \ No newline at end of file +close_window(window) diff --git a/public/usage-examples/geometry/random_window_point-1-example.txt b/public/usage-examples/geometry/random_portals/random_window_point-1-example.txt similarity index 97% rename from public/usage-examples/geometry/random_window_point-1-example.txt rename to public/usage-examples/geometry/random_portals/random_window_point-1-example.txt index 687b5aca4..464c77ad7 100644 --- a/public/usage-examples/geometry/random_window_point-1-example.txt +++ b/public/usage-examples/geometry/random_portals/random_window_point-1-example.txt @@ -2,4 +2,4 @@ Random Portals :::note To test this example code you can download these [**Resources**](/usage-examples/geometry/random_window_point-1-resources.zip). -::: \ No newline at end of file +::: diff --git a/public/usage-examples/geometry/random_window_point-1-resources.zip b/public/usage-examples/geometry/random_portals/random_window_point-1-resources.zip similarity index 100% rename from public/usage-examples/geometry/random_window_point-1-resources.zip rename to public/usage-examples/geometry/random_portals/random_window_point-1-resources.zip diff --git a/public/usage-examples/geometry/random_screen_point-1-example.txt b/public/usage-examples/geometry/random_screen_point-1-example.txt deleted file mode 100644 index 58341a66b..000000000 --- a/public/usage-examples/geometry/random_screen_point-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Stars in the Sky \ No newline at end of file diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example-oop.cs b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-oop.cs similarity index 96% rename from public/usage-examples/geometry/random_bitmap_point-1-example-oop.cs rename to public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-oop.cs index 892c0a644..899aedfe7 100644 --- a/public/usage-examples/geometry/random_bitmap_point-1-example-oop.cs +++ b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-oop.cs @@ -30,4 +30,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example-top-level.cs b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-top-level.cs similarity index 93% rename from public/usage-examples/geometry/random_bitmap_point-1-example-top-level.cs rename to public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-top-level.cs index 5f6986336..5c01e4615 100644 --- a/public/usage-examples/geometry/random_bitmap_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example-top-level.cs @@ -22,4 +22,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example.cpp b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/random_bitmap_point-1-example.cpp rename to public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.cpp index 22468484c..fd026d04a 100644 --- a/public/usage-examples/geometry/random_bitmap_point-1-example.cpp +++ b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.cpp @@ -26,4 +26,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example.png b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/random_bitmap_point-1-example.png rename to public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.png diff --git a/public/usage-examples/geometry/random_bitmap_point-1-example.py b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.py similarity index 96% rename from public/usage-examples/geometry/random_bitmap_point-1-example.py rename to public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.py index 4970ee12a..5aa381f29 100644 --- a/public/usage-examples/geometry/random_bitmap_point-1-example.py +++ b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.py @@ -19,4 +19,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.txt b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.txt new file mode 100644 index 000000000..b696a199d --- /dev/null +++ b/public/usage-examples/geometry/random_triangles/random_bitmap_point-1-example.txt @@ -0,0 +1 @@ +Random Triangles diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example-oop.cs b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example-oop.cs new file mode 100644 index 000000000..0e7475316 --- /dev/null +++ b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example-oop.cs @@ -0,0 +1,25 @@ +using SplashKitSDK; + +namespace RayCircleIntersectDistanceExample +{ + public class Program + { + public static void Main() + { + // set up a ray pointing to the right so the result is easy to predict and verify + Point2D rayOrigin = SplashKit.PointAt(100, 100); + Vector2D rayHeading = SplashKit.VectorTo(1, 0); + + // place the circle directly in the path of the ray so an intersection will happen + Circle targetCircle = SplashKit.CircleAt(250, 100, 50); + + // calculate how far the ray travels before it first touches the circle + double hitDistance = SplashKit.RayCircleIntersectDistance(rayOrigin, rayHeading, targetCircle); + + // print the result so we can clearly see and check the returned distance + SplashKit.Write("Ray hit distance: "); + SplashKit.WriteLine(hitDistance); + } + } +} + diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cpp b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cpp new file mode 100644 index 000000000..f524a6e94 --- /dev/null +++ b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cpp @@ -0,0 +1,22 @@ +#include "splashkit.h" // needed to use SplashKit functions + +int main() // starting point of the program +{ + // set up a ray pointing to the right so the result is easy to predict and verify + point_2d ray_origin = point_at(100, 100); + vector_2d ray_heading = vector_to(1, 0); + + // place the circle directly in the path of the ray so an intersection will happen + circle target_circle = circle_at(250, 100, 50); + + // calculate how far the ray travels before it first touches the circle + double hit_distance = ray_circle_intersect_distance(ray_origin, ray_heading, target_circle); + + // print the result so we can clearly see and check the returned distance + write("Ray hit distance: "); + write_line(hit_distance); + + return 0; +} + + diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cs b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cs new file mode 100644 index 000000000..f9aada2f2 --- /dev/null +++ b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.cs @@ -0,0 +1,16 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +// set up a ray pointing to the right so the result is easy to predict and verify +Point2D rayOrigin = PointAt(100, 100); +Vector2D rayHeading = VectorTo(1, 0); + +// place the circle directly in the path of the ray so an intersection will happen +Circle targetCircle = CircleAt(250, 100, 50); + +// calculate how far the ray travels before it first touches the circle +double hitDistance = RayCircleIntersectDistance(rayOrigin, rayHeading, targetCircle); + +// print the result so we can clearly see and check the returned distance +Write("Ray hit distance: "); +WriteLine(hitDistance); diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.png b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.png new file mode 100644 index 000000000..4a588e21d Binary files /dev/null and b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.png differ diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.py b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.py new file mode 100644 index 000000000..5d5b0abe8 --- /dev/null +++ b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.py @@ -0,0 +1,17 @@ +from splashkit import * # needed to use SplashKit functions + +# set up a ray pointing to the right so the result is easy to predict and verify +ray_origin = point_at(100, 100) +ray_heading = vector_to(1, 0) + +# place the circle directly in the path of the ray so an intersection will happen +target_circle = circle_at(250, 100, 50) + +# calculate how far the ray travels before it first touches the circle +hit_distance = ray_circle_intersect_distance(ray_origin, ray_heading, target_circle) + +# print the result so we can clearly see and check the returned distance +write("Ray hit distance: ") +write_line(hit_distance) + + diff --git a/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.txt b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.txt new file mode 100644 index 000000000..91887cbd0 --- /dev/null +++ b/public/usage-examples/geometry/ray_circle_intersect/ray_circle_intersect_distance-1-example.txt @@ -0,0 +1 @@ +Ray Circle Intersect Distance diff --git a/public/usage-examples/geometry/same_point-1-example.txt b/public/usage-examples/geometry/same_point-1-example.txt deleted file mode 100644 index 5d689316e..000000000 --- a/public/usage-examples/geometry/same_point-1-example.txt +++ /dev/null @@ -1 +0,0 @@ -Point 2D Guessing Game \ No newline at end of file diff --git a/public/usage-examples/geometry/random_screen_point-1-example-oop.cs b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-oop.cs similarity index 95% rename from public/usage-examples/geometry/random_screen_point-1-example-oop.cs rename to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-oop.cs index 7f7032b9b..d0f809c2d 100644 --- a/public/usage-examples/geometry/random_screen_point-1-example-oop.cs +++ b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-oop.cs @@ -24,4 +24,4 @@ public static void Main() window.Close(); } } -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_screen_point-1-example-top-level.cs b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-top-level.cs similarity index 90% rename from public/usage-examples/geometry/random_screen_point-1-example-top-level.cs rename to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-top-level.cs index ad4fab473..99803f3a3 100644 --- a/public/usage-examples/geometry/random_screen_point-1-example-top-level.cs +++ b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example-top-level.cs @@ -16,4 +16,4 @@ RefreshScreen(); Delay(5000); -CloseAllWindows(); \ No newline at end of file +CloseAllWindows(); diff --git a/public/usage-examples/geometry/random_screen_point-1-example.cpp b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.cpp similarity index 99% rename from public/usage-examples/geometry/random_screen_point-1-example.cpp rename to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.cpp index 4e9081a59..b08f4c5bc 100644 --- a/public/usage-examples/geometry/random_screen_point-1-example.cpp +++ b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.cpp @@ -20,4 +20,4 @@ int main() close_all_windows(); return 0; -} \ No newline at end of file +} diff --git a/public/usage-examples/geometry/random_screen_point-1-example.png b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.png similarity index 100% rename from public/usage-examples/geometry/random_screen_point-1-example.png rename to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.png diff --git a/public/usage-examples/geometry/random_screen_point-1-example.py b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.py similarity index 93% rename from public/usage-examples/geometry/random_screen_point-1-example.py rename to public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.py index c251b1f05..e4b8afdfd 100644 --- a/public/usage-examples/geometry/random_screen_point-1-example.py +++ b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.py @@ -13,4 +13,4 @@ refresh_screen() delay(5000) -close_all_windows() \ No newline at end of file +close_all_windows() diff --git a/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.txt b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.txt new file mode 100644 index 000000000..50896a233 --- /dev/null +++ b/public/usage-examples/geometry/stars_in_the_sky/random_screen_point-1-example.txt @@ -0,0 +1 @@ +Stars in the Sky diff --git a/public/usage-examples/physics/boat_buoyancy-1-example-oop.cs b/public/usage-examples/physics/boat_buoyancy-1-example-oop.cs new file mode 100644 index 000000000..d49ea14d0 --- /dev/null +++ b/public/usage-examples/physics/boat_buoyancy-1-example-oop.cs @@ -0,0 +1,113 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +namespace BoatBuoyancyExample +{ + public class Program + { + public static void Main() + { + // This example demonstrates a simple buoyancy simulation. + // The boat first falls because of gravity. + // Once the bottom of the boat goes below the water surface, + // buoyancy pushes it upward based on how deep it is submerged. + // Damping is also used so the boat settles instead of bouncing forever. + + OpenWindow("Boat Buoyancy", 800, 600); + + // Create a bitmap for the boat so the program is self-contained + Bitmap boatBitmap = CreateBitmap("boat_bitmap", 120, 50); + ClearBitmap(boatBitmap, Color.Transparent); + + // Draw a simple boat shape so the motion is easy to see + FillRectangleOnBitmap(boatBitmap, Color.Brown, 10, 20, 100, 20); + FillTriangleOnBitmap(boatBitmap, Color.Red, 20, 20, 60, 0, 100, 20); + + // Create a sprite from the bitmap so it can be moved around the screen + Sprite boat = CreateSprite(boatBitmap); + + // Start the boat well above the water so the falling motion is clearly visible + SpriteSetX(boat, 340); + SpriteSetY(boat, 20); + + // Define the water area + Rectangle waterArea = RectangleFrom(0, 350, 800, 250); + double waterSurface = waterArea.Y; + + // These values are tuned so the boat sinks a little, then rises and settles + double gravityStrength = 0.7; + double dampingStrength = 0.05; + double buoyancyScale = 0.05; + + // Track vertical motion manually + double verticalVelocity = 0; + + while (!QuitRequested()) + { + ProcessEvents(); + + // Gravity always pulls the boat downward + // This makes the boat fall naturally before water begins pushing back + verticalVelocity += gravityStrength; + + // Find the bottom of the boat + // Using the bottom gives a more believable buoyancy trigger than a collision circle + double boatBottom = SpriteY(boat) + SpriteHeight(boat); + + // Only apply buoyancy after the boat has actually gone below the water surface + // This allows the boat to sink slightly first instead of floating too early + if (boatBottom > waterSurface) + { + // Calculate how deep the boat is below the water surface + double submergedDepth = boatBottom - waterSurface; + + // Limit the depth so the upward push does not become unrealistically strong + if (submergedDepth > SpriteHeight(boat)) + { + submergedDepth = SpriteHeight(boat); + } + + // The deeper the boat goes, the stronger the upward buoyancy becomes + double upwardForce = submergedDepth * buoyancyScale; + + // Use VectorFromAngle so the example still demonstrates upward vector creation + Vector2D buoyancy = VectorFromAngle(270, upwardForce); + + // Apply the vertical part of the buoyancy vector + verticalVelocity += buoyancy.Y; + } + + // Damping reduces repeated bouncing and helps the boat stabilise + verticalVelocity *= (1.0 - dampingStrength); + + // Move the boat using the current vertical speed + SpriteSetY(boat, SpriteY(boat) + verticalVelocity); + + ClearScreen(Color.White); + + // Create the water shape as a quad because DrawQuad needs a quad object + Quad waterQuad = QuadFrom( + PointAt(0, 350), + PointAt(800, 350), + PointAt(0, 600), + PointAt(800, 600) + ); + + // Draw the water so it is clear where buoyancy begins + DrawQuad(Color.DeepSkyBlue, waterQuad); + + // Draw the water surface line + DrawLine(Color.Blue, 0, 350, 800, 350); + + // Draw the boat + DrawSprite(boat); + + // Show motion information so the effect is easier to understand + DrawText("Boat falls, sinks slightly, then floats.", Color.Black, 20, 20); + DrawText("Vertical Velocity: " + verticalVelocity, Color.Black, 20, 50); + + RefreshScreen(60); + } + } + } +} \ No newline at end of file diff --git a/public/usage-examples/physics/boat_buoyancy-1-example-top-level.cs b/public/usage-examples/physics/boat_buoyancy-1-example-top-level.cs new file mode 100644 index 000000000..6f46c3a45 --- /dev/null +++ b/public/usage-examples/physics/boat_buoyancy-1-example-top-level.cs @@ -0,0 +1,104 @@ +using SplashKitSDK; +using static SplashKitSDK.SplashKit; + +// This example demonstrates a simple buoyancy simulation. +// The boat first falls because of gravity. +// Once the bottom of the boat goes below the water surface, +// buoyancy pushes it upward based on how deep it is submerged. +// Damping is also used so the boat settles instead of bouncing forever. + +OpenWindow("Boat Buoyancy", 800, 600); + +// Create a bitmap for the boat so the program is self-contained +Bitmap boatBitmap = CreateBitmap("boat_bitmap", 120, 50); +ClearBitmap(boatBitmap, Color.Transparent); + +// Draw a simple boat shape so the motion is easy to see +FillRectangleOnBitmap(boatBitmap, Color.Brown, 10, 20, 100, 20); +FillTriangleOnBitmap(boatBitmap, Color.Red, 20, 20, 60, 0, 100, 20); + +// Create a sprite from the bitmap so it can be moved around the screen +Sprite boat = CreateSprite(boatBitmap); + +// Start the boat well above the water so the falling motion is clearly visible +SpriteSetX(boat, 340); +SpriteSetY(boat, 20); + +// Define the water area +Rectangle waterArea = RectangleFrom(0, 350, 800, 250); +double waterSurface = waterArea.Y; + +// These values are tuned so the boat sinks a little, then rises and settles +double gravityStrength = 0.7; +double dampingStrength = 0.05; +double buoyancyScale = 0.05; + +// Track vertical motion manually +double verticalVelocity = 0; + +while (!QuitRequested()) +{ + ProcessEvents(); + + // Gravity always pulls the boat downward + // This makes the boat fall naturally before water begins pushing back + verticalVelocity += gravityStrength; + + // Find the bottom of the boat + // Using the bottom gives a more believable buoyancy trigger than a collision circle + double boatBottom = SpriteY(boat) + SpriteHeight(boat); + + // Only apply buoyancy after the boat has actually gone below the water surface + // This allows the boat to sink slightly first instead of floating too early + if (boatBottom > waterSurface) + { + // Calculate how deep the boat is below the water surface + double submergedDepth = boatBottom - waterSurface; + + // Limit the depth so the upward push does not become unrealistically strong + if (submergedDepth > SpriteHeight(boat)) + { + submergedDepth = SpriteHeight(boat); + } + + // The deeper the boat goes, the stronger the upward buoyancy becomes + double upwardForce = submergedDepth * buoyancyScale; + + // Use VectorFromAngle so the example still demonstrates upward vector creation + Vector2D buoyancy = VectorFromAngle(270, upwardForce); + + // Apply the vertical part of the buoyancy vector + verticalVelocity += buoyancy.Y; + } + + // Damping reduces repeated bouncing and helps the boat stabilise + verticalVelocity *= (1.0 - dampingStrength); + + // Move the boat using the current vertical speed + SpriteSetY(boat, SpriteY(boat) + verticalVelocity); + + ClearScreen(Color.White); + + // Create the water shape as a quad because DrawQuad needs a quad object + Quad waterQuad = QuadFrom( + PointAt(0, 350), + PointAt(800, 350), + PointAt(0, 600), + PointAt(800, 600) + ); + + // Draw the water so it is clear where buoyancy begins + DrawQuad(Color.DeepSkyBlue, waterQuad); + + // Draw the water surface line + DrawLine(Color.Blue, 0, 350, 800, 350); + + // Draw the boat + DrawSprite(boat); + + // Show motion information so the effect is easier to understand + DrawText("Boat falls, sinks slightly, then floats.", Color.Black, 20, 20); + DrawText("Vertical Velocity: " + verticalVelocity, Color.Black, 20, 50); + + RefreshScreen(60); +} \ No newline at end of file diff --git a/public/usage-examples/physics/boat_buoyancy-1-example.cpp b/public/usage-examples/physics/boat_buoyancy-1-example.cpp new file mode 100644 index 000000000..3c1e6443d --- /dev/null +++ b/public/usage-examples/physics/boat_buoyancy-1-example.cpp @@ -0,0 +1,108 @@ +#include "splashkit.h" + +// This example demonstrates a simple buoyancy simulation. +// The boat first falls because of gravity. +// Once the bottom of the boat goes below the water surface, +// buoyancy pushes it upward based on how deep it is submerged. +// Damping is also used so the boat settles instead of bouncing forever. + +int main() +{ + open_window("Boat Buoyancy", 800, 600); + + // Create a bitmap for the boat so the program is self-contained + bitmap boat_bitmap = create_bitmap("boat_bitmap", 120, 50); + clear_bitmap(boat_bitmap, COLOR_TRANSPARENT); + + // Draw a simple boat shape so the motion is easy to see + fill_rectangle_on_bitmap(boat_bitmap, COLOR_BROWN, 10, 20, 100, 20); + fill_triangle_on_bitmap(boat_bitmap, COLOR_RED, 20, 20, 60, 0, 100, 20); + + // Create a sprite from the bitmap so it can be moved around the screen + sprite boat = create_sprite(boat_bitmap); + + // Start the boat well above the water so the falling motion is clearly visible + sprite_set_x(boat, 340); + sprite_set_y(boat, 20); + + // Define the water area + rectangle water_area = rectangle_from(0, 350, 800, 250); + double water_surface = water_area.y; + + // These values are tuned so the boat sinks a little, then rises and settles + double gravity_strength = 0.7; + double damping_strength = 0.03; + double buoyancy_scale = 0.05; + + // Track vertical motion manually + double vertical_velocity = 0; + + while (!quit_requested()) + { + process_events(); + + // Gravity always pulls the boat downward + // This makes the boat fall naturally before water begins pushing back + vertical_velocity += gravity_strength; + + // Find the bottom of the boat + // Using the bottom gives a more believable buoyancy trigger than a collision circle + double boat_bottom = sprite_y(boat) + sprite_height(boat); + + // Only apply buoyancy after the boat has actually gone below the water surface + // This allows the boat to sink slightly first instead of floating too early + if (boat_bottom > water_surface) + { + // Calculate how deep the boat is below the water surface + double submerged_depth = boat_bottom - water_surface; + + // Limit the depth so the upward push does not become unrealistically strong + if (submerged_depth > sprite_height(boat)) + { + submerged_depth = sprite_height(boat); + } + + // The deeper the boat goes, the stronger the upward buoyancy becomes + double upward_force = submerged_depth * buoyancy_scale; + + // Use vector_from_angle so the example still demonstrates upward vector creation + vector_2d buoyancy = vector_from_angle(270, upward_force); + + // Apply the vertical part of the buoyancy vector + vertical_velocity += buoyancy.y; + } + + // Damping reduces repeated bouncing and helps the boat stabilise + vertical_velocity *= (1.0 - damping_strength); + + // Move the boat using the current vertical speed + sprite_set_y(boat, sprite_y(boat) + vertical_velocity); + + clear_screen(COLOR_WHITE); + + // Create the water shape as a quad because draw_quad needs a quad object + quad water_quad = quad_from( + point_at(0, 350), + point_at(800, 350), + point_at(0, 600), + point_at(800, 600) + ); + + // Draw the water so it is clear where buoyancy begins + draw_quad(COLOR_DEEP_SKY_BLUE, water_quad); + + // Draw the water surface line + draw_line(COLOR_BLUE, 0, 350, 800, 350); + + // Draw the boat + draw_sprite(boat); + + // Show motion information so the effect is easier to understand + draw_text("Boat falls, sinks slightly, then floats.", COLOR_BLACK, 20, 20); + draw_text("Vertical Velocity: " + std::to_string(vertical_velocity), COLOR_BLACK, 20, 50); + + refresh_screen(60); + } + + return 0; +} \ No newline at end of file diff --git a/public/usage-examples/physics/boat_buoyancy-1-example.gif b/public/usage-examples/physics/boat_buoyancy-1-example.gif new file mode 100644 index 000000000..95ef236b2 Binary files /dev/null and b/public/usage-examples/physics/boat_buoyancy-1-example.gif differ diff --git a/public/usage-examples/physics/boat_buoyancy-1-example.py b/public/usage-examples/physics/boat_buoyancy-1-example.py new file mode 100644 index 000000000..084b90bc5 --- /dev/null +++ b/public/usage-examples/physics/boat_buoyancy-1-example.py @@ -0,0 +1,97 @@ +from splashkit import * + +# This example demonstrates a simple buoyancy simulation. +# The boat first falls because of gravity. +# Once the bottom of the boat goes below the water surface, +# buoyancy pushes it upward based on how deep it is submerged. +# Damping is also used so the boat settles instead of bouncing forever. + +open_window("Boat Buoyancy", 800, 600) + +# Create a bitmap for the boat so the program is self-contained +boat_bitmap = create_bitmap("boat_bitmap", 120, 50) +clear_bitmap(boat_bitmap, COLOR_TRANSPARENT) + +# Draw a simple boat shape so the motion is easy to see +fill_rectangle_on_bitmap(boat_bitmap, COLOR_BROWN, 10, 20, 100, 20) +fill_triangle_on_bitmap(boat_bitmap, COLOR_RED, 20, 20, 60, 0, 100, 20) + +# Create a sprite from the bitmap so it can be moved around the screen +boat = create_sprite(boat_bitmap) + +# Start the boat well above the water so the falling motion is clearly visible +sprite_set_x(boat, 340) +sprite_set_y(boat, 20) + +# Define the water area +water_area = rectangle_from(0, 350, 800, 250) +water_surface = water_area.y + +# These values are tuned so the boat sinks a little, then rises and settles +gravity_strength = 0.7 +damping_strength = 0.05 +buoyancy_scale = 0.05 + +# Track vertical motion manually +vertical_velocity = 0 + +while not quit_requested(): + process_events() + + # Gravity always pulls the boat downward + # This makes the boat fall naturally before water begins pushing back + vertical_velocity += gravity_strength + + # Find the bottom of the boat + # Using the bottom gives a more believable buoyancy trigger than a collision circle + boat_bottom = sprite_y(boat) + sprite_height(boat) + + # Only apply buoyancy after the boat has actually gone below the water surface + # This allows the boat to sink slightly first instead of floating too early + if boat_bottom > water_surface: + # Calculate how deep the boat is below the water surface + submerged_depth = boat_bottom - water_surface + + # Limit the depth so the upward push does not become unrealistically strong + if submerged_depth > sprite_height(boat): + submerged_depth = sprite_height(boat) + + # The deeper the boat goes, the stronger the upward buoyancy becomes + upward_force = submerged_depth * buoyancy_scale + + # Use vector_from_angle so the example still demonstrates upward vector creation + buoyancy = vector_from_angle(270, upward_force) + + # Apply the vertical part of the buoyancy vector + vertical_velocity += buoyancy.y + + # Damping reduces repeated bouncing and helps the boat stabilise + vertical_velocity *= (1.0 - damping_strength) + + # Move the boat using the current vertical speed + sprite_set_y(boat, sprite_y(boat) + vertical_velocity) + + clear_screen(COLOR_WHITE) + + # Create the water shape as a quad because draw_quad needs a quad object + water_quad = quad_from( + point_at(0, 350), + point_at(800, 350), + point_at(0, 600), + point_at(800, 600) + ) + + # Draw the water so it is clear where buoyancy begins + draw_quad(COLOR_DEEP_SKY_BLUE, water_quad) + + # Draw the water surface line + draw_line(COLOR_BLUE, 0, 350, 800, 350) + + # Draw the boat + draw_sprite(boat) + + # Show motion information so the effect is easier to understand + draw_text("Boat falls, sinks slightly, then floats.", COLOR_BLACK, 20, 20) + draw_text("Vertical Velocity: " + str(vertical_velocity), COLOR_BLACK, 20, 50) + + refresh_screen(60) \ No newline at end of file diff --git a/public/usage-examples/physics/boat_buoyancy-1-example.txt b/public/usage-examples/physics/boat_buoyancy-1-example.txt new file mode 100644 index 000000000..747e30a02 --- /dev/null +++ b/public/usage-examples/physics/boat_buoyancy-1-example.txt @@ -0,0 +1 @@ +Floating with Buoyancy