Highlighting nodes on an Icosahedron plotted function
6 views (last 30 days)
Show older comments
Hi all,
The title says it all, I'm currently plotting a icosahedron with an inscribed sphere. I have a list of known vertices and plot using the patch function. I'm having trouble highlight the nodes/vertices of the icosohedron to make them more bold and appear as large dots. I've been trying the 'highlight function' but have had no luck in achieving my goal.
Thanks in advance!
...
function [v,f] = icosahedron()
%Returns 12 vertex and 20 face values.
t = (1+sqrt(5)) / 2; %this is the golden ratio (phi)
% create vertices(12 total)
v = [-1, t, 0;
1, t, 0;
-1,-t, 0;
1,-t, 0;
0,-1, t;
0, 1, t;
0,-1,-t;
0, 1,-t;
t, 0,-1;
t, 0, 1;
-t, 0,-1;
-t, 0, 1];
...
function plotSphere(cax,f,v)
if ~ishold(cax)
end
grid minor
patch('Faces',f,'Vertices',v,'facecolor','none','facealpha',0.2,'edgecolor'...
,'r','CData',v(:,3),'Parent',cax,'Tag','Icosphere');
title('Subdivisons n=0')
hold on
[x,y,z] = sphere();
r = 1;with an
surf( r*x, r*y, r*z,'facecolor',[0 0 0], 'edgecolor','none' )
alpha 0.35
view(3)
end
0 Comments
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!