Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
CHARLEY GIESE
CHARLEY GIESE le 8 Mar 2022
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.

Réponses (1)

Pavan Sahith
Pavan Sahith le 7 Nov 2023
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.

Community Treasure Hunt

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

Start Hunting!

Translated by