Code covered by the BSD License  

Highlights from
Cassini Ovals

Be the first to rate this file! 11 Downloads (last 30 days) File Size: 1.87 KB File ID: #39622
image thumbnail

Cassini Ovals



Plot Cassini Ovals in Parametric Form

| Watch this File

File Information

Cassini Oval is a curve that was developed by Giovanni Domenico Cassini in 1680. He had believed that the motion of the Earth and Sun followed a lobe of one of these ovals. This function plots Cassini Ovals with Polar Parametrization as described in :

Required Products MATLAB
MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
24 Mar 2013 Ioannis Filippidis

Thank you for this code.

Please note that "close all" is not expected by a user from within a function. Plotting in a specific figure/axes object can be accomplished instead by explicitly opening one and passing the handle to "plot":
fig = figure;
ax = axes('Parent', fig);
plot(ax, ...)

Also "hold on" is interfering with the current settings by the user, if this function is called to add a curve to an existing figure. It would be better to first get the current hold state (if an axes object handle is passed as argument), then change it to "on" in order to add the curve and finally restore it to its original state:

The function would benefit if it had arguments, so that the user can plot whichever Cassini curve they prefer.
If arguments are included, then the help text can be more explicit about how the function is used.
Referring to a link for the help text is not the usual practice.

Note also that the provided link is broken.

As a demonstration alternative, the function could plot several curves as it does now, if no arguments are provided, otherwise plot the curve prescribed by the arguments.

Contact us