-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
Summary
Running below code in MATLAB web-desktop generates a blank figure:
%% Example 1: High-Resolution Sphere
% Creates a sphere with ~500K faces and ~1M vertices
fprintf('Creating high-resolution sphere...\n');
% Create a very fine sphere
n_subdivisions = 512; % High resolution
[x_sphere, y_sphere, z_sphere] = sphere(n_subdivisions);
% Convert to vertices
vertices_sphere = [x_sphere(:), y_sphere(:), z_sphere(:)];
% Create quad faces for sphere
faces_sphere = [];
for i = 1:n_subdivisions
for j = 1:n_subdivisions
% Current vertex indices
v1 = (i-1)*(n_subdivisions+1) + j;
v2 = (i-1)*(n_subdivisions+1) + j + 1;
v3 = i*(n_subdivisions+1) + j + 1;
v4 = i*(n_subdivisions+1) + j;
% Skip if we're at the boundary
if v1 <= size(vertices_sphere,1) && v2 <= size(vertices_sphere,1) && ...
v3 <= size(vertices_sphere,1) && v4 <= size(vertices_sphere,1)
faces_sphere = [faces_sphere; v1, v2, v3, v4];
end
end
end
fprintf('Sphere: %d vertices, %d faces\n', size(vertices_sphere,1), size(faces_sphere,1));
figure;
p = patch('Faces', faces_sphere, 'Vertices', vertices_sphere);
Error message similar to the below is seen in the terminal:
Traceback (most recent call last): File "...\matlab_proxy\app.py", line 621, in wsforward raise ValueError(f"Unexpected message type: {msg}") ValueError: Unexpected message type: WSMessage(type=<WSMsgType.ERROR: 258>, data=WebSocketError(<WSCloseCode.MESSAGE_TOO_BIG: 1009>, 'Message size 6000000 exceeds limit 4194304'), extra=None)