3D Surface Plotter  1.0.0
Create 3D Surface Charts for Any Math Function
3D Surface Plotter

Overview

Welcome to 3D Surface Plotter. This asset package contains a .NET C# Standard 2.0 class library called Surface3DLib.dll, which can be used to create 3D surface plots in the Unity game engine for any math function that describes a simple 3D surface. This library implements a colormap class that can be used to create colormap data for the vertex colors of the Mesh object in Unity. It also includes a colormap enumeration that defines over 60 colormaps with familiar names such as jet, hsv, hot, earth, cool, etc. The library also exposes a ColormapReverse field that can be used to reverse the order of colors defined in the colormap. This means that the library provides over 120 colormaps (61 predefined colormaps + 61 reversed colormaps). You can use these colormaps to easily set colors for your 3D surface plots.

This library also contains a MathFunc class that implements four built-in math functions, including Sinc, Peaks, ExpFunc, and SinCos. These built-in math functions can be used to test the capability and features of this library. The MathFunc class also defines four animation methods that can be used to animate the parameters used in these built-in functions.

The key part of this library is the SurfaceData class, which exposes various public fields used to define 3D surfaces. This class also contains two public methods: CreateData and GetBuiltinData. The CreateData method generates data of vertices, colormaps, UV coordinates, and triangles (or indices) for a simple 3D surface described by any math function. The GetBuiltinData method is used to generate the same set of data using the built-in math function with default parameters. This method lets you use the MathFunctionEnum to select the built-in math function.

The simple 3D surfaces are usually open surfaces, indicating that in order to see both sides of the surface, we need to apply the lighting and colormap to both the front face and back face of the surface. This means that we cannot use the standard surface material to create our 3D surfaces because the shader for the standard material does not support the vertex color and two-side lighting. We have two choices: either creating a custom shader ourselves or using a Unity built-in shader. Here, for demonstration of our library, we will define a material called Surface3DMaterial using the Unity built-in Particles/Standard Surface shader, because it supports the vertex color and two-side lighting.

Since our library also creates the UV coordinate data, we define a TextureMaterial using the standard shader. This material can be used to add texture mapping onto our 3D surface plots.

This manual contains two parts: User Guide and Reference Manual. The Reference Manual provides description about the packages and classes used to implement the Surface3D library. For details, please refer to the Reference Manual. The User Guide includes several demos that illustrate how to use this library to create 3D surface plots. Please see the User Guide for details.

How to Contact Support

You can feel free to contact us at support@drxudotnet.com with any type of question or doubt. We are here for you.

If you are looking for some new feature, we will be interested in this type of feedback as well.

It is recommended to attach your invoice ID to your first contact with support.