VARKON Version 1.15 1997-10-24


sur_usrdef - Geometric procedure

Creates a surface

Description

A low level routine for the definition of a surface.

Input data is given as attributes to three parts.

The attributes to the first part are surface header data. Ex: Number of patches
The attributes to the second part are topolological data Ex: Type of patch
The attributes to the third part are geometrical patch data. Ex: Bezier polygon points


Syntax

SUR_USRDEF (sur_id, tree_id, head_name, top_name, geo_name );

REF sur_id;
REF tree_id;
STRING head_name;
STRING top_name
STRING geo_name


Principal parameters

sur_id - Local identity
tree_id - Sub-tree (part) with input data. Whole active module for #0
head_name - Name of part with header data as attributes
top_name - Name of part with topological data as attributes
geo_name - Name of part with geometrical data as attributes


The header, topological and geometric data shall be "registered" as parts with names head_name, top_name and geo_name. The attributes will be different for different surface and patch types.

head_name ( head_id, npatu, npatv, sur_type);

REF head_id; - Local identity
INT npatu; - Number of patches in U direction
INT npatv; - Number of patches in V direction
INT sur_type; - Surface type (CUB_SUR, LFT_SUR, NURBS, ..... )


top_name(top_id, t_case, iu, iv, pat_typ, us, ue, vs, ve );

REF top_id; - Local identity
INT t_case; - Case Eq. 1: iu and iv is defined

Eq. 2: pat_type also defined
Eq. 3: us, ue, vs, ve also defined        

INT iu; - Patch address in U direction (iu= 1, 2, 3, ....., or npatu)
INT iv; - Patch address in V direction (iv= 1, 2, 3, ....., or npatv)


Optional parameters

INT pat_type; - Patch type
FLOAT us; - Start local U value
FLOAT uv; - End local U value
FLOAT vs; - Start local V value
FLOAT ve; - End local V value



geo_name ( geo_id, g_case, iu, iv, pat_type,
g_case= 1: a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23, a30, a31, a32, a33);
g_case= 2: r00, r10, r01, r11, tu00, tu10, tu01, tu11, tv00, tv10, tv01, tv11, tw00, tw10, tw01, tw11);
g_case=3: ............. Bezier (not yet implemented ......

REF geo_id; - Local identity
INT g_case; - Input
   g_case= 1 for pat_type CUB_PAT: Algebraic
   g_case= 2 for pat_type CUB_PAT: Geometric
   g_case= 3 for pat_type CUB_PAT: Bezier
INT iu; - Patch address in U direction
INT i_v; - Patch address in V direction
INT pat_type; - Patch type


CUB_SUR algebraic
VECTOR a00; - Coefficient for ( 1.0 * 1.0 )
VECTOR a01; - Coefficient for ( 1.0 * V )
VECTOR a02; - Coefficient for ( 1.0 * V**2 )
VECTOR a03; - Coefficient for ( 1.0 * V**3 )
VECTOR a10; - Coefficient for ( U * 1.0 )
VECTOR a11; - Coefficient for ( U * V )
VECTOR a12; - Coefficient for ( U * V**2 )
VECTOR a13; - Coefficient for ( U * V**3 )
VECTOR a20; - Coefficient for ( U**2 * 1.0 )
VECTOR a21; - Coefficient for ( U**2 * V )
VECTOR a22 - Coefficient for ( U**2 * V**2 )
VECTOR a23; - Coefficient for ( U**2 * V**3 )
VECTOR a30; - Coefficient for ( U**3 * 1.0 )
VECTOR a31; - Coefficient for ( U**3 * V )
VECTOR a32; - Coefficient for ( U**3 * V**2 )
VECTOR a33; - Coefficient for ( U**3 * V**3 )



CUB_SUR geometric
VECTOR r00; - Corner point u= 0.0 v= 0.0
VECTOR r10; - Corner point u= 1.0 v= 0.0
VECTOR r01; - Corner point u= 0.0 v= 1.0
VECTOR r11; - Corner point u= 1.0 v= 1.0
VECTOR tu00; - U tangent u= 0.0 v= 0.0
VECTOR tu10; - U tangent u= 1.0 v= 0.0
VECTOR tu01; - U tangent u= 0.0 v= 1.0
VECTOR tu11; - U tangent u= 1.0 v= 1.0
VECTOR tv00; - V tangent u= 0.0 v= 0.0
VECTOR tv10; - V tangent u= 1.0 v= 0.0
VECTOR tv01 - V tangent u= 0.0 v= 1.0
VECTOR tv11; - V tangent u= 1.0 v= 1.0
VECTOR tw00; - Twist vector u= 0.0 v= 0.0
VECTOR tw10; - Twist vector u= 1.0 v= 0.0
VECTOR tw01; - Twist vector u= 0.0 v= 1.0
VECTOR tw11; - Twist vector u= 1.0 v= 1.0



Attributes

PEN - Pen or colour number
LEVEL - Level number
BLANK - Visible(0) or invisible(1)


Example

! Module for the creation of a CUB_SUR surface with one planar patch

! Header data npatu=1, npatv= 1, sur_type= 1
PART(#2, reghead ( 1, 1, 1 ));

! Topological data t_case=1 , iu= 1, iv=1
PART (#3, regtop ( 1, 1, 1 ));

! Points and vectors for surface
r00 := VEC(0,0,0);
r10 := VEC(100,100,0);
r01 := ....
tu00 := r10 - r00;
.
.

! Geometrical data g_case= 2, iu= 1, iu=1, pat_type= 1
PART(#4, regcub ( 2, 1, 1, 1,
r00, r10, r01, r11, tu00, tu10, tu01, tu11, tv00, tv10, tv01, tv11, tw00, tw10, tw01, tw11));

! Create surface
SUR_USRDEF(#1, "reghead", "regtop", "regcub" );


VARKON Homepage Index