Jump to content
TUFLOW FV
Jesper Nielsen

Visualise model bathymetry in 3D

Recommended Posts

It is quite easy to generate a fancy looking 3D image of your model bathymetry like the one in the attached image using the mybathy.m function and Matlab's various different lighting options.

By using the "bounds" input you can trim down the model thus making it more manageable when zooming, rotating and panning in 3D.

 

Example:

% create the fvcontrol object (if you are not going to add any other fvg objects then you could just create a figure)

fvcObj = fvgraphics;

% create the axes into which to plot your bathymetry.

ax = axes;

% use the DataAspectRatio property to scale the elevations with respect to the x-y plane.

set(ax,'DataAspectRatio',[1 1 0.1])

% set(ax,'DataAspectRatio',[1 1 10000]) % Something more like this will be required when your model is in spherical coordinates

% plot the bathymetry within the rectangle defined by 4 points

h = mybathy(ax,'mymodel.nc','bounds',[x1 y1; x2 y2; x3 y3; x4 y4]);

% manually adjust the view angle using the pan, zoom and rotate 3D icons in the figure tool bar

% apply some lighting (see matlab help doc)

lighting phong

camlight right

post-15-0-37031900-1410847392_thumb.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...