Navigation: Scripting Reference Manual > Functions & Subroutines > SetSurfDeform

 

SetSurfDeform

 

Contact Us: fredsupport@photonengr.com

 

Description

Deforms a base surface according to a specific deform surface definition.

 

Syntax

SetSurfDeform n, bEnable, nDefNode, dScale, bInBaseCoordSys

 

Parameters

n As Long

Node number of base surface.

 

bEnable As Boolean

Flag to turn deformation on or off.

 

nDefNode As Long

Node number of surface used as deformation.

 

dScale As Double

Scales the amplitude of the deform surface.

 

bInBaseCoordSys As Boolean

Flag indicating whether deformation is applied in the coordinate system of the base surface (True) or in the global coodinate system (False).

 

Remarks

Deforms a base surface according to a specific deform surface definition.

 

Mathematically, deformations are implemented by shifting the zeros of the base surface's function. Let fb(x,y,z) = 0 define the base surface and fd(x,y,z) = 0 define the deforming surface.  Further, assume that the deforming surface is defined as a height map along z (e.g, fd(x,y,z) = z - gd(x,y) ).  This is the "sagability" assumption. FRED doesn't enforce this, but it will generally print a warning to the output window when it detects a deformer that's not "sagable". When the deformation is applied to the base surface, the resulting combined surface is defined by (ignoring coordinate system transformations):

0 = f(x,y,z) = fb( x, y, z - A*gd(x,y) ) = fb( x, y, A*fd(x,y,z) - (A-1)*z )

... where A is the deformation scale factor (this scales the deforming surface's height).

 

See Also

SetSurfDeformFlag

GetSurfDeform

GetSurfDeformFlag

GetSurfDeformSurf

GetSurfDeformScale

GetSurfDeformInBaseCoordSysFlag

Examples

Surfaces

 

 

 

 

 

 

Copyright © Photon Engineering, LLC