Code covered by the BSD License  

Highlights from
Biohydrodynamics Toolbox

image thumbnail
from Biohydrodynamics Toolbox by Alexandre Munnier
Tool to simulate easily the motion of moving solids or swimming robots in a potential fluid flow.

bht_ellipse page
bht_ellipse page
Biohydrodynamics Toolbox    

bht_ellipse


Define an ellipse-shaped boundary.

Syntax

y = bht_ellipse(t,der,settings)

Description

This function is used to define an ellipse-shaped boundary as a counterclockwise oriented closed line, parameterized over [0,2*pi[. The input variable t (the parameter) is a vector with all of its elements within [0,2*pi[. 
The function returns, depending on the flag der:
    • der = 0: the coordinates of the points corresponding to the parameter t.
    • der = 1: the coordinates of the tangent vectors (the first derivative of the parameterization).
    • der = 2: the second derivative of the parameterization.
The last input variable, settings, is a row vector with five elements: 
  • settings(1:2): the coordinates of the ellipse's center.
  • settings(3:4): semi-major and semi-minor axis' lengths.
  • settings(5)   : a flag (-1 or 1) for the orientation of the boundary:
    • 1 means counterclockwise orientation.
    • -1 means clockwise orientation.
We recall that if the ellipse is a link of an articulated body, it must be centered at the origin. if not, the boundary will be automatically shifted when compiling the DAT-File.

See also:

Fluid's boundaries
bht_boundary_check
2008 - A. Munnier and B. Pincon (Insitut Elie Cartan and INRIA Lorraine, Projet CORIDA, Nancy, France).       

Contact us at files@mathworks.com