% Script for a custom "Delaunay-like" disc with quadrant coloring
clc % Clear the command window
close all % Close all open figures
figure % Create a new figure
axis equal off % Set equal aspect ratio and turn off axes ticks/labels
hold on % Hold the current plot so we can draw multiple shapes
n = 50; % Declaring the value of n (outermost radius)
% Define a high number of points for smooth arcs
num_points_per_quad = 100;
% Loop from the largest radius (n) down to 1
for k = n:-1:1
% --- Define Angles for Each Quadrant ---
theta_q1 = linspace(0, pi/2, num_points_per_quad); % Q1: 0 to 90 degrees
theta_q2 = linspace(pi/2, pi, num_points_per_quad); % Q2: 90 to 180 degrees
theta_q3 = linspace(pi, 3*pi/2, num_points_per_quad); % Q3: 180 to 270 degrees
theta_q4 = linspace(3*pi/2, 2*pi, num_points_per_quad); % Q4: 270 to 360 degrees
% --- Generate Coordinates for Each Quadrant's Arc ---
x_q1_arc = k * cos(theta_q1);
y_q1_arc = k * sin(theta_q1);
x_q2_arc = k * cos(theta_q2);
y_q2_arc = k * sin(theta_q2);
x_q3_arc = k * cos(theta_q3);
y_q3_arc = k * sin(theta_q3);
x_q4_arc = k * cos(theta_q4);
y_q4_arc = k * sin(theta_q4);
% --- Fill Each Quadrant with a NEW Random Color ---
% For each fill, we create a closed polygon by combining the arc points with the origin (0,0)
% Quadrant 1 (Top-Right)
fill([x_q1_arc, 0], [y_q1_arc, 0], rand(1,3)); % rand(1,3) generates a new random color for R, G, B
% Quadrant 2 (Top-Left)
fill([x_q2_arc, 0], [y_q2_arc, 0], rand(1,3));
% Quadrant 3 (Bottom-Left)
fill([x_q3_arc, 0], [y_q3_arc, 0], rand(1,3));
% Quadrant 4 (Bottom-Right)
fill([x_q4_arc, 0], [y_q4_arc, 0], rand(1,3));
end
title('Delaunays Disc (Quadrant-Colored)'); % Updated title for clarity
hold off % Release the plot to prevent further additions
shg % Show the figure (bring to front)



