Effacer les filtres
Effacer les filtres

Draw a gradient circle within a circle

5 vues (au cours des 30 derniers jours)
Sajjad Ahmad Khan
Sajjad Ahmad Khan le 19 Juin 2021
Commenté : Matt J le 20 Juin 2021
I want to code a gradient circle within a circle like shown in the diagram. Any help will be appreciated.

Réponse acceptée

Matt J
Matt J le 19 Juin 2021
Modifié(e) : Matt J le 19 Juin 2021
One way might be to use a patch with vertex interpolation, as in this example.
EDIT:
Here's how you might apply that to a circle:
t=linspace(0,360,500); t(end)=[];
x=cosd(t);
y=sind(t);
c=cosd(t);
patch(x,y,c); colormap(gray); axis equal; caxis([-0.7970 ,0.6373])
  15 commentaires
Sajjad Ahmad Khan
Sajjad Ahmad Khan le 20 Juin 2021
@Matt J Thank you so much. I appreciate your help!
Matt J
Matt J le 20 Juin 2021
You're quite welcome, but please Accept-click the answer if you consider the question resolved.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by