Ejemplo n.º 1
0
int main(int argc, char *argv[]) {
    FILE *inf;
    wave_object_t obj;
    const size_t NUM_FRAMES = 360;
    RtInt md = 4;
    scene_info_t scene;
    double rad = 20;
    double t = 0.0;
    double dt = 2.0*PI/(NUM_FRAMES-1);
    size_t fnum;

    if (argc <3) {
        printf("No input and output file names given!\n");
        return 1;
    }
    
    inf = fopen(argv[1], "rt");
    if (inf == NULL) {
        printf("Could not open \"%s\"\n", argv[1]);
        return 1;

    }
    init_object(&obj);
    read_object(inf, &obj);
    
    
    printf("Object file has:\n  %zu vertices\n  %zu normals\n  %zu texture coordinates\n  %zu faces\n  %d objects\n",
           obj.num_verts, obj.num_norms, obj.num_texts, obj.num_faces, 1);

    RiBegin(RI_NULL);
    RiOption("trace", "maxdepth", &md, RI_NULL);
    RiSides(2);


    scene.cam.location[0] = rad;
    scene.cam.location[1] = rad;
    scene.cam.location[2] = rad;

    scene.cam.look_at[0]= 0.0;
    scene.cam.look_at[1]= 0.0;
    scene.cam.look_at[2]= 0.0;
    scene.cam.roll = 0.0;
    
    scene.fprefix = argv[2];

    for (fnum = 0; fnum < NUM_FRAMES; ++fnum) {
        scene.cam.location[0] = rad * sin(t);
        scene.cam.location[2] = rad * cos(t);
        t += dt;
        printf("Rendering frame %lu\n", fnum);
        doFrame(fnum, &scene, &obj);
    }
    RiEnd();

    free_object(&obj);

    fclose(inf);
    return 0;
}
Ejemplo n.º 2
0
/**
 * Simple cone geometry
 */
void testCone()
{
	const RtFloat rad = 0.6F;
	const RtFloat height = 1.6F;
	RiAttributeBegin(); {
		RiSides(2);
		RiOrientation(RI_OUTSIDE);
		RiColor(blueish);
		RiTransformBegin(); {
			RiTranslate(0, -height/4.0F, 3);
			RiScale(1.0, 1.0, 1.0);
			RiRotate(-45, 1, 0, 0);
			RiCone(height, rad, 360, RI_NULL);
		} RiTransformEnd();
	} RiAttributeEnd();
}
Ejemplo n.º 3
0
/**
 * Utah teapot, build-in geometry
 */
