フィルターのクリア

Is it possible to use known data to apply a gradient to 3d shape?

1 回表示 (過去 30 日間)
CHARLEY GIESE
CHARLEY GIESE 2022 年 3 月 8 日
回答済み: Pavan Sahith 2023 年 11 月 7 日
Hello,
I have a thermal gradient that was measured via a cone calorimeter and I am currently trying to find a way to use this known data to show the gradient on a simple 3d model (just an 83x83x25.8 box). Is it possible for Matlab to do this? I've been looking for awhile and have not found any functions that seem to apply to this situation.

回答 (1 件)

Pavan Sahith
Pavan Sahith 2023 年 11 月 7 日
Hello Charley,
I understand that you have a thermal gradient and want to use this known data to show the gradient on a simple 3d model.
It is possible to visualize the thermal gradient on a 3D model using MATLAB. One way to do this is by using the patch function to create a 3D box and then using the scatter3 function to plot the temperature values at the appropriate locations within the box.
Please refer to this sample code with some example data
% Generate random temperature data
temp = rand(83, 83, 26) * 100;
% Define the coordinates of the box
x = linspace(0, 1, 83);
y = linspace(0, 1, 83);
z = linspace(0, 25.8, 26);
[X, Y, Z] = meshgrid(x, y, z);
% Create the 3D box
figure
box = patch(isosurface(X, Y, Z, temp, 50));
set(box, 'FaceColor', 'red', 'EdgeColor', 'none');
view(3);
% Add temperature values to the box
hold on
scatter3(X(:), Y(:), Z(:), 10, temp(:), 'filled');
colorbar
Please refer to this MathWorks documentation.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by