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_round_rectangle page
bht_round_rectangle page
Biohydrodynamics Toolbox    

bht_round_rectangle


Define a rectangle-shaped boundary.

Syntax

y = bht_round_rectangle(t,der,settings)

Description

This function defines a rectangle-shaped boundary as a parameterized closed line 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 points' coordinates 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 input variable settings is a row vector with six elements: 
  • The rectangle is centered at the point of coordinates settings(1:2).
  •  Its width is 2*settings(3) and its height is 2*settings(4).
  •  Since boundaries have to be twice continuously differentiable lines within BhT, the rectangle's corners are smoothed. Thus, settings(5) has to be within ]0,1] and is the smoothing parameter.
  • settings(6) is a flag (-1 or 1) for the orientation of the boundary: 1 means that the boundary has a counterclockwise orientation and -1 a clockwise orientation.

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