void testTeapot()
{
	RtObjectHandle handle = RiObjectBegin(); {
		RiGeometry(RI_TEAPOT, RI_NULL);
	} RiObjectEnd();

	RiAttributeBegin(); {
		RtFloat Cs[] = {0.33F, 0.33F, 1.0F};
		RiColor(Cs);
		RiTranslate(0, -.25, 2.75);
		RiScale(0.25F, 0.25F, 0.25F);
		RiRotate(-90, 1, 0, 0);
		RiSides(2);
		RiGeometricApproximation(RI_TESSELATION, 32);
		RiObjectInstance(handle);
	} RiAttributeEnd();
}
Ejemplo n.º 4
0
int main(int argc, const char *argv[])
{
	RtPoint points[] = { { 0, 0, 0}, {-.5, .5, 0}, {.5, .5, 0} };
	RtPoint points2[] = { { 0, 0, 0}, { 0, 1.0F, 0}, {1.33333F, -1.0F, 0}, {-1.33333F, -1.0F, 0} };
	RtFloat color[]  = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
	RtFloat Cs1[] = {1, 1, 1};
	RtFloat Cs2[] = {1, 1, 0};
	RtFloat Cs3[] = {1, 0, 0};
	RtBound bound = { -.5F, 0, 0, .5F, .5F, 0 };
	RtInt renderer = 0;
	RtString myVal[2] = {"MyVal0", "MyVal1"};
	
	RiOption("MyOption", "string MyVar", &myVal[0], RI_NULL);
	RiCPPControl("MyControl", "string MyVar2", &myVal[1], RI_NULL);

	switch(renderer) {
		case 1:
			RiBegin("|aqsis -progress");
			break;
		case 2:
			RiBegin("|rndr -p");
			break;
		default:
			RiBegin(RI_NULL);
	}
		/* RiMakeTexture("mytexture.tiff", "mytexture.tx", RI_PERIODIC, RI_PERIODIC, RiSincFilter, (RtFloat)3.0, (RtFloat)3.0, RI_NULL); */

		/* Using gcc-4.0.1 I got a warning for Ri-functions that float is used instead of double due to prototype,
		 * even if I pass explictely float. Due to a message in fr.comp.lang.c "Complexe avex fonction réelle" Jan 23, 2008
		 * this warning (gcc-4.2.3) is not issued in gcc-4.3.0 anymore, so I disabled the "Prototype conversion" option temporarily.
		 */
		RiPixelFilter(RiGaussianFilter, 3.0f, 3.0f),
		RiShutter(0.0F, 1.0F);
		RiClipping(0.5F, 20.0F);
		RiProjection(RI_PERSPECTIVE, RI_NULL);
		RiFrameBegin(1);
			RiDisplay("Polygon", RI_FRAMEBUFFER, RI_RGB, RI_NULL);
			RiTranslate(0.0F, 0.0F, 4.5F);
			RiLightSource("pointlight", RI_NULL);
			RiTranslate(0.0F, 0.0F, .5F);
			RiWorldBegin();
				RiOrientation(RI_LH);
				RiSides(1);
				RiSurface("matte", RI_NULL);
				RiMotionBegin(3, 0.0F, 0.5F, 1.0F);
					RiColor(Cs1);
					RiColor(Cs2);
					RiColor(Cs3);
				RiMotionEnd();
				RiMotionBegin(3, 0.0F, 0.5F, 1.0F);
					RiRotate(10.0F, 0.0F, 0.0F, 1.0F);
					RiRotate(20.0F, 0.0F, 0.0F, 1.0F);
					RiRotate(30.0F, 0.0F, 0.0F, 1.0F);
				RiMotionEnd();
				RiDetail(bound);
				RiDetailRange(0.0F, 0.0F, 100.0F, 150.0F);
				RiPolygon(3, RI_P, points, RI_NULL);
				RiDetailRange(100.0F, 150.0F, RI_INFINITY, RI_INFINITY);
				RiPolygon(3, RI_P, points, RI_CS, color, RI_NULL);
				RiTransformPoints(RI_SCREEN, RI_RASTER, sizeof(points2)/sizeof(RtPoint), points2);
			RiWorldEnd();
		RiFrameEnd();
	RiEnd();
	exit(0);
	
	return 0;
}
Ejemplo n.º 5
0
int main(int argc, char *argv[]) {
    if (argc < 2) {
        printf("Not enough arguments given!\n");
        return 1;
    } else if (argc > 2) {
        printf("Too many arguments given!\n");
        return 1;
    }
    char *fprefix = argv[1];
    srand(time(NULL));
    const size_t NUM_FRAMES = 120;
    RtInt md = 4;
    scene_info_t scene;
    double rad = 55.0;
    double t = 0.0;
    const double tmin = 0.0;
    const double tmax = 2.0*PI;
    double dt = (tmax-tmin)/NUM_FRAMES;
    size_t fnum;

    RiBegin(RI_NULL);
    RiOption("trace", "maxdepth", &md, RI_NULL);
    RiSides(1);

    scene.cam.location[0] = rad;
    scene.cam.location[1] = rad;
    scene.cam.location[2] = rad;

    scene.cam.look_at[0]= 0.0;
    scene.cam.look_at[1]= 0.0;
    scene.cam.look_at[2]= 0.0;
    scene.cam.roll = 0.0;

    scene.fprefix = fprefix;

    
    const size_t NUM_POINTS = 100000000;

    RtPoint *pts = malloc(sizeof(RtPoint)* NUM_POINTS);
    randomPoint2D(pts[0]);
    /* pts[0][2] = 0.0; */

    /* RtFloat mats[][3][3] = {{{0.0,0.0,0.0}, */
    /*                          {0.0,0.16,0.0}, */
    /*                          {0.0,0.0,1.0}}, */
    /*                         {{0.85, 0.04, 0.0}, */
    /*                          {-0.04, 0.85, 0.0}, */
    /*                          {0.0,0.0,1.0}}, */
    /*                         {{0.20,-0.26, 0.0}, */
    /*                          {0.23, 0.22, 0.0}, */
    /*                          {0.0,0.0,1.0}}, */
    /*                         {{-0.15, 0.28,0.0}, */
    /*                          {0.26, 0.24, 0.0}, */
    /*                          {0.0,0.0,1.0}}, */
    /* }; */
    RtFloat mats[][3][3] = {{{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
                            {{0.34,0.0,0.0},
                             {0.0,0.34,0.0},
                             {0.0,0.0,0.34}},
    };

    RtPoint offsets[] = {{0.0,0.0,0.66},
                         {0.0,0.0,-0.66},
                         {0.0,0.0,0.0},
                         {0.66,0.0,0.0},
                         {-0.66,0.0,0.0},
                         {0.0,0.66, 0.0},
                         {0.0,-0.66, 0.0},
    };
    RtFloat probs[] = {0.14285714285714285,
                       0.14285714285714285,
                       0.14285714285714285,
                       0.14285714285714285,
                       0.14285714285714285,
                       0.14285714285714285,
                       0.14285714285714285,
    };
    for (size_t i=0; i<NUM_POINTS-1; ++i) {
        ifs(7, mats, offsets, probs, pts[i], pts[i+1]);
    }

    for (fnum = 0; fnum < NUM_FRAMES; ++fnum) {
        scene.cam.location[0] = rad*sin(t);
        scene.cam.location[1] = rad;
        scene.cam.location[2] = rad*cos(t);
        /* scene.cam.look_at[1] = rad; */
        t += dt;
        printf("Rendering frame %lu\n", (unsigned long)fnum);
        RtInt on = 1;
        char buffer[256];
        RtString on_string = "on";
        RtInt samples = 2;
        RtPoint light1Pos = {80,80,80};
        RtPoint light2Pos = {0,120,0};
        RtPoint light3Pos = {0,40,0};

        /* RiImager("background", RI_NULL); */

        RiFrameBegin(fnum);

        
        sprintf(buffer, "images/%s%05lu.jpg", scene.fprefix, (unsigned long)fnum);
        RiDisplay(buffer,(char*)"jpeg",(char*)"rgb",RI_NULL);
  
        RiFormat(1280, 720, 1.0);

        RiProjection((char*)"perspective",RI_NULL);

        PlaceCamera(&scene.cam);
        RiShadingRate(1.0);
        RiShadingInterpolation("smooth");
        /* RtFloat bound = 0.125; */
        /* char *space = "object"; */
        /* RiAttribute ("displacementbound", "sphere", (RtPointer)&bound, "space", (RtPointer)&space, RI_NULL); */
        /* RiAttribute("visibility", "int trace", &on, RI_NULL); */
        /* RiAttribute( "visibility", */
        /*              "int camera", (RtPointer)&on, */
        /*              "int transmission", (RtPointer)&on, */
        /*              "int diffuse", (RtPointer)&on, */
        /*              "int specular", (RtPointer)&on, */
        /*              "int photon", (RtPointer)&on, */
        /*              RI_NULL ); */
        /* RiAttribute( "light", (RtToken)"shadows", (RtPointer)&on_string, (RtToken)"samples", (RtPointer)&samples, RI_NULL ); */

        RiAttribute((RtToken)"light", "string shadow", (RtPointer)&on_string, RI_NULL);
        RiLightSource("distantlight", "point from", (RtPointer)light1Pos, RI_NULL);
        RiLightSource("distantlight", "point from", (RtPointer)light2Pos, RI_NULL);
        /* RiLightSource("pointlight", "point from", (RtPointer)light3Pos, RI_NULL); */
        RiWorldBegin();

        
        RiAttributeBegin();
        /* RtColor col = {((double)fnum)/NUM_FRAMES,1.0-((double)fnum)/NUM_FRAMES,0.0}; */
        RtColor col = {0.0,1.0,0.0};
        RiSurface((char*)"matte", RI_NULL);
        /* RtColor opa = {0.8,0.8,0.8}; */
        /* RiOpacity(opa); */
        /* RtFloat km = 0.125; */
        /* RiDisplacement((char*)"stucco", (RtToken)"Km", (RtPointer)&km, RI_NULL); */
        RiColor(col);
        /* RtColor opa = {0.75,0.75,0.75}; */
        /* RiOpacity(opa); */

        RiScale(50.0,50.0,50.0);
        RtFloat cw = 0.0005;
        RiPoints(NUM_POINTS, "type", "particles", "constantwidth", &cw, RI_P, pts, RI_NULL);
        /* RiSphere(0.2,-0.2,0.2,360.0, RI_NULL); */
        RiAttributeEnd();

        RiWorldEnd();
        RiFrameEnd();

    }
    RiEnd();

    return 0;
}
Ejemplo n.º 6
0
void RFeather::generateRIB(RtFloat detail)
{
	if(m_is_shd!=1) RiSides(2);
	else RiSides(1);

	RtToken paramname[MAX_NUMPARAM];
	RtPointer paramvalue[MAX_NUMPARAM];
	
	MATRIX44F hair_space;
	XYZ wind, pw, side;
	float length, curl, root_s, root_t, noil;
	
	int n_curve;
	FBend* fb = new FBend();
	int num_hair = feather->getNumHair();
	
	n_curve = num_hair;
	
	float delta = (m_shutter_close-m_shutter_open)*m_fps;
	
	if(m_is_shd!=1)
	{
		XYZ* parray = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* parray_close = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col0 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col1 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col2 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col3 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col4 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col5 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col6 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col7 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col8 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col9 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col10 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col11 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col12 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col13 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col14 = new XYZ[2*(NUMBENDSEG+1)];
		XYZ* col15 = new XYZ[2*(NUMBENDSEG+1)];
		
		int g_seed = 13;
		CoeRec root_rt;
		for(int i=0; i<num_hair; i++)
		{
			feather->getAParam(i, hair_space, length, wind, side, curl, root_s, root_t, root_rt);
			
			float noil = 1.f+(randfint( g_seed )-0.5)*0.13;
			g_seed++;
			
			length *= noil;
			
			fb->create(length, wind.x, wind.y+length*(curl*noil-0.5)*2);
			
			for(int j=0; j<NUMBENDSEG+1; j++)
			{
				fb->getPoint(j, pw);
				hair_space.transform(pw);

				parray[j*2] = pw - side*length*m_f_wh*0.5;
				parray[j*2+1] = pw + side * length*m_f_wh*0.5;
			}
			
			for(int j=0; j<4*NUMBENDSEG; j++)
			{
				roots[j]=root_s;
				roott[j] = 1.f-root_t;
			}
			
			paramname[0] = "P";
			paramvalue[0] = (RtPoint*)parray;
			
			paramname[1] = "facevarying float s";
			paramvalue[1] = (RtFloat*)scoord;
			
			paramname[2] = "facevarying float t";
			paramvalue[2] = (RtFloat*)tcoord;
			
			paramname[3] = "facevarying float root_s";
			paramvalue[3] = (RtFloat*)roots;
			
			paramname[4] = "facevarying float root_t";
			paramvalue[4] = (RtFloat*)roott;
			
			for(int j=0; j<2*(NUMBENDSEG+1);j++) 
			{
				col0[j] = root_rt.data[0];
				col1[j] = root_rt.data[1];
				col2[j] = root_rt.data[2];
				col3[j] = root_rt.data[3];
				col4[j] = root_rt.data[4];
				col5[j] = root_rt.data[5];
				col6[j] = root_rt.data[6];
				col7[j] = root_rt.data[7];
				col8[j] = root_rt.data[8];
				col9[j] = root_rt.data[9];
				col10[j] = root_rt.data[10];
				col11[j] = root_rt.data[11];
				col12[j] = root_rt.data[12];
				col13[j] = root_rt.data[13];
				col14[j] = root_rt.data[14];
				col15[j] = root_rt.data[15];
			}
			paramname[5] = "vertex color coeff0";
			paramvalue[5] = (RtFloat*)col0;
			paramname[6] = "vertex color coeff1";
			paramvalue[6] = (RtFloat*)col1;
			paramname[7] = "vertex color coeff2";
			paramvalue[7] = (RtFloat*)col2;
			paramname[8] = "vertex color coeff3";
			paramvalue[8] = (RtFloat*)col3;
			paramname[9] = "vertex color coeff4";
			paramvalue[9] = (RtFloat*)col4;
			paramname[10] = "vertex color coeff5";
			paramvalue[10] = (RtFloat*)col5;
			paramname[11] = "vertex color coeff6";
			paramvalue[11] = (RtFloat*)col6;
			paramname[12] = "vertex color coeff7";
			paramvalue[12] = (RtFloat*)col7;
			paramname[13] = "vertex color coeff8";
			paramvalue[13] = (RtFloat*)col8;
			paramname[14] = "vertex color coeff9";
			paramvalue[14] = (RtFloat*)col9;
			paramname[15] = "vertex color coeff10";
			paramvalue[15] = (RtFloat*)col10;
			paramname[16] = "vertex color coeff11";
			paramvalue[16] = (RtFloat*)col11;
			paramname[17] = "vertex color coeff12";
			paramvalue[17] = (RtFloat*)col12;
			paramname[18] = "vertex color coeff13";
			paramvalue[18] = (RtFloat*)col13;
			paramname[19] = "vertex color coeff14";
			paramvalue[19] = (RtFloat*)col14;
			paramname[20] = "vertex color coeff15";
			paramvalue[20] = (RtFloat*)col15;
			
			if(m_is_blur ==1 && feather_close) 
			{
				RiMotionBegin(2, m_shutter_open, m_shutter_close);
				RiHierarchicalSubdivisionMeshV("catmull-clark", (RtInt)3,  (RtInt*)nvertices, (RtInt*)vertices, (RtInt)2, tags, nargs, intargs, floatargs, stringargs, (RtInt)21, paramname, paramvalue );
				
				feather_close->getAParam(i, hair_space, length, wind, side, curl, root_s, root_t);
				fb->create(length, wind.x, wind.y+length*(curl*noil-0.5)*2);
				
				for(int j=0; j<NUMBENDSEG+1; j++)
				{
					fb->getPoint(j, pw);
					hair_space.transform(pw);

					parray_close[j*2] = pw - side*length*m_f_wh*0.5;
					parray_close[j*2+1] = pw + side * length*m_f_wh*0.5;
					
					parray[j*2] += (parray_close[j*2] - parray[j*2])*delta;
					parray[j*2+1] += (parray_close[j*2+1] - parray[j*2+1])*delta;
				}
			
				paramvalue[0] = (RtPoint*)parray;

				RiHierarchicalSubdivisionMeshV("catmull-clark", (RtInt)3,  (RtInt*)nvertices, (RtInt*)vertices, (RtInt)2, tags, nargs, intargs, floatargs, stringargs, (RtInt)21, paramname, paramvalue );
				RiMotionEnd();
			}
			else RiHierarchicalSubdivisionMeshV("catmull-clark", (RtInt)3,  (RtInt*)nvertices, (RtInt*)vertices, (RtInt)2, tags, nargs, intargs, floatargs, stringargs, (RtInt)21, paramname, paramvalue );
		}

		delete[] parray;
		delete[] parray_close;
		delete[] col0;
		delete[] col1;
		delete[] col2;
		delete[] col3;
		delete[] col4;
		delete[] col5;
		delete[] col6;
		delete[] col7;
		delete[] col8;
		delete[] col9;
		delete[] col10;
		delete[] col11;
		delete[] col12;
		delete[] col13;
		delete[] col14;
		delete[] col15;
	}
	else
	{
		XYZ* parray = new XYZ[2*(NUMBENDSEG+1)];
		
		int g_seed = 13;
		for(int i=0; i<num_hair; i++)
		{
			feather->getAParam(i, hair_space, length, wind, side, curl, root_s, root_t);
			
			float noil = 1.f+(randfint( g_seed )-0.5)*0.13;
			g_seed++;
			
			length *= noil;
			
			fb->create(length, wind.x, wind.y+length*(curl*noil-0.5)*2);
			
			for(int j=0; j<NUMBENDSEG+1; j++)
			{
				fb->getPoint(j, pw);
				hair_space.transform(pw);

				parray[j*2] = pw - side*length*m_f_wh*0.5;
				parray[j*2+1] = pw + side * length*m_f_wh*0.5;
			}
			
			for(int j=0; j<4*NUMBENDSEG; j++)
			{
				roots[j]=root_s;
				roott[j] = 1.f-root_t;
			}
			
			paramname[0] = "P";
			paramvalue[0] = (RtPoint*)parray;
			
			paramname[1] = "facevarying float s";
			paramvalue[1] = (RtFloat*)scoord;
			
			paramname[2] = "facevarying float t";
			paramvalue[2] = (RtFloat*)tcoord;
			
			paramname[3] = "facevarying float root_s";
			paramvalue[3] = (RtFloat*)roots;
			
			paramname[4] = "facevarying float root_t";
			paramvalue[4] = (RtFloat*)roott;
			
			RiHierarchicalSubdivisionMeshV("catmull-clark", (RtInt)3,  (RtInt*)nvertices, (RtInt*)vertices, (RtInt)2, tags, nargs, intargs, floatargs, stringargs, (RtInt)5, paramname, paramvalue );
		}

		delete[] parray;
	}
	return;
}
Ejemplo n.º 7
0
/**
 * NURBS vase from Larry Gritz BMRT
 */
void testVase()
{
    static RtFloat vaseMesh[] = { // Data copied from BMRT
        0.0F, 0.0F, 0.0F, 0.869825F, 0.0F, 0.0F, 0.0F, 0.902369F, 0.0F, 0.0F, 0.0F, 1.0F,
		0.0F, 0.0F, 0.0F, 0.707107F, 0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.707107F,
		0.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.0F, 0.707107F, 0.0F, 0.0F, 0.0F, 1.0F,
		0.0F, 0.0F, 0.0F, 0.804738F, 0.0F, 0.0F, 0.0F, 0.869825F,
        2.1269F, 3.79357F, 0.0F, 0.869825F, 1.17851F, 4.51184F, 0.0F, 0.902369F, 0.0F, 5.0F, 0.0F, 1.0F, -3.53553F, 3.53553F, 0.0F, 0.707107F, -5.0F, 3.06152e-016F, 0.0F, 1.0F, -3.53553F, -3.53553F, 0.0F,
        0.707107F, -6.12303e-016F, -5.0F, 0.0F, 1.0F, 3.53553F, -3.53553F, 0.0F, 0.707107F, 5.0F, -9.18455e-016F, 0.0F, 1.0F, 4.02369F, 2.35702F, 0.0F, 0.804738F, 2.1269F, 3.79357F, 0.0F, 0.869825F,
        12.1872F, 21.7372F, 0.0F, 4.9841F, 6.75287F, 25.8529F, 0.0F, 5.17057F, 0.0F, 28.65F, 0.0F, 5.73F, -20.2586F, 20.2586F, 0.0F, 4.05172F, -28.65F, 1.75425e-015F, 0.0F, 5.73F, -20.2586F,
        -20.2586F, 0.0F, 4.05172F, -3.5085e-015F, -28.65F, 0.0F, 5.73F, 20.2586F, -20.2586F, 0.0F, 4.05172F, 28.65F, -5.26275e-015F, 0.0F, 5.73F, 23.0557F, 13.5057F, 0.0F, 4.61115F, 12.1872F,
        21.7372F, 0.0F, 4.9841F, 2.1269F, 3.79357F, 0.260948F, 0.869825F, 1.17851F, 4.51184F, 0.270711F, 0.902369F, 0.0F, 5.0F, 0.3F, 1.0F, -3.53553F, 3.53553F, 0.212132F, 0.707107F, -5.0F,
        3.06152e-016F, 0.3F, 1.0F, -3.53553F, -3.53553F, 0.212132F, 0.707107F, -6.12303e-016F, -5.0F, 0.3F, 1.0F, 3.53553F, -3.53553F, 0.212132F, 0.707107F, 5.0F, -9.18455e-016F, 0.3F, 1.0F,
        4.02369F, 2.35702F, 0.241421F, 0.804738F, 2.1269F, 3.79357F, 0.260948F, 0.869825F, 6.38071F, 11.3807F, 0.782843F, 2.60948F, 3.53553F, 13.5355F, 0.812132F, 2.70711F, 0.0F,
        15.0F, 0.9F, 3.0F, -10.6066F, 10.6066F, 0.636396F, 2.12132F, -15.0F, 9.18455e-016F, 0.9F, 3.0F, -10.6066F, -10.6066F, 0.636396F, 2.12132F, -1.83691e-015F, -15.0F, 0.9F, 3.0F, 10.6066F,
        -10.6066F, 0.636396F, 2.12132F, 15.0F, -2.75536e-015F, 0.9F, 3.0F, 12.0711F, 7.07107F, 0.724264F, 2.41421F, 6.38071F, 11.3807F, 0.782843F, 2.60948F, 2.72244F, 4.85577F,
        2.0006F, 0.869825F, 1.50849F, 5.77516F, 2.07545F, 0.902369F, 0.0F, 6.4F, 2.3F, 1.0F, -4.52548F, 4.52548F, 1.62635F, 0.707107F, -6.4F, 3.91874e-016F, 2.3F, 1.0F, -4.52548F, -4.52548F,
        1.62635F, 0.707107F, -7.83748e-016F, -6.4F, 2.3F, 1.0F, 4.52548F, -4.52548F, 1.62635F, 0.707107F, 6.4F, -1.17562e-015F, 2.3F, 1.0F, 5.15032F, 3.01699F, 1.8509F, 0.804738F,
        2.72244F, 4.85577F, 2.0006F, 0.869825F, 2.97767F, 5.311F, 4.34913F, 0.869825F, 1.64992F, 6.31658F, 4.51184F, 0.902369F, 0.0F, 7.0F, 5.0F, 1.0F, -4.94975F, 4.94975F, 3.53553F,
        0.707107F, -7.0F, 4.28612e-016F, 5.0F, 1.0F, -4.94975F, -4.94975F, 3.53553F, 0.707107F, -8.57224e-016F, -7.0F, 5.0F, 1.0F, 4.94975F, -4.94975F, 3.53553F, 0.707107F, 7.0F, -1.28584e-015F, 5.0F,
        1.0F, 5.63316F, 3.29983F, 4.02369F, 0.804738F, 2.97767F, 5.311F, 4.34913F, 0.869825F, 2.55228F, 4.55228F, 6.9586F, 0.869825F, 1.41421F, 5.41421F, 7.21895F, 0.902369F, 0.0F, 6.0F, 8.0F,
        1.0F, -4.24264F, 4.24264F, 5.65685F, 0.707107F, -6.0F, 3.67382e-016F, 8.0F, 1.0F, -4.24264F, -4.24264F, 5.65685F, 0.707107F, -7.34764e-016F, -6.0F, 8.0F, 1.0F, 4.24264F, -4.24264F, 5.65685F,
        0.707107F, 6.0F, -1.10215e-015F, 8.0F, 1.0F, 4.82843F, 2.82843F, 6.4379F, 0.804738F, 2.55228F, 4.55228F, 6.9586F, 0.869825F, 1.27614F, 2.27614F, 8.69825F, 0.869825F, 0.707107F,
        2.70711F, 9.02369F, 0.902369F, 0.0F, 3.0F, 10.0F, 1.0F, -2.12132F, 2.12132F, 7.07107F, 0.707107F, -3.0F, 1.83691e-016F, 10.0F, 1.0F, -2.12132F, -2.12132F, 7.07107F, 0.707107F,
        -3.67382e-016F, -3.0F, 10.0F, 1.0F, 2.12132F, -2.12132F, 7.07107F, 0.707107F, 3.0F, -5.51073e-016F, 10.0F, 1.0F, 2.41421F, 1.41421F, 8.04738F, 0.804738F, 1.27614F, 2.27614F, 8.69825F,
        0.869825F, 1.27614F, 2.27614F, 10.4379F, 0.869825F, 0.707107F, 2.70711F, 10.8284F, 0.902369F, 0.0F, 3.0F, 12.0F, 1.0F, -2.12132F, 2.12132F, 8.48528F, 0.707107F, -3.0F, 1.83691e-016F,
        12.0F, 1.0F, -2.12132F, -2.12132F, 8.48528F, 0.707107F, -3.67382e-016F, -3.0F, 12.0F, 1.0F, 2.12132F, -2.12132F, 8.48528F, 0.707107F, 3.0F, -5.51073e-016F, 12.0F, 1.0F, 2.41421F, 1.41421F,
        9.65685F, 0.804738F, 1.27614F, 2.27614F, 10.4379F, 0.869825F, 1.44629F, 2.57963F, 10.4379F, 0.869825F, 0.801388F, 3.06805F, 10.8284F, 0.902369F, 0.0F, 3.4F, 12.0F, 1.0F, -2.40416F,
        2.40416F, 8.48528F, 0.707107F, -3.4F, 2.08183e-016F, 12.0F, 1.0F, -2.40416F, -2.40416F, 8.48528F, 0.707107F, -4.16366e-016F, -3.4F, 12.0F, 1.0F, 2.40416F, -2.40416F, 8.48528F,
        0.707107F, 3.4F, -6.24549e-016F, 12.0F, 1.0F, 2.73611F, 1.60278F, 9.65685F, 0.804738F, 1.44629F, 2.57963F, 10.4379F, 0.869825F, 1.44629F, 2.57963F, 11.3077F, 0.869825F,
        0.801388F, 3.06805F, 11.7308F, 0.902369F, 0.0F, 3.4F, 13.0F, 1.0F, -2.40416F, 2.40416F, 9.19239F, 0.707107F, -3.4F, 2.08183e-016F, 13.0F, 1.0F, -2.40416F, -2.40416F, 9.19239F, 0.707107F,
        -4.16366e-016F, -3.4F, 13.0F, 1.0F, 2.40416F, -2.40416F, 9.19239F, 0.707107F, 3.4F, -6.24549e-016F, 13.0F, 1.0F, 2.73611F, 1.60278F, 10.4616F, 0.804738F, 1.44629F, 2.57963F,
        11.3077F, 0.869825F, 1.19107F, 2.1244F, 11.3077F, 0.869825F, 0.659966F, 2.52663F, 11.7308F, 0.902369F, 0.0F, 2.8F, 13.0F, 1.0F, -1.9799F, 1.9799F, 9.19239F, 0.707107F, -2.8F,
        1.71445e-016F, 13.0F, 1.0F, -1.9799F, -1.9799F, 9.19239F, 0.707107F, -3.4289e-016F, -2.8F, 13.0F, 1.0F, 1.9799F, -1.9799F, 9.19239F, 0.707107F, 2.8F, -5.14335e-016F, 13.0F, 1.0F, 2.25327F,
        1.31993F, 10.4616F, 0.804738F, 1.19107F, 2.1244F, 11.3077F, 0.869825F, 1.19107F, 2.1244F, 10.4379F, 0.869825F, 0.659966F, 2.52663F, 10.8284F, 0.902369F, 0.0F, 2.8F, 12.0F, 1.0F,
        -1.9799F, 1.9799F, 8.48528F, 0.707107F, -2.8F, 1.71445e-016F, 12.0F, 1.0F, -1.9799F, -1.9799F, 8.48528F, 0.707107F, -3.4289e-016F, -2.8F, 12.0F, 1.0F, 1.9799F, -1.9799F, 8.48528F,
        0.707107F, 2.8F, -5.14335e-016F, 12.0F, 1.0F, 2.25327F, 1.31993F, 9.65685F, 0.804738F, 1.19107F, 2.1244F, 10.4379F, 0.869825F, 1.14853F, 2.04853F, 8.78523F, 0.869825F,
        0.636396F, 2.4364F, 9.11393F, 0.902369F, 0.0F, 2.7F, 10.1F, 1.0F, -1.90919F, 1.90919F, 7.14178F, 0.707107F, -2.7F, 1.65322e-016F, 10.1F, 1.0F, -1.90919F, -1.90919F, 7.14178F,
        0.707107F, -3.30644e-016F, -2.7F, 10.1F, 1.0F, 1.90919F, -1.90919F, 7.14178F, 0.707107F, 2.7F, -4.95966e-016F, 10.1F, 1.0F, 2.17279F, 1.27279F, 8.12785F, 0.804738F, 1.14853F,
        2.04853F, 8.78523F, 0.869825F, 2.38213F, 4.2488F, 6.9586F, 0.869825F, 1.31993F, 5.05327F, 7.21895F, 0.902369F, 0.0F, 5.6F, 8.0F, 1.0F, -3.9598F, 3.9598F, 5.65685F, 0.707107F, -5.6F,
        3.4289e-016F, 8.0F, 1.0F, -3.9598F, -3.9598F, 5.65685F, 0.707107F, -6.8578e-016F, -5.6F, 8.0F, 1.0F, 3.9598F, -3.9598F, 5.65685F, 0.707107F, 5.6F, -1.02867e-015F, 8.0F, 1.0F, 4.50653F,
        2.63987F, 6.4379F, 0.804738F, 2.38213F, 4.2488F, 6.9586F, 0.869825F, 2.80751F, 5.00751F, 4.34913F, 0.869825F, 1.55563F, 5.95564F, 4.51184F, 0.902369F, 0.0F, 6.6F, 5.0F, 1.0F,
        -4.6669F, 4.6669F, 3.53553F, 0.707107F, -6.6F, 4.0412e-016F, 5.0F, 1.0F, -4.6669F, -4.6669F, 3.53553F, 0.707107F, -8.0824e-016F, -6.6F, 5.0F, 1.0F, 4.6669F, -4.6669F, 3.53553F,
        0.707107F, 6.6F, -1.21236e-015F, 5.0F, 1.0F, 5.31127F, 3.11127F, 4.02369F, 0.804738F, 2.80751F, 5.00751F, 4.34913F, 0.869825F, 2.59482F, 4.62816F, 2.43551F, 0.869825F,
        1.43778F, 5.50445F, 2.52663F, 0.902369F, 0.0F, 6.1F, 2.8F, 1.0F, -4.31335F, 4.31335F, 1.9799F, 0.707107F, -6.1F, 3.73505e-016F, 2.8F, 1.0F, -4.31335F, -4.31335F, 1.9799F, 0.707107F,
        -7.4701e-016F, -6.1F, 2.8F, 1.0F, 4.31335F, -4.31335F, 1.9799F, 0.707107F, 6.1F, -1.12051e-015F, 2.8F, 1.0F, 4.9089F, 2.87557F, 2.25327F, 0.804738F, 2.59482F, 4.62816F, 2.43551F,
        0.869825F, 1.99929F, 3.56596F, 0.34793F, 0.869825F, 1.1078F, 4.24113F, 0.360948F, 0.902369F, 0.0F, 4.7F, 0.4F, 1.0F, -3.3234F, 3.3234F, 0.282843F, 0.707107F, -4.7F,
        2.87782e-016F, 0.4F, 1.0F, -3.3234F, -3.3234F, 0.282843F, 0.707107F, -5.75565e-016F, -4.7F, 0.4F, 1.0F, 3.3234F, -3.3234F, 0.282843F, 0.707107F, 4.7F, -8.63347e-016F, 0.4F, 1.0F,
        3.78227F, 2.2156F, 0.321895F, 0.804738F, 1.99929F, 3.56596F, 0.34793F, 0.869825F, 0.0F, 0.0F, 0.173965F, 0.869825F, 0.0F, 0.0F, 0.180474F, 0.902369F, 0.0F, 0.0F, 0.2F, 1.0F, 0.0F, 0.0F, 0.141421F,
        0.707107F, 0.0F, 0.0F, 0.2F, 1.0F, 0.0F, 0.0F, 0.141421F, 0.707107F, 0.0F, 0.0F, 0.2F, 1.0F, 0.0F, 0.0F, 0.141421F, 0.707107F, 0.0F, 0.0F, 0.2F, 1.0F, 0.0F, 0.0F, 0.160948F, 0.804738F, 0.0F, 0.0F, 0.173965F, 0.869825F
    };
	
    RtFloat uknot[] = {0.0F, 0.0F, 0.0F, 0.0833333F, 0.0833333F, 0.333333F, 0.333333F, 0.583333F, 0.583333F, 0.833333F, 0.833333F, 1.0F, 1.0F, 1.0F};
    RtFloat vknot[] = {0.0F, 0.0F, 0.0F, 0.0555556F, 0.111111F, 0.166667F, 0.222222F, 0.277778F, 0.333333F, 0.388889F, 0.444444F, 0.5F, 0.555556F, 0.611111F, 0.666667F, 0.722222F, 0.777778F, 0.833333F, 0.888889F, 0.944444F, 1.0F, 1.0F, 1.0F};
	
	RiAttributeBegin(); {
		RiColor(redish);
		RiSides(1);
		RiTranslate(0, -.3F, 2.75F);
		RiRotate(-90, 1, 0, 0);
		RiScale(.1F, .1F, .1F);
		RiNuPatch(11, 3, uknot, 0.0F, 1.0F, 20, 3, vknot, 0.0F, 1.0F, RI_PW, vaseMesh, RI_NULL);
	} RiAttributeEnd();
}