on 28 Oct 2022
% Scheherazade : A green speckled breed of pumpkin
% Or maybe a tall acorn squash?
% This particular breed is tall and stays green with a hint of yellow
% inside the ridges.
% Several pumpkin breeds with speckles have a different color in
% the dents than on the ridges. To start off, set the CData of the
% surface to be == distance from center iff the pumpkin were round.
% Thus, c is for round (inclusive of ridges) and we squish it into
% a pumpkin shape below in the Z component of the surf call.
% To add speckles, add scaled random noise which will only be
% visible near the boundary of the two colors.
% Stem, recycling the sphere coords from above.
% Use a discreet colormap so that we can simulate speckles.
colormap([1 .7 .1
.3 .4 .2])
axis equal off
% Setup lighting parameters.
% lighting g % Not enough chars.
material([.6 1 .3])