MATLAB fimplicit3 in MATLAB®
Learn how to make 4 fimplicit3 charts in MATLAB, then publish them to the Web with Plotly.
Plot 3-D Implicit Function
Plot the hyperboloid x2+y2-z2=0 over the default interval of [-5,5] for x, y, and z.
f = @(x,y,z) x.^2 + y.^2 - z.^2; fimplicit3(f) fig2plotly()
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_0_0_plot_3_d_implicit_function_ssim_map.png)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_0_0_plot_3_d_implicit_function_montage.png)
Specify Plotting Interval
Plot the upper half of the hyperboloid x2+y2-z2=0 by specifying the plotting interval as [0 5] for z. For x and y, use the default interval [-5 5]
.
f = @(x,y,z) x.^2 + y.^2 - z.^2; interval = [-5 5 -5 5 0 5]; fimplicit3(f,interval) fig2plotly()
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_1_0_specify_plotting_interval_ssim_map.png)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_1_0_specify_plotting_interval_montage.png)
Modify Appearance of Implicit Surface
Plot the implicit surface x2+y2-z2=0. Remove the lines by setting the EdgeColor
property to 'none'
. Add transparency by setting the FaceAlpha
property to a value between 0 and 1.
f = @(x,y,z) x.^2 + y.^2 - z.^2; fimplicit3(f,'EdgeColor','none','FaceAlpha',.5) fig2plotly()
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_2_0_modify_appearance_of_implicit_surface_ssim_map.png)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_2_0_modify_appearance_of_implicit_surface_montage.png)
Modify Implicit Surface After Creation
Plot an implicit surface and assign the implicit surface object to the variable fs
.
f = @(x,y,z) 1./x.^2 - 1./y.^2 + 1./z.^2; fs = fimplicit3(f)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_3_0_modify_implicit_surface_after_creation_ERROR_CRASH__ssim_map.png)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_3_0_modify_implicit_surface_after_creation_ERROR_CRASH__montage.png)
fs =
ImplicitFunctionSurface with properties:
Function: @(x,y,z)1./x.^2-1./y.^2+1./z.^2
EdgeColor: [0 0 0]
LineStyle: '-'
FaceColor: 'interp'
Show all properties
fs.XRange = [0 5];
fs.EdgeColor = 'none';
fs.FaceAlpha = 0.8;
fig2plotly()
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_3_1_modify_implicit_surface_after_creation_ERROR_CRASH__ssim_map.png)
![](https://raw.githubusercontent.com/plotly/ssim_baselines/main/out_matlab/matlab/code-examples/surface-and-mesh-plots/fimplicit3/plot_3_1_modify_implicit_surface_after_creation_ERROR_CRASH__montage.png)