Need a 3D graph? Try the 3DSurface Viewer! Draw 3D graphs with free calculus software from Bright Ideas Software.
Program the Viewer
  Skip Navigation Links
Math ToolsExpand Math Tools
DevelopersExpand Developers
About BISExpand About BIS
  Skip Navigation LinksHome --> Developers --> Program the Viewer Search:
OpenGL® and OpenGL|ES are trademarks of Silicon Graphics, Inc.





Programming the 3DSurface Viewer

The 3DSurface Viewer is a free ActiveX™ component. A design-time license is also available free of charge, enabling developers to incorporate the component into their own projects. (See License Info for restrictions on use/reuse.) 3DSurface Viewer implements the COM interfaces necessary for it to be hosted by the following application suites:

  • Office 2000
  • Office XP
  • Office 2003
  • Office 2007

It is possible that other applications can successfully host the Viewer, but only these have been tested. Programming is accomplished as with any other ActiveX component. The properties and methods supported by the interface are listed below.

To use the viewer in design mode, do the following:

  1. Install the component using the 'Full Installation Procedure' from the Viewer Installation page. This will create a new directory (c:\Program Files\Bright Ideas, if the default options are used) and register (or re-register) the component at that location.
  2. Sample code for simple Visual Studio 2005 VC++ and CSharp projects that duplicate the functionality of the DrawSurfaces! page can be downloaded below. Each of these .zip packages contains the design-time license required to create new projects with the Viewer (BIS_Web.LIC). Copy this file to the directory where the component itself now resides (again, c:\Program Files\Bright Ideas, if the default setup options were used).

Please email us if you have questions, comments, or other feedback.


3DSurface Viewer Properties and Methods

The stock and custom properties and methods supported by 3DSurface Viewer are listed in these tables. The stock 'Caption' property is used to define the surface drawn - loading an expression into this property triggers the drawing sequence. Although a Palette property is not exposed, the Viewer does produce it's own palette and will work properly on a 256 color display.


Stock Properties:

Name Data Type Read/Write Description
BackColor OLE_COLOR R/W The background color of the image.
BorderWidth long R/W The distance from the edge of the component to the edge of the GL display.
Caption BSTR R/W The expression defining the surface.
Enabled VARIANT_BOOL R/W Enables/disables the GL window. When disabled, it is replaced with a solid rectangle.
ForeColor OLE_COLOR R/W The color used to draw the surface.

Custom Properties:

AxisColor OLE_COLOR R/W The color used for the axes and 3D boundary labels.
BoldFont VARIANT_BOOL R/W Use bold face in 2D and 3D text.
FontName BSTR R/W Font used for both 2 and 3D text (must be true-type).
FontSize long R/W Size of 2D Text.
ItalicFont VARIANT_BOOL R/W Italicize 2 and 3D fonts.
TextColor OLE_COLOR R/W Color of 2D text.
StrikeoutFont VARIANT_BOOL R/W Strikeout 2 and 3D fonts.
UnderlineFont VARIANT_BOOL R/W Underline 2 and 3D fonts.
TrackAmbients VARIANT_BOOL R/W Back and Fore color properties track changes in their ambient counterparts.<

Stock Methods:

Name Description
About Display the control's About box.
Refresh Force an update of the display.

Custom Methods:

Name Parameters Description
BlockFontUpdates 1. VARIANT_BOOL Set true to prevent flickering when changing multiple font characteristics.
ResetBoundaries - Restore the original origin-centered view.
ShiftPosX - Shift the viewing volume in the positive X direction.
ShiftNegX - Shift the viewing volume in the negative X direction.
ShiftPosY - Shift the viewing volume in the positive Y direction.
ShiftNegY - Shift the viewing volume in the negative Y direction.
UpdateFonts - Recreate fonts using current characteristic information.
ZoomIn - Halve the length of each side of the viewing volume.
ZoomOut - Double the length of each side of the viewing volume.
CopyImage - Copy the current image to the clipboard.
SaveImage 1. VARIANT_BOOL Success
2. BSTR FileName
Save the current image as a 24 bit DIB.
PrintImage 1. int Left
2. int Top
3. int Width
4. int Height
5. long DC
Print the current image. Dimensions are in pixels.


Sample Applications w/ Design Mode License:








Back To Top



Copyright© 2001-2008 by Bright Ideas Software®. All rights reserved.