painting specific points in sunflower stracture
13 views (last 30 days)
Show older comments
Hi!
I have this sunflower structure and in need to paint one point in red and the neighbors in another color.
phi = (sqrt(5)-1)/2;
n = 500;
rho = (5:n-1).^phi;
theta = (5:n-1)*2*pi*phi;
polar(theta, rho, '.');
title([num2str(n) ' Sunflower Seeds']);
set(gcf, 'color', 'w');
How I can do it?
5 Comments
Image Analyst
on 1 Dec 2019
I was wondering that myself. Maybe he meant randi() to get the random index from the list of points he already has in (theta, rho) list of coordinates. Like
randomIndex = randi(length(theta), 1);
randomTheta = theta(randomIndex);
randomRho = rho(randomIndex);
Answers (1)
See Also
Categories
Find more on Historical Contests 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!