The Research Team:
Alexei Sourin
Lei Wei (PhD project: 2006 - currently)
Contributed researchers:
Qi Liu (PhD project: 2004 -
2007)
Konstantin Levinski
(MSc/PhD project: 2001-2007)
Lai
Feng Min (MEng project, 2000-2002)
Current Research grant: NRF IDM grant NRF2008IDM-IDM004-002 "Visual and Haptic Rendering in Co-Space", S$1,248,000, 2008-2011
Last time updated 07 October, 2009
VIHAMAT: Visual Immersive Haptic Mathematics (beta testing)
Function-based extension of VRML and X3D (FVRML/FX3D) allows for extending VRML and its successor X3D with practically any type of object’s geometry and sophisticated graphics appearances by defining the object’s geometry, appearance (color and 3D texture) and transformations with analytical formulas which are implicit, explicit and parametric representations used concurrently. Static and time-dependent shapes and operations can be defined. In contrast to the polygon-based models of VRML/X3D, function-based nodes greatly reduce the size of the models and provide an unlimited level of detail. Also, these nodes allow for using set-theoretic as well as any analytically-defined geometric operations which can be introduced by the user. FVRML/FX3D allows for its extending with any proprietary function-based models. The extension is developed for collaborative shape modeling as well as for building shared virtual worlds.
The following plug-ins work with MS Internet Explorer and Mozilla Firefox.
1. Install Blaxxun Contact. After installation of Blaxxun Contact, install on top of it BS Contact VRML/X3D.
2. Click to install the FVRML/FX3D plug-in ( Version 5.1, Release
1 October 2009).
Please always have the most recent version installed.
Make sure you selected Hardware support and DirectX7 in Setting/Preferences in the options menu of the VRML browser.
If upgrading to IE7:
First, install the IE7 upgrade plug-in.
Next, reinstall
Blaxxun
Contact,
BS Contact VRML/X3D, and
FVRML/FX3D plug-in.
Finally, in IE7 in
Tools/Internet Options/Advanced click at
Restore Advanced
Settings and in
Tools/Internet Options/Security click at
Reset All Zones
to Default Level.
Please report bugs to assourin@ntu.edu.sg
Function-based extension of VRML—FVRML—allows for extending VRML with practically any type of object’s geometry, sophisticated graphics appearance and transformation by defining them analytically straight in the VRML code. In contrast to the polygon-based models of VRML, function-based nodes allow for a great reduction of the model sizes and provide an unlimited level of detail. Also, these nodes introduce to VRML set-theoretic as well as any other operations analytically-defined by the user.
For defining geometry, appearance and their transformations, three types of functions can be used concurrently. They are implicit, explicit and parametric functions.
Implicit functions are f(x,y,z,t)=0, where x, y, z are Cartesian coordinates and t is the time. The function equals to zero for the points located on the surface of a shape.
Explicit functions are g=f(x,y,z,t). The function value g evaluated at any point of the 3d space can be used either as an argument of other functions (e.g. for defining colors or parameters of transformations) or as an indicator of the sampled point location. Thus, explicit functions can be used for defining bounded solid objects. In this case, the function equals to zero for the points located on the surface of a shape. Positive values indicate points inside the shape and negative values are for the points outside the shape.
Parametric functions define surfaces and solid objects as:
x= f1(u,v,w,t); y= f2(u,v,w,t); z= f3(u,v,w,t) where x, y, z are Cartesian coordinates of the points, while u, v and w are parametric coordinates, and t is the time. Parametric functions can also define r, g, b values of color or parameters of transformations.
Geometry, 3D texture, and color can be defined by implicit, explicit or parametric functions in their own domains and then merged together into one shape by the predefined mapping functions. When modeling shape, first a geometric texture is mapped onto the original shape’s geometry, and then the color is mapped to the textured shape to form the final shape. This process repeats as many times as needed.
Defining complex shapes, appearances and operations usually assumes using multiple formulas and temporary variables. This requires a script-like mathematical language. To be consistent with VRML, which has a JavaScript (VRMLScript) as a standard feature, and to ease the learning curve, FVRML emulates a subset of JavaScipt. In this JavaScript emulation, all variables, arrays and constants have only one type float. The following mathematical functions are implemented: abs(x), sqrt(x), exp(x), log(x), sin(x), cos(x), tan(x), acos(x), asin(x), atan(x), ceil(x), floor(x), round(x), max(x,y), min(x,y), atan2(y,x), mod(x,y), cosh(x), sinh(x), tanh(x), log10(x). There are also three operators ‘&’, ‘|’ and ‘^’, which denote set-theoretic ‘intersection’, ‘union’, and ‘power’ operations, respectively. Custom functions can be defined in the same way as defining a function in JavaScript. Recursions are allowed. There are also the following flow control operators: for-loops, while-loops, do-while-loops, break, continue, and if-else.
When writing function scripts, implicit and explicit functions have to be named ‘frep’. Parametric functions for shapes and geometric textures have to be named ‘parametric_x’, ‘parametric_y’, and ‘parametric_z’, and for colors—‘parametric_r’, ‘parametric_g’, and ‘parametric_b’. If all these functions exist concurrently, frep function will have priority.
FVRML offers six additional nodes, which are FShape, FGeometry, FAppearance, FMaterial, FTexture3D and FTransform. These nodes can be used together as well as with the standard VRML nodes. The nodes' prototypes are here.
FShape node is a container similar to the VRML’s Shape node. It contains FGeometry or any standard geometry node, and FAppearance or the standard Appearance node. These nodes define the geometry and the appearance of the shape, respectively. FShape may be called from FTransform node of from the standard Transform node.
FGeometry node is designed to define a geometry using implicit, explicit or parametric functions. It contains either one string, or a script defining a function representing the geometry, or a URL to the function definition.
FAppearance node may contain FMaterial or the standard Material, the standard Texture node, and FTexture3D node. FTexture3D defines geometric textures while the standard Texture node is used for image texture mapping.
FMaterial node defines diffuse, specular, and emissive colors, as well as transparency, ambient intensity, and shininess with parametric and explicit functions. Parametric functions directly define color values r, g, b. When the color is defined with an explicit function, its values are linearly mapped to the r, g, b values of the actual color with a user-defined color interpolation map.
FTexture3D node defines 3D geometric textures using explicit and parametric functions. These functions define displacements of the original shape’s geometry defined in FGeometry or in any standard geometry node. The functions are defined either in one string, or in a function script, or via a URL to the function definition.
If the standard Geometry node is used in place of FGeometry node, the standard shapes of VRML will be assigned an appearance defined in FAppearance node. This ability of using the function-based nodes with the standard geometry and appearance nodes of VRML adds many new features to VRML, some of which are illustrated in this chapter.
FTransform node contains function-defined operations. It may contain FShape and other FTransform nodes as its children. FTransform contains either one string, or a script defining a function representing the operation, or a URL to the function definition as well as other fields to preserve the consistency with the standard Transform node. Both, set-theoretic and affine transformations can be defined as functions of time in FTransform node.
In the following examples, different ways of using implicit, explicit and parametric functions for defining the shape's geometry and appearance are used. Click at the images to see the VRML scene. Right click to save the .wrl file.
Parametric Metamorphoses:
Parameters of the FVRML fields:
|
definition “f(x,y,z,t)“ or definition" frep(x,y,z,t){ function script; return frep(x,y,z,t);}” or definition” x= x(u,v,w,t); y= y(u,v,w,t); z= z(u,v,w,t);” or
definition” function script; return x(u,v,w,t);} function parametric_y(u,v,w,t){ function script; return y(u,v,w,t);} function parametric_z(u,v,w,t){ function script; return z(u,v,w,t);}” |
In this field analytical
definition of the shape's geometry
or geometric texture has to be defined.
It can be given either as individual implicit or parametric formulas or as a
function script. The names of Cartesian
coordinates are |
|
parameters [p1 p2 p3 p4 p5 p6]
Default: parameters [-1 1 -1 -1 1] |
It defines parameters' range for u, v, w and
continuity of the predefined set-theoretic operations. Default values
for u, v, w are -1 1, and the continuity is 0. If the
continuity equals to 0, the set-theoretic operations are implemented with
min/max functions (as in Chapter 3). If the continuity is greater than
0, they are implemented with the so-called |
|
bboxCenter x y z Default: bboxCenter 0 0 0 |
It defines the origin of the coordinate system of the implicitly/explicitly defined surface. |
|
bboxSize x y z Default: bboxSize 10 10 10 |
It defines the size of the bounding box, and thus the range of variables x, y, z for the implicitly/explicitly defined shape. |
|
resolution [x y z] Default: resolution [50 50 50] |
It defines the rendering resolution. There must be 3 values for solid shapes, 2 values for parametric surfaces, and 1 value for parametric curves. |
|
diffuseColor ”frep(x,y,z,t)” or diffuseColor ” frep(x,y,z,t){ function script; return frep(x,y,z,t);}” or diffuseColor ” r=r(u,v,w,t); g=g(u,v,w,t); b=b(u,v,w,t);” or diffuseColor ” function parametric_r(u,v,w,t){ function script; return r(u,v,w,t);} function parametric_g(u,v,w,t){ function script; return g(u,v,w,t);} function parametric_b(u,v,w,t){ function script; return b(u,v,w,t);}” |
In this field the function definition of the shape's diffuse color is to be given. It can be typed either as individual explicit or parametric formulas or as a function script. Cartesian coordinates are x, y, z, while the names of parametric coordinates are u, v, w. Ranges of the variables can be defined in parameters, bboxCenter, and bboxSize fields. Parameter t is the time. The formulae can be also called by a URL. In case if the color is defined by an explicit function, color interpolation will be done using the values defined in fields patternKey and patternColor. |
|
emissiveColor ”frep(t)” or emissiveColor ” frep(t){ function script; return frep(t);}” or emissiveColor ” r=r(t); g=g(t); b=b(t);” or emissiveColor ” function parametric_r(t){ function script; return r(t);} function parametric_g(t){ function script; return g(t);} function parametric_b(t){ function script; return b(t);}” |
It defines a time-dependent emissive color by an explicit function or script. In case of color definition by one explicit function, color interpolation will be done by the current pattern. Parameter t is the time. The formulae can be also called by a URL. The emissive color is assigned to the whole shape and cannot vary across it. In case if the color is defined by an explicit function, color interpolation will be done using the values defined in fields patternKey and patternColor. |
|
specularColor ”frep(t)” or specularColor ” frep(t){ function script; return frep(t);}” or specularColor ” r=r(t); g=g(t); b=b(t);” or specularColor ” function parametric_r(t){ function script; return r(t);} function parametric_g(t){ function script; return g(t);} function parametric_b(t){ function script; return b(t);}” |
It defines a time-dependent specular color by an explicit function or script. In case of color definition by one explicit function, color interpolation will be done by the current pattern. Parameter t is the time. The formulae can be also called by a URL. The specular color is assigned to the whole shape and cannot vary across it. In case if the color is defined by an explicit function, color interpolation will be done using the values defined in fields patternKey and patternColor. |
|
ambientIntensity “frep(t)” |
It defines a time-dependent ambient intensity by an explicit function or script. The ambient intensity is assigned to the whole shape and cannot vary across it. |
|
shininess “frep(t)” |
It defines a time-dependent shininess by an explicit function or script. The shininess is assigned to the whole shape and cannot vary across it. |
|
transparency “frep(t)” |
It defines a time-dependent transparency by an explicit function or script. The transparency is assigned to the whole shape and cannot vary across it. |
|
patternKey [a1 a2 a3 … an] |
It defines the values of the explicit diffuseColor, emissiveColor or specularColor function or script which will be used for mapping to patternColor. |
|
patternColor [r1 g1 b1 r2 g2 b2 … rn gn bn] |
It defines the colors which will be used for interpolating the color defined by an explicit diffuseColor, emissiveColor or specularColor function or script based on the current patternKey. Linear interpolation of colors will be done. |
|
g=...; patternValue(g); |
The function is used in scripts to generate colors defined by patternKey and patternColor. |
|
translation “x=x(t); y=y(t); z=z(t);” |
It defines translation parameters by explicit functions or scripts. |
|
scale “x=x(t); y=y(t); z=z(t);” |
It defines scaling parameters by explicit functions or scripts. |
|
rotation “x=x(t); y=y(t); z=z(t); a=a(t);” |
It defines rotation parameters by explicit functions or scripts. |
|
center “x=x(t); y=y(t); z=z(t);” |
It specifies a function-defined translation offset from the origin of the local coordinate system (0, 0, 0). |
|
scaleOrientation “x=x(t); y=y(t); z=z(t); a=a(t);” |
It specifies a function-defined rotation of the coordinate system before the scale (to specify scales in arbitrary orientations). |
|
operation “union | intersection | difference” or operation “ frep(f,g,t){ function script; return frep(f,g,t);}”
Default: operation “union” parameters [0] |
In this field either a name of the predefined set-theoretic operation or an individual formula or script defining a set-theoretic operation on shapes defined by functions f(x,y,z,t) and g(x,y,z,t) have to be typed. The respective FShapes are to be defined as children of FTransform node. Set-theoretic operations do not apply to parametrically defined shapes. |
|
timeSpan t1 t2
Default: timeSpan 0 1 |
It defines a time interval of variable t when defining a time-dependent process (shape's geometry, color, texture or transformation). Variables t1 and t2 can take any real values including negative. |
|
startTime t Default: startTime 0 |
It defines the values of time to start a time-dependent process. |
|
stopTime t Default: stopTime 0 |
It defines the values of time to stop a time-dependent process. |
|
cycleInterval t Default: cycleInterval 1 |
It defines the duration of the time-dependent process cycle in sec. |
|
frames n Default: frames 0 |
It defines the number of frames to be cached. If 0 is defined, rendering time-dependent processes will be performed on the fly. |
|
loop TRUE|FALSE Default: loop FALSE |
It enables or disables looping of time-dependent processes. |
|
enabled TRUE|FALSE Default: enabled TRUE |
It enables or disables time-dependent processes. |
| trilinear(x,y,z,size_x,size_y,size_z,’filename’) | This function is provided to support 8-bit raw CT/MRI data. Parameter x, y, and z represents the coordinates of the point to be evaluated. Parameter size_x, size_y and size_z indicates the dimension of the CT/MRI data. Parameter filename is a string, representing the volume data file. When the filename is a relative file name, it is a file relative to the C:/Program Files/FuncNodes/Processor directory of the plug-in. When the filename is an absolute file name, it reads the absolute file directly. When the filename is an URL of http, https or ftp, the function reads the file from the network according to the URL. |
| nurbs |
Besides function scripts and analytical formulae, NURBS surface can also be defined in FVRML. When defining NURBS surface, the ‘type’ field in FGeometry should be set as ‘nurbs’. In the ‘definition’ field, write the definition of the NURBS surface. The definition of the NURBS surface is formatted as the follows: ‘uOrder <uOrder> vOrder <vOrder> uDimension <n> vDimension <m> uKnots [<uKnot1> <uKnot2> .. <uKnot n>] vKnots [<vKnot1> <vKnot2> .. <vKnot m>] controlPoint [<Point1_x> <Point1_y> <Point1_z> <Point2_x> <Point2_y> <Point2_z> .. <Point m*n_x> <Point m*n_y> <Point m*n_z>] weight [<Weight1> <Weight2> .. <Weight m*n>]’ uDimension and vDimension define the number of control points in the u and v dimensions. uOrder and vOrder define the order of surface. uKnots and vKnots define the knot vectors. controlPoint defines a set of control points of dimension uDimension * vDimension. This set of points defines a mesh similar to the grid of a ElevationGrid whereas the points do not have a uniform spacing. Depending on the weight-values and the order this hull is approximated by the resulting surface. #uDimension points define a polyline in u-direction followed by further u-polylines with the v-parameter in ascending order. The number of control points must be equal or greater than the order. A closed NURBS surface can be specified by repeating the limiting control points. The control vertex corresponding to the control point P[i, j] on the control grid is : P[i,j].x = controlPoints[i + ( j × uDimension)].x P[i,j].y = controlPoints[i + ( j × uDimension)].y P[i,j].z = controlPoints[i + ( j × uDimension)].z P[i,j].w = weight[ i + (j × uDimension)] where 0 <= i < uDimension and 0 <= j < vDimension. |
Preserving backward compatibility with FVRML, in function-based extension of X3D there are six concrete node types FShape, FGeometry, FAppearance, FMaterial, FTexture3D, and FTransform and one abstract node type X3DFunctionChildNode. The existing models designed using FVRML can be upgraded to FX3D with minimum efforts.
FShape node is designed to associate a function-defined geometry and a function-defined appearance, which is quite similar to Shape node. FShape may be used as a child of a function-defined operation, which results in the implementation of X3DFunctionChildNode.
FGeometry node is designed to define a geometry using any type of functions—implicit, explicit or parametric.
FAppearance node represents function-defined material, function-defined 3D geometric texture, and other regular appearance components (2D/3D image texture, texture transformation, etc.).
FMaterial node contains color information of a shape, including the function definitions used to describe the diffuse color.
FTexture3D stores function definitions of a 3D geometric texture, such as vertex displacements.
FTransform defines affine transformations (i.e. translation, rotation, and scaling) as well as set-theoretic operations on function-defined shapes.
The detailed definitions of the function-based node types can be seen in FX3D.x3d.
If BS Contact VRML/X3D is used, make sure to deselect "resolve external XML resources" in Settings/Preferences/General.
For users of Xj3D, download fx3d.jar and copy it to the Xj3D root directory.
This application requires BOTH blaxxun Contact and BS Contact VRML/X3D to be installed. It works only with MS Internet Explorer. Make sure you have installed the most recent version of the FVRML plug-in. This project is in progress, and the tool is constantly on construction.
After you installed the software, try it in any of the following Virtual Collaborative Shape Modeling Laboratories:
Room 1, Room 2, Room 3, Room 4, Room 5
NEW: Interactive web-based modeling tool
for individual (non-collaborative) work.
This is a beta version. Please
report problems to
assourin@ntu.edu.sg
Additional functions:
1. You are able to display the coordinate system and bounding box
2. Background color can be changed with command background: r,g,b
3. A library of geometric shapes can be used
This software tool is developed to help computer graphics students with understanding of function-based shape modeling concepts.
The visitors may modify a shape by defining its geometry and color either parametrically or with implicit and explicit functions. There are just a few easy to use commands, which the visitors can type in the chat box of the browser and and immediately see how the shape changes. The software will filter out the shape-modeling commands from other chat messages and process them accordingly. The function description of the current shape can be displayed in a separate console window (Right-click, Settings/Console), and it can be saved for future use. If there are any error messages, they will be displayed in the Console window as well.
Implicitly defined shapes can be also defined interactively by adding and removing material which is borrowed from the current tool. Any tool shape can be defined by implicit function. Before it is applied, the tool can be scaled, rotated and displaced with reference to the shape's surface.
The interactive commands have practically the same syntax as the respective FVRML/FX3D fields.
|
shape: f(x,y,z,t) |
FRep definition of the shape's geometry. x,y,z are Cartesian
coordinates. Parameter t is the time which is used for defining
time-dependent shapes. For time-dependent shapes animation loop must be
enabled by loop:true |
|
shape: x=x(u,v,w,t); y=y(u,v,w,t); z=z(u,v,w,t); |
Parametric definition of the shape's geometry. |
|
color: f(x,y,z,t) |
FRep definition of the shape's color. Color
interpolation will be done by the current pattern. |
|
color: r=r(u,v,w,t); g=g(u,v,w,t); b=b(u,v,w,t); |
Parametric definition of the shape's color. |
|
texture: f(x,y,z,t) |
FRep definition of the shape's 3D texture. Example: texture: 0.03*sin(4*pi*x)*sin(4*pi*y)*sin(4*pi*z) |
|
texture: x=x(u,v,w,t); y=y(u,v,w,t); z=z(u,v,w,t); |
Parametric definition of the shape's 3D texture. Example: texture: x=0.1*sin(4*pi*u)*sin(4*pi*v)*sin(4*pi*w)*u/sqrt(u*u+v*v+w*w); y=0.1*sin(4*pi*u)*sin(4*pi*v)*sin(4*pi*w)*v/sqrt(u*u+v*v+w*w); z=0.1*sin(4*pi*u)*sin(4*pi*v)*sin(4*pi*w)*w/sqrt(u*u+v*v+w*w); |
|
parameters: p1, p2, p3, p4, p5, p6 |
Defines parameters' range for u,v,w and continuity of
set-theoretic operations & and |. |
|
patterncolor: r1,g1,b1,r2,g2,b2,r3,g3,b3...... |
Defines the colors which will be used for interpolating the FRep color based on the current patternkey. Example: patterncolor:1,0,0,0,1,0,0,0,1 |
|
patternkey: a,b,c,d,e,f...... |
Defines values of the FRep color function which will be
used when linking to patterncolor. |
|
bboxcenter: a,b,c |
Defines the origin of the coordinate system of the FRep
shape. |
|
bboxsize: a,b,c |
Defines the size of the bounding box, and thus the range of variable x,y,z for the FRep defined shape. Example: bboxsize: 10,10,10 - with the centre at 0,0,0 it will define the range -5 to 5. Deault: bboxSize: 2.5 2.5 2.5 |
|
resolution: a,b,c |
Defines the polygonization resolution. There must be 3 values for FRep shapes and 2 values for parametric shapes. Example: resolution: 75,75,75. Default: resolution: 100, 100, 100 |
|
cycleinterval: t |
Duration of the animation cycle in sec. Default: cycleinterval: 1 For displaying animation the animation loop must be enabled by loop:true |
|
geometrytimespan: t1,t2 |
Time interval of variable t when defining the shape's geometry. Default: geometrytimespan: 0,1 For time-dependent shapes animation loop must be enabled by loop:true |
|
colortimespan: t1,t2 |
Time interval of variable t when defining the shape's color. Default: colortimespan:0,1 For time-dependent colors animation loop must be enabled by loop:true |
|
texturetimespan: t1,t2 |
Time interval of variable t when defining the shape's texture. Default: texturetimespan:0,1 For time-dependent textures animation loop must be enabled by loop:true |
|
refresh |
This command can be used after parameters or bboxsize are changed to re-render the shape. |
| loop | This command toggles animation. Options: TRUE or FALSE. Default: loop: FALSE. Note that when implicit functions are used, the animated shapes can slow down the rendering since their polygonization is performed on the fly. |
|
export |
Displays the VRML code for the current shape in the console window, which can be called by right-clicking on the scene and then by selecting Settings/Console. If you want to make a.wrl file defining this shape, just copy and paste the code displayed in the Console window to the end of fshape.wrl |
| exportx3d | Displays the X3D code for the current shape in the console window, which can be called by right-clicking on the scene and then by selecting Settings/Console. If you want to make a .x3d file defining this shape, just copy and paste the code displayed in the Console window to the end of fshape.x3d |
| save | Displays the function that can be saved for further editing. The function can be loaded in the interactive panel. |
|
# |
Command separator. Can be used for typing several commands
in one line. |
| polygonizer: name | polygonizer:analytical is for defining surfaces (default option) while polygonizer: analytical_curve is for defining curves. |
| reset | resets geometry and appearance |
+, - , *, /, ^, &, |
acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, tan,
tanh, sqrt, ceil, floor, range, min, max
^ Power. E.g. x^3
stands for x*x*x
& Set-theoretic
"AND". The continuity of this function can be defined in parameters.
| Set-theoretic
"OR". The continuity of this function can be defined in parameters.
range When a>b
and a<c, range(a,b,c)=1,
otherwise, range(a,b,c)=0. This function is only provided for
FRep shapes.
shape: 1-x^2-y^2-z^2
shape: 1-x^4-y^4-z^4
shape: (1-x^4-y^4-z^4)&x
shape: (1-x^4-y^4-z^4)&x&(0.1-x)
shape: x=cos(u*pi); y=sin(u*pi)*cos(v*pi); z=sin(u*pi)*sin(v*pi);
shape:
x=cos(u*pi)*((sin(0.5*v*pi))^3);y=sin(u*pi)*((sin(0.5*v*pi))^3);z=cos(0.5*v*pi);
shape: x = 0.15*(4*cos(v*pi)-cos(4*v*pi)); y =
0.15*cos(u*pi)*(6+4*sin(v*pi)-sin(4*v*pi));z =
0.15*sin(u*pi)*(6+4*sin(v*pi)-sin(4*v*pi));
color: 1-x^2-y^2-z^2
color: r=1; g=0.5; b=0;
color: r=(u+1)/2;
shape: (1-x*x-y*y-z*z)&(-((-x+z)&y&z))#color: sqrt(x*x+y*y+z*z)+0.01*(sin(12*atan2(x,z+0.04*sin(y*25)))-0.7)#patterncolor: 0.4,0,0,1,0,0,1,1,1,0,1,0,0,0.2,0#patternkey:0,0.8,0.96,0.98,1#texture:0
shape:-((2*z^2+x^2+y^2-1)^3-(0.1*z^2+x^2)*y^3)#color:sqrt(x*x+y*y+z*z)#parameters:0#bboxSize:3,3,3#bboxCenter:0,0,0#patternKey:0,1.5#patternColor:0,0.5,0,1,0,0#resolution:100, 100,100#texture:0
parameters:-3.141,3.141,-3.141,3.141,-1,1#shape: x=(0.3*sin(10*(u+v))+1)*cos(u);y=(0.3*sin(10*(u+v))+1)*sin(u)*cos(v);z=(0.3*sin(10*(u+v))+1)*sin(u)*sin(v);#color:sqrt(x*x+y*y+z*z)#patterncolor:0,1,0,1,0,0#patternkey:0.7,1.3#texture:0
shape:x=0.2*(1-0.3*sin(v*5*pi))*cos(v*pi)*(4+cos(u*pi));y=0.2*(1-0.3*sin(v*5*pi))*sin(v*pi)*(4+cos(u*pi));z=0.2*sin(u*pi);#texture:0.2*0.1*(sin(10*pi*x)*sin(10*pi*y)+sin(10*pi*x)*sin(10*pi*z)+sin(10*pi*y)*sin(10*pi*z))
This part of the extension is developed for exchanging through Internet the shapes interactively created in the project Interactive Function-based Shape Modeling. The plug-in includes the polygonizer specially developed for rendering these models. This Polygonizer is capable of a quick visualization of very complicated FRep shapes. This plug-in illustrates the extensibility of our approach where any function-defined models can be used as a part of a VRML scene.
See the example of VRML scene with with the function-defined shapes modeled with the tools from http://www3.ntu.edu.sg/home/assourin/Intshape.html. For some of the models, double-resolution is used for rendering so that when the object or observer is moving, coarse resolution is used for rendering, and when it comes at rest, fine resolution is used.
VIHAMAT: Visual Immersive Haptic Mathematics
In this new project, we expand our considerations to three components of the objects in shared virtual spaces: geometry, visual appearance, and tangible physical properties, which we define separately by implicit, explicit or parametric functions and then merge together into one shape. We define visual appearance properties as 3D colors and geometric textures which are applied to underlying geometry. Tangible physical properties are defined as surface properties (friction and tension), as well as inner density and forces associated with the underlying geometry. We can also touch and feel surfaces of X3D and VRML objects as well as convert them to solid tangible objects.
We add new FShape and FTransform nodes. The FShape node, in turn, contains other 10 nodes (FGeometry, FAppearance, FMaterial, FTexture3D, FPhysics, FSurface, FFriction, FTension, FDensity, FForce) in the same way how the standard Shape node is organized. These nodes can be used alone as well as with some VRML and X3D standard nodes (Fig. 4).
The FShape node is a container for the FGeometry or any standard geometry node, and the FAppearance or the standard Appearance node. These nodes define the geometry and the appearance of the shape, respectively.
The FGeometry node is designed to define a geometry using functions typed straight in the code or stored in binary libraries.
The FAppearance node may contain the FMaterial or the standard X3D Material nodes, as well as the standard color Texture and the function-based FTexture3D nodes. In the FMaterial node, the components of the illumination model are defined using functions. The FTexture3D node contains a displacement function for the geometry defined in the FGeometry node.
The FPhysics node is used for defining physical properties associated with the shape’s geometry. The FPhysics contains the FSurface, FDensity and FForse nodes.
The FSurface node defines surface physical properties. It includes FFriction and FTension nodes. The FFriction node is used for defining friction on the surface which can be examined by moving a haptic device actuator by the surface. The FTension node defines the force which has to be applied to the haptic actuator to penetrate the surface of the object. The surface friction and tension are defined by explicit functions of coordinates x, y, z and the time t. Hence, the surface friction and tension can vary on different parts of the surface.
The FDensity node is used for defining material density of the shape. It can be examined by moving a haptic device actuator inside the visible or invisible boundary of the shape. The density is defined by explicit functions of coordinates x, y, z and the time t, and hence it can vary within the volume of the shape. The surface of the shape can be made non-tangible, while the shape still might have density inside it to define some amorphous or liquid shapes without distinct boundaries.
The FForce node is used for defining a force field associated with the geometry of the shape. The force vector at each point of the space is defined by 3 functions of its x, y, and z components and the time t. The force can be felt by placing the haptic device actuator into the area where the force field is defined. Moving the actuator within the density and the force fields will produce a combined haptic effect.
The FShape node may be called from the FTransform node or from the standard Transform node. The FTranform node defines affine transformation which can be functions of time, as well as any other operations over the function-defined shapes. These are predefined set-theoretic (Boolean) intersection, union, difference, as well as any other function-defined set-theoretic and any other operations, e.g. r-functions, shape morphing, etc.
The software is undergoing a closed beta testing now. Please email assourin@ntu.edu.sg if you want to be a tester. The plug-in to BS Contact VRML/X3D is fully compatible with FVRML/X3D and requires one of the haptic devices from Sensable (e.g. OMNI, Desktop, Premium 1.5/6DOF) with OpenHaptics toolkit installed.
Phantom OMNI
Phantom Desktop
Here is a streaming video and a few examples of the VRML scenes with tangible physical properties.
![]() |
|
![]() |
![]() |
![]() |
|
Feeling home |
Stirring virtual water |
Being a ball |
Touching atoms |
Gone by the wind |
Another video illustrates haptic collaboration in a shared scene
Selected Publications:
Weil L, Sourin A, Stocker H. Collaboration in 3D Shared Spaces using X3D and VRML. In Proc. 2009 Int. Conf. on Cyberworlds, Bradford, 7-11 Sept, 2009. pp. 36-42, 2009.
Ugail H, Castro GG, Sourin A, Sourina O. Towards a Definition of Virtual Objects with Partial Differential Equations. In Proc. 2009 Int. Conf. on Cyberworlds, Bradford, 7-11 Sept, 2009. pp. 138-145 ,2009.
Wei L, Sourin A, Stocker H. Function-based haptic collaboration in X3D. Web3D 2009, 16-17 June, Darmstadt, Germany, 2009. pp. 15-23
Sourin A, Weil L. Visual Immersive Haptic Rendering on the Web. 7th ACM SIGGRAPH International Conference on Virtual-Reality Continuum and its Applications in Industry, VRCAI 2008, 8-9 December 2008
Sourin A, Sourina O, Wei L, Gagnon P. Visual Immersive Haptic Mathematics in Shared Virtual Spaces. Transactions on Computational Science III, LNCS5300, Springer, LNCS Volume 5300/2009, pp 1-19, 2009
Wei L, Sourin A, Sourina O. Function-based Visualization and Haptic Rendering in Shared Virtual Spaces, The Visual Computer, Springer, 24(10):871-880, 2008.
Wei L, Sourin A, Sourina O. Function-based Haptic Interaction in Cyberworlds. Proc. 2007 International Conference on Cyberworlds, 24-27 October, Hannover, IEEE CS, pp.225-232, 2007.
Qi Liu and Alexei Sourin, Function-defined Shape Metamorphoses in Visual Cyberworlds. The Visual Computer, Springer, 2006;22(12):977-990.
Qi Liu and Alexei Sourin, Function-based Shape Modeling and Visualization in X3D, Proc ACM Web3D 2006, pp. 131-141, 2006.
Qi Liu and Alexei Sourin, Function-based Shape Modelling Extension of the Virtual Reality Modelling Language, Elsevier Computers & Graphics, 2006, 30:4, 629-645.
Qi Liu and Alexei Sourin, Function-defined Shape Metamorphoses in VRML, ACM Graphite'05, 29 November-2 December 2005, Dunedin, New Zealand, ACM, 339-346.
Qi Liu and Alexei Sourin, Function-based Time-dependent Shape Modeling on the Web, 2005 International Conference on Cyberworlds, 23-25 November, Singapore, IEEE CS, 35-42.
Alexei Sourin, Computer Graphics. From a Small Formula to Cyberworlds, Prentice Hall, Singapore, ISBN 9810675518, 362 pages, 2005.
Qi Liu and Alexei Sourin, Function-based Representation of Complex Geometry and Appearance, Proc ACM Web3d 2005, 123-134.
Alexei Sourin, Computer Graphics. From a Small Formula to Virtual Worlds, Prentice Hall, Singapore, ISBN 981-244-743-1, 280 pages, 2004.
A.Sourin, K.Levinski, Qi Liu, Virtual Campus--It is Fun and Educational, Proceedings of MAAP 2004, Singapore, 27-28 October, 2004.
Qi Liu, Alexei Sourin, Analytically-defined Collaborative Shape Modeling in VRML, 2004 International Conference on Cyberworlds, Tokyo, 18-20 November, 2004, 70-77.
Alexei Sourin, Lai Feng Min, Konstantin Levinski, Web Visualization of Function-Defined Shapes, Lecture Notes in Computer Science, LNCS, Springer-Verlag Heidelberg, ISSN: 0302-9743, Volume 2669/2003, 428-437, 2003.
Lai Feng Min, Alexei Sourin, Konstantin Levinski, "Function-based 3D web visualization", 2002 International Symposium Cyber Worlds: Theory and Practice 2002, Tokyo, Japan 6-8 November, 2002, 428-435.
Lai Feng Min, Alexei Sourin, "Function-defined shape node for VRML", Eurographics 2002, Short Presentations, ISSN 1017-4565, 207-215, 2002.
Copyright
2001-2006 Lai F.M, Lei. W., Levinski K., Liu Q., Sourin A.
This material may not be published, modified or otherwise
redistributed in whole or part without prior approval.