#include <stdio.h>
#include <iostream>
namespace HDK_Sample {
static void
{
    fprintf(stderr, 
"Error: %s\n", msg);
 
}
static void
i3dSphere(int nvalues,
                const char *names[],
                int for_aa)
{
    int          i;
    
    UT_ASSERT(!strcmp(names[0], 
"density") && sizes[0] == 1);
 
    UT_ASSERT(!strcmp(names[1], 
"color") && sizes[1] == 3);
 
    density = result[0];
    color = result[1];
    for (i = 0; i < nvalues; i++)
    {
        
        d = P[i].
length() > 1 ? 0 : 1;
 
        *density = d;
        color[0] = d * SYSfit(P[i].
x(), -1, 1, 0, 1);
 
        color[1] = d * SYSfit(P[i].
y(), -1, 1, 0, 1);
 
        color[2] = d * SYSfit(P[i].
z(), -1, 1, 0, 1);
 
        
        density += 1;   
        color   += 3;   
    }
}
}       
using namespace HDK_Sample;
int
{
    const char          *chnames[2] = { "density", "color" };
    int                  chsizes[2] = { 1, 3 };
    printf(
"Generating sphere.i3d\n");
 
        error(
"Unable to createTexture()");
 
    if (!fp.
fillTexture(2, chnames, chsizes, i3dSphere, 1))
 
        error(
"Unable to fill the texture");
 
    if (!fp.
exportTag(
"software", 
"hdk_isosphere"))
 
        error(
"Unable to save software tag");
 
        error(
"Unable to close texture");
 
    return 0;
}