Here is a possible way to draw a cup in Matlab using the plot() and fill() functions:
main.m397 chars16 lines
This code creates a cup with a given radius (r), height (h), and thickness (t). It then defines the x and y coordinates of the cup shape, and plots it using plot(). The inside of the cup is filled using fill(), and a handle is added as another fill shape. The result is shown below:

gistlibby LogSnag