'blender'에 해당되는 글 2

  1. 2010.02.24 [iPhone] Blender 로 3D 도형만들기 .. 2 5
  2. 2010.02.23 [iPhone] Blender 로 3D 도형 만들기 .. 1

  Blender 로 3D 도형만들기 .. 2

  Blender 의 사용법을 좀 익히고 이 내용을 보는

  것이 무엇보다 좋을 것 같습니다.

  하지만, 이 프로그램이 기능이 많아서 단지 도형을

  포팅하는 목적이라면 전체 기능을 다 익힐 필요는 없습니다.

  원통에 대해 꼭지점과 모서리에 대한 정보를 추출하기 위해

  파이썬의 스크립트를 이용할 수 있습니다.

  그에 앞서 Blender 에서 화면을 보기 좋게 분할해 보면

  아래와 같습니다. 여기서는 간단히 단색의 텍스쳐를 입혀보았습니다.

  특정한 이미지를 덮혀씌우는 방법은 좀 까다롭습니다만, Blender 홈페이지를 

  참조하시고 그래도 잘 모르시겠다면 요청하시면 한번 다뤄보겠습니다.

  지금은 텍스쳐 설정되었다고 보고 갑니다.


  그림에서 우측의 분할된 부분은 텍스트 상자를 선택한 것인데, 거기서 파이션의 스크립트를 이용할 수 있습니다.

  스크립트 실행은 Mac 에서는 "option + p", PC 에서는 "alt + p" 버튼을 누르면 파일이 생성됨을 알 수 있습니다.
  
  좀더 자세한 내용은 JEFF LAMARCHE의 Blog를 방문하시면 찾을 수 있습니다.

  저도 여기에서 참조하여 나름대로 수정했기 때문이지요.

  스크립트는 아래와 같습니다. 사실 저도 파이썬의 문법을 잘 모르기 때문에

  기초문법의 아는 범위에서만 수정해봤습니다. C 코드나 자바에 익숙하시다면

  대강 보고도 어떻게 되는지 추측할 수 있을거라 생각됩니다.

==================================================

#!BPY


"""

Name: 'Objective-C Header (.h)'

Blender: 244

Group: 'Export'

Tooltip: 'Exports header file for use with the OpenGL ES template for iPhone available from http://iphonedevelopment.blogspot.com/'

"""

import Blender

from Blender import *

import bpy

import bpy

import os


        

def write_obj(filepath):    

    out = file(filepath, 'w')

    sce = bpy.data.scenes.active

    ob = sce.objects.active

    mesh = Mesh.New()        

    mesh.getFromObject(ob.name)


    editmode = Window.EditMode()

    if editmode: Window.EditMode(0)

    has_quads = False

    for f in mesh.faces:

        if len(f) == 4:

            has_quads = True

            break

    

    if has_quads:

        oldmode = Mesh.Mode()

        Mesh.Mode(Mesh.SelectModes['FACE'])

        

        mesh.sel = True

        tempob = sce.objects.new(mesh)

        mesh.quadToTriangle(0) # more=0 shortest length

        oldmode = Mesh.Mode(oldmode)

        sce.objects.unlink(tempob)

        

        Mesh.Mode(oldmode)

    

    objectname = ob.getData(True)

    basename = objectname.capitalize()


    out.write('#import "OpenGLCommon.h"\n\n\n')

        

    if (mesh.faceUV):

        out.write('static const TexturedVertexData3D %sVertexData[] = {\n' % basename)

        out.write('vertex\n')

        for face in mesh.faces:

            for (vert, uvert) in zip(face.verts, face.uv):

                out.write('%f, %f, %f, ' % (vert.co.x, vert.co.y, vert.co.z) )

                out.write('\n')

        out.write('};\n\n')

        out.write('normal\n')

        for face in mesh.faces:

            for (vert, uvert) in zip(face.verts, face.uv):

                out.write('%f, %f, %f, ' % (vert.no.x, vert.no.y, vert.no.z))

                out.write('\n')

        out.write('};\n\n')

        out.write('UV value \n')

        for face in mesh.faces:

            for (vert, uvert) in zip(face.verts, face.uv):

                out.write('%f, %f,' % ( uvert.x, uvert.y ) )

                out.write('\n')

        out.write('};\n\n')

        

    elif (mesh.vertexColors):

        out.write('static const ColoredVertexData3D %sVertexData[] = {\n' % basename)

        for face in mesh.faces:

            for (vert, color) in zip(face.verts, face.col):

                out.write('\t{/*v:*/{%f, %f, %f}, ' % (vert.co.x, vert.co.y, vert.co.z) )

                out.write('/*n:*/{%f, %f, %f}, ' % (vert.no.x, vert.no.y, vert.no.z))

                out.write('/*c:*/{%f, %f, %f, %f}' % ( color.r / 255.0, color.g / 255.0, color.b / 255.0, color.a / 255.0) )

                out.write('},\n')

        out.write('};\n\n')

    else:

        out.write

        out.write('static const VertexData3D %sVertexData[] = {\n' % basename)

        for face in mesh.faces:

            for vert in face.verts:

                out.write('\t{/*v:*/{%f, %f, %f}, ' % (vert.co.x, vert.co.y, vert.co.z) )

                out.write('/*n:*/{%f, %f, %f} ' % (vert.no.x, vert.no.y, vert.no.z))

                out.write('},\n')

        out.write('};\n\n')

    

    if editmode: Window.EditMode(1)

    out.write('#define k%sNumberOfVertices\t%i\n' % (basename, len(mesh.faces) * 3) )


    out.write('// Drawing Code:\n')

    out.write('// glEnableClientState(GL_VERTEX_ARRAY);\n')

    if (mesh.faceUV):

        out.write('// glEnableClientState(GL_TEXTURE_COORD_ARRAY);\n')

    elif (mesh.vertexColors):

        out.write('// glEnableClientState(GL_COLOR_ARRAY);\n')

        out.write('// glEnable(GL_COLOR_MATERIAL)\n')

    out.write('// glEnableClientState(GL_NORMAL_ARRAY);\n')

    out.write('// glVertexPointer(3, GL_FLOAT, sizeof(TexturedVertexData3D), &%sVertexData[0].vertex);\n' % basename)

    out.write('// glNormalPointer(GL_FLOAT, sizeof(TexturedVertexData3D), &%sVertexData[0].normal);\n' % basename)

    if (mesh.faceUV):

        out.write('// glTexCoordPointer(2, GL_FLOAT, sizeof(TexturedVertexData3D), &%sVertexData[0].texCoord);\n' % basename)

    elif (mesh.vertexColors):

        out.write('// glColorPointer(4, GL_FLOAT, sizeof(ColoredVertexData3D), &%sVertexData[0].color);\n' % basename)

    out.write('// glDrawArrays(GL_TRIANGLES, 0, k%sNumberOfVertices);\n' % basename)

    out.write('// glDisableClientState(GL_VERTEX_ARRAY);\n')

    if (mesh.faceUV):

        out.write('// glDisableClientState(GL_TEXTURE_COORD_ARRAY);\n')

    elif (mesh.vertexColors):

        out.write('// glDisableClientState(GL_NORMAL_ARRAY);\n')

        out.write('// glDisable(GL_COLOR_MATERIAL);\n')

    out.write('// glDisableClientState(GL_NORMAL_ARRAY);\n\n\n')

    

    out.close()



filename = os.path.splitext(Blender.Get('filename'))[0]

Blender.Window.FileSelector(write_obj, "Export", '%s.h' % filename)

==================================================

아래의 결과를 보시면 아시겠지만, header 파일 치고는 그냥 불러올 수 없게 문법적으로 안맞습니다.

out.write 구문을 적당히 고쳐보면 되는데, 좀 귀찮아서 놔뒀네요...^^

해당 스크립트 가져다가 입맛에 맞게 고쳐보시면 될 것 같네요.

#import "OpenGLCommon.h"



static const TexturedVertexData3D Cylinder.001VertexData[] = {

vertex

0.000000, 0.000000, -0.500000

0.707107, 0.707107, -0.500000

0.831470, 0.555570, -0.500000

0.000000, 0.000000, 0.500000

0.831471, 0.555569, 0.500000

0.707108, 0.707105, 0.500000

0.000000, 0.000000, -0.500000

0.831470, 0.555570, -0.500000

0.923880, 0.382683, -0.500000

0.000000, 0.000000, 0.500000

0.923880, 0.382682, 0.500000

0.831471, 0.555569, 0.500000

0.000000, 0.000000, -0.500000

0.923880, 0.382683, -0.500000

0.980785, 0.195090, -0.500000

0.000000, 0.000000, 0.500000

0.980786, 0.195088, 0.500000

0.923880, 0.382682, 0.500000

0.000000, 0.000000, -0.500000

0.980785, 0.195090, -0.500000

1.000000, 0.000000, -0.500000

0.000000, 0.000000, 0.500000

1.000000, -0.000002, 0.500000

0.980786, 0.195088, 0.500000

0.000000, 0.000000, -0.500000

1.000000, 0.000000, -0.500000

0.980785, -0.195090, -0.500000

0.000000, 0.000000, 0.500000

0.980785, -0.195092, 0.500000

1.000000, -0.000002, 0.500000

0.000000, 0.000000, -0.500000

0.980785, -0.195090, -0.500000

0.923880, -0.382683, -0.500000

0.000000, 0.000000, 0.500000

0.923879, -0.382685, 0.500000

0.980785, -0.195092, 0.500000

0.000000, 0.000000, -0.500000

0.923880, -0.382683, -0.500000

0.831470, -0.555570, -0.500000

0.000000, 0.000000, 0.500000

0.831469, -0.555571, 0.500000

0.923879, -0.382685, 0.500000

0.000000, 0.000000, -0.500000

0.831470, -0.555570, -0.500000

0.707107, -0.707107, -0.500000

0.000000, 0.000000, 0.500000

0.707106, -0.707107, 0.500000

0.831469, -0.555571, 0.500000

0.000000, 0.000000, -0.500000

0.707107, -0.707107, -0.500000

0.555570, -0.831470, -0.500000

0.000000, 0.000000, 0.500000

0.555570, -0.831470, 0.500000

0.707106, -0.707107, 0.500000

0.000000, 0.000000, -0.500000

0.555570, -0.831470, -0.500000

0.382683, -0.923880, -0.500000

0.000000, 0.000000, 0.500000

0.382684, -0.923880, 0.500000

0.555570, -0.831470, 0.500000

0.000000, 0.000000, -0.500000

0.382683, -0.923880, -0.500000

0.195090, -0.980785, -0.500000

0.000000, 0.000000, 0.500000

0.195091, -0.980785, 0.500000

0.382684, -0.923880, 0.500000

0.000000, 0.000000, -0.500000

0.195090, -0.980785, -0.500000

-0.000000, -1.000000, -0.500000

0.000000, 0.000000, 0.500000

0.000001, -1.000000, 0.500000

0.195091, -0.980785, 0.500000

0.000000, 0.000000, -0.500000

-0.000000, -1.000000, -0.500000

-0.195091, -0.980785, -0.500000

0.000000, 0.000000, 0.500000

-0.195089, -0.980786, 0.500000

0.000001, -1.000000, 0.500000

0.000000, 0.000000, -0.500000

-0.195091, -0.980785, -0.500000

-0.382684, -0.923879, -0.500000

0.000000, 0.000000, 0.500000

-0.382682, -0.923880, 0.500000

-0.195089, -0.980786, 0.500000

0.000000, 0.000000, -0.500000

-0.382684, -0.923879, -0.500000

-0.555571, -0.831469, -0.500000

0.000000, 0.000000, 0.500000

-0.555568, -0.831471, 0.500000

-0.382682, -0.923880, 0.500000

0.000000, 0.000000, -0.500000

-0.555571, -0.831469, -0.500000

-0.707107, -0.707106, -0.500000

0.000000, 0.000000, 0.500000

-0.707105, -0.707109, 0.500000

-0.555568, -0.831471, 0.500000

0.000000, 0.000000, -0.500000

-0.707107, -0.707106, -0.500000

-0.831470, -0.555570, -0.500000

0.000000, 0.000000, 0.500000

-0.831468, -0.555573, 0.500000

-0.707105, -0.707109, 0.500000

0.000000, 0.000000, -0.500000

-0.831470, -0.555570, -0.500000

-0.923880, -0.382683, -0.500000

0.000000, 0.000000, 0.500000

-0.923878, -0.382686, 0.500000

-0.831468, -0.555573, 0.500000

0.000000, 0.000000, -0.500000

-0.923880, -0.382683, -0.500000

-0.980785, -0.195089, -0.500000

0.000000, 0.000000, 0.500000

-0.980785, -0.195094, 0.500000

-0.923878, -0.382686, 0.500000

0.000000, 0.000000, -0.500000

-0.980785, -0.195089, -0.500000

-1.000000, 0.000001, -0.500000

0.000000, 0.000000, 0.500000

-1.000000, -0.000004, 0.500000

-0.980785, -0.195094, 0.500000

0.000000, 0.000000, -0.500000

-1.000000, 0.000001, -0.500000

-0.980785, 0.195091, -0.500000

0.000000, 0.000000, 0.500000

-0.980786, 0.195086, 0.500000

-1.000000, -0.000004, 0.500000

0.000000, 0.000000, -0.500000

-0.980785, 0.195091, -0.500000

-0.923879, 0.382684, -0.500000

0.000000, 0.000000, 0.500000

-0.923881, 0.382679, 0.500000

-0.980786, 0.195086, 0.500000

0.000000, 0.000000, -0.500000

-0.923879, 0.382684, -0.500000

-0.831469, 0.555571, -0.500000

0.000000, 0.000000, 0.500000

-0.831473, 0.555566, 0.500000

-0.923881, 0.382679, 0.500000

0.000000, 0.000000, -0.500000

-0.831469, 0.555571, -0.500000

-0.707106, 0.707108, -0.500000

0.000000, 0.000000, 0.500000

-0.707111, 0.707103, 0.500000

-0.831473, 0.555566, 0.500000

0.000000, 0.000000, -0.500000

-0.707106, 0.707108, -0.500000

-0.555569, 0.831470, -0.500000

0.000000, 0.000000, 0.500000

-0.555575, 0.831466, 0.500000

-0.707111, 0.707103, 0.500000

0.000000, 0.000000, -0.500000

-0.555569, 0.831470, -0.500000

-0.382682, 0.923880, -0.500000

0.000000, 0.000000, 0.500000

-0.382689, 0.923877, 0.500000

-0.555575, 0.831466, 0.500000

0.000000, 0.000000, -0.500000

-0.382682, 0.923880, -0.500000

-0.195089, 0.980786, -0.500000

0.000000, 0.000000, 0.500000

-0.195097, 0.980784, 0.500000

-0.382689, 0.923877, 0.500000

0.000000, 0.000000, -0.500000

-0.195089, 0.980786, -0.500000

0.000002, 1.000000, -0.500000

0.000000, 0.000000, 0.500000

-0.000007, 1.000000, 0.500000

-0.195097, 0.980784, 0.500000

0.000000, 0.000000, -0.500000

0.000002, 1.000000, -0.500000

0.195092, 0.980785, -0.500000

0.000000, 0.000000, 0.500000

0.195083, 0.980787, 0.500000

-0.000007, 1.000000, 0.500000

0.000000, 0.000000, -0.500000

0.195092, 0.980785, -0.500000

0.382685, 0.923879, -0.500000

0.000000, 0.000000, 0.500000

0.382676, 0.923883, 0.500000

0.195083, 0.980787, 0.500000

0.000000, 0.000000, -0.500000

0.382685, 0.923879, -0.500000

0.555572, 0.831469, -0.500000

0.000000, 0.000000, 0.500000

0.555563, 0.831474, 0.500000

0.382676, 0.923883, 0.500000

0.555572, 0.831469, -0.500000

0.707107, 0.707107, -0.500000

0.000000, 0.000000, -0.500000

0.000000, 0.000000, 0.500000

0.707108, 0.707105, 0.500000

0.555563, 0.831474, 0.500000

0.707108, 0.707105, 0.500000

0.707107, 0.707107, -0.500000

0.555572, 0.831469, -0.500000

0.707108, 0.707105, 0.500000

0.555572, 0.831469, -0.500000

0.555563, 0.831474, 0.500000

0.382685, 0.923879, -0.500000

0.382676, 0.923883, 0.500000

0.555563, 0.831474, 0.500000

0.382685, 0.923879, -0.500000

0.555563, 0.831474, 0.500000

0.555572, 0.831469, -0.500000

0.195092, 0.980785, -0.500000

0.195083, 0.980787, 0.500000

0.382676, 0.923883, 0.500000

0.195092, 0.980785, -0.500000

0.382676, 0.923883, 0.500000

0.382685, 0.923879, -0.500000

0.000002, 1.000000, -0.500000

-0.000007, 1.000000, 0.500000

0.195083, 0.980787, 0.500000

0.000002, 1.000000, -0.500000

0.195083, 0.980787, 0.500000

0.195092, 0.980785, -0.500000

-0.195089, 0.980786, -0.500000

-0.195097, 0.980784, 0.500000

-0.000007, 1.000000, 0.500000

-0.195089, 0.980786, -0.500000

-0.000007, 1.000000, 0.500000

0.000002, 1.000000, -0.500000

-0.382682, 0.923880, -0.500000

-0.382689, 0.923877, 0.500000

-0.195097, 0.980784, 0.500000

-0.382682, 0.923880, -0.500000

-0.195097, 0.980784, 0.500000

-0.195089, 0.980786, -0.500000

-0.555569, 0.831470, -0.500000

-0.555575, 0.831466, 0.500000

-0.382689, 0.923877, 0.500000

-0.555569, 0.831470, -0.500000

-0.382689, 0.923877, 0.500000

-0.382682, 0.923880, -0.500000

-0.707106, 0.707108, -0.500000

-0.707111, 0.707103, 0.500000

-0.555575, 0.831466, 0.500000

-0.707106, 0.707108, -0.500000

-0.555575, 0.831466, 0.500000

-0.555569, 0.831470, -0.500000

-0.831469, 0.555571, -0.500000

-0.831473, 0.555566, 0.500000

-0.707111, 0.707103, 0.500000

-0.831469, 0.555571, -0.500000

-0.707111, 0.707103, 0.500000

-0.707106, 0.707108, -0.500000

-0.923879, 0.382684, -0.500000

-0.923881, 0.382679, 0.500000

-0.831473, 0.555566, 0.500000

-0.923879, 0.382684, -0.500000

-0.831473, 0.555566, 0.500000

-0.831469, 0.555571, -0.500000

-0.980785, 0.195091, -0.500000

-0.980786, 0.195086, 0.500000

-0.923881, 0.382679, 0.500000

-0.980785, 0.195091, -0.500000

-0.923881, 0.382679, 0.500000

-0.923879, 0.382684, -0.500000

-1.000000, 0.000001, -0.500000

-1.000000, -0.000004, 0.500000

-0.980786, 0.195086, 0.500000

-1.000000, 0.000001, -0.500000

-0.980786, 0.195086, 0.500000

-0.980785, 0.195091, -0.500000

-0.980785, -0.195089, -0.500000

-0.980785, -0.195094, 0.500000

-1.000000, -0.000004, 0.500000

-0.980785, -0.195089, -0.500000

-1.000000, -0.000004, 0.500000

-1.000000, 0.000001, -0.500000

-0.923880, -0.382683, -0.500000

-0.923878, -0.382686, 0.500000

-0.980785, -0.195094, 0.500000

-0.923880, -0.382683, -0.500000

-0.980785, -0.195094, 0.500000

-0.980785, -0.195089, -0.500000

-0.831470, -0.555570, -0.500000

-0.831468, -0.555573, 0.500000

-0.923878, -0.382686, 0.500000

-0.831470, -0.555570, -0.500000

-0.923878, -0.382686, 0.500000

-0.923880, -0.382683, -0.500000

-0.707107, -0.707106, -0.500000

-0.707105, -0.707109, 0.500000

-0.831468, -0.555573, 0.500000

-0.707107, -0.707106, -0.500000

-0.831468, -0.555573, 0.500000

-0.831470, -0.555570, -0.500000

-0.555571, -0.831469, -0.500000

-0.555568, -0.831471, 0.500000

-0.707105, -0.707109, 0.500000

-0.555571, -0.831469, -0.500000

-0.707105, -0.707109, 0.500000

-0.707107, -0.707106, -0.500000

-0.382684, -0.923879, -0.500000

-0.382682, -0.923880, 0.500000

-0.555568, -0.831471, 0.500000

-0.382684, -0.923879, -0.500000

-0.555568, -0.831471, 0.500000

-0.555571, -0.831469, -0.500000

-0.195091, -0.980785, -0.500000

-0.195089, -0.980786, 0.500000

-0.382682, -0.923880, 0.500000

-0.195091, -0.980785, -0.500000

-0.382682, -0.923880, 0.500000

-0.382684, -0.923879, -0.500000

-0.000000, -1.000000, -0.500000

0.000001, -1.000000, 0.500000

-0.195089, -0.980786, 0.500000

-0.000000, -1.000000, -0.500000

-0.195089, -0.980786, 0.500000

-0.195091, -0.980785, -0.500000

0.195090, -0.980785, -0.500000

0.195091, -0.980785, 0.500000

0.000001, -1.000000, 0.500000

0.195090, -0.980785, -0.500000

0.000001, -1.000000, 0.500000

-0.000000, -1.000000, -0.500000

0.382683, -0.923880, -0.500000

0.382684, -0.923880, 0.500000

0.195091, -0.980785, 0.500000

0.382683, -0.923880, -0.500000

0.195091, -0.980785, 0.500000

0.195090, -0.980785, -0.500000

0.555570, -0.831470, -0.500000

0.555570, -0.831470, 0.500000

0.382684, -0.923880, 0.500000

0.555570, -0.831470, -0.500000

0.382684, -0.923880, 0.500000

0.382683, -0.923880, -0.500000

0.707107, -0.707107, -0.500000

0.707106, -0.707107, 0.500000

0.555570, -0.831470, 0.500000

0.707107, -0.707107, -0.500000

0.555570, -0.831470, 0.500000

0.555570, -0.831470, -0.500000

0.831470, -0.555570, -0.500000

0.831469, -0.555571, 0.500000

0.707107, -0.707107, -0.500000

0.831469, -0.555571, 0.500000

0.707106, -0.707107, 0.500000

0.707107, -0.707107, -0.500000

0.923880, -0.382683, -0.500000

0.923879, -0.382685, 0.500000

0.831470, -0.555570, -0.500000

0.923879, -0.382685, 0.500000

0.831469, -0.555571, 0.500000

0.831470, -0.555570, -0.500000

0.980785, -0.195090, -0.500000

0.980785, -0.195092, 0.500000

0.923880, -0.382683, -0.500000

0.980785, -0.195092, 0.500000

0.923879, -0.382685, 0.500000

0.923880, -0.382683, -0.500000

1.000000, 0.000000, -0.500000

1.000000, -0.000002, 0.500000

0.980785, -0.195090, -0.500000

1.000000, -0.000002, 0.500000

0.980785, -0.195092, 0.500000

0.980785, -0.195090, -0.500000

0.980785, 0.195090, -0.500000

0.980786, 0.195088, 0.500000

1.000000, 0.000000, -0.500000

0.980786, 0.195088, 0.500000

1.000000, -0.000002, 0.500000

1.000000, 0.000000, -0.500000

0.923880, 0.382683, -0.500000

0.923880, 0.382682, 0.500000

0.980785, 0.195090, -0.500000

0.923880, 0.382682, 0.500000

0.980786, 0.195088, 0.500000

0.980785, 0.195090, -0.500000

0.831470, 0.555570, -0.500000

0.831471, 0.555569, 0.500000

0.923880, 0.382683, -0.500000

0.831471, 0.555569, 0.500000

0.923880, 0.382682, 0.500000

0.923880, 0.382683, -0.500000

0.707107, 0.707107, -0.500000

0.707108, 0.707105, 0.500000

0.831470, 0.555570, -0.500000

0.707108, 0.707105, 0.500000

0.831471, 0.555569, 0.500000

0.831470, 0.555570, -0.500000

};


normal

0.000000, 0.000000, -1.000000

0.498764, 0.498764, -0.708792

0.675375, 0.484054, -0.556322

0.000000, 0.000000, 1.000000

0.705679, 0.438704, 0.556322

0.631825, 0.631825, 0.448927

0.000000, 0.000000, -1.000000

0.675375, 0.484054, -0.556322

0.756828, 0.342998, -0.556322

0.000000, 0.000000, 1.000000

0.777703, 0.292611, 0.556322

0.705679, 0.438704, 0.556322

0.000000, 0.000000, -1.000000

0.756828, 0.342998, -0.556322

0.809198, 0.188757, -0.556322

0.000000, 0.000000, 1.000000

0.819849, 0.135258, 0.556322

0.777703, 0.292611, 0.556322

0.000000, 0.000000, -1.000000

0.809198, 0.188757, -0.556322

0.830500, 0.027253, -0.556322

0.000000, 0.000000, 1.000000

0.830500, -0.027253, 0.556322

0.819849, 0.135258, 0.556322

0.000000, 0.000000, -1.000000

0.830500, 0.027253, -0.556322

0.819849, -0.135258, -0.556322

0.000000, 0.000000, 1.000000

0.809198, -0.188757, 0.556322

0.830500, -0.027253, 0.556322

0.000000, 0.000000, -1.000000

0.819849, -0.135258, -0.556322

0.777703, -0.292611, -0.556322

0.000000, 0.000000, 1.000000

0.756828, -0.342998, 0.556322

0.809198, -0.188757, 0.556322

0.000000, 0.000000, -1.000000

0.777703, -0.292611, -0.556322

0.705679, -0.438704, -0.556322

0.000000, 0.000000, 1.000000

0.675375, -0.484054, 0.556322

0.756828, -0.342998, 0.556322

0.000000, 0.000000, -1.000000

0.705679, -0.438704, -0.556322

0.631825, -0.631825, -0.448927

0.000000, 0.000000, 1.000000

0.498764, -0.498764, 0.708792

0.675375, -0.484054, 0.556322

0.000000, 0.000000, -1.000000

0.631825, -0.631825, -0.448927

0.438704, -0.705679, -0.556322

0.000000, 0.000000, 1.000000

0.484054, -0.675375, 0.556322

0.498764, -0.498764, 0.708792

0.000000, 0.000000, -1.000000

0.438704, -0.705679, -0.556322

0.292611, -0.777703, -0.556322

0.000000, 0.000000, 1.000000

0.342998, -0.756828, 0.556322

0.484054, -0.675375, 0.556322

0.000000, 0.000000, -1.000000

0.292611, -0.777703, -0.556322

0.135258, -0.819849, -0.556322

0.000000, 0.000000, 1.000000

0.188757, -0.809198, 0.556322

0.342998, -0.756828, 0.556322

0.000000, 0.000000, -1.000000

0.135258, -0.819849, -0.556322

-0.027253, -0.830500, -0.556322

0.000000, 0.000000, 1.000000

0.027253, -0.830500, 0.556322

0.188757, -0.809198, 0.556322

0.000000, 0.000000, -1.000000

-0.027253, -0.830500, -0.556322

-0.188757, -0.809198, -0.556322

0.000000, 0.000000, 1.000000

-0.135258, -0.819849, 0.556322

0.027253, -0.830500, 0.556322

0.000000, 0.000000, -1.000000

-0.188757, -0.809198, -0.556322

-0.342998, -0.756828, -0.556322

0.000000, 0.000000, 1.000000

-0.292611, -0.777703, 0.556322

-0.135258, -0.819849, 0.556322

0.000000, 0.000000, -1.000000

-0.342998, -0.756828, -0.556322

-0.484054, -0.675375, -0.556322

0.000000, 0.000000, 1.000000

-0.438704, -0.705679, 0.556322

-0.292611, -0.777703, 0.556322

0.000000, 0.000000, -1.000000

-0.484054, -0.675375, -0.556322

-0.606525, -0.567949, -0.556322

0.000000, 0.000000, 1.000000

-0.567949, -0.606525, 0.556322

-0.438704, -0.705679, 0.556322

0.000000, 0.000000, -1.000000

-0.606525, -0.567949, -0.556322

-0.705679, -0.438704, -0.556322

0.000000, 0.000000, 1.000000

-0.675375, -0.484054, 0.556322

-0.567949, -0.606525, 0.556322

0.000000, 0.000000, -1.000000

-0.705679, -0.438704, -0.556322

-0.777703, -0.292611, -0.556322

0.000000, 0.000000, 1.000000

-0.756828, -0.342998, 0.556322

-0.675375, -0.484054, 0.556322

0.000000, 0.000000, -1.000000

-0.777703, -0.292611, -0.556322

-0.819849, -0.135258, -0.556322

0.000000, 0.000000, 1.000000

-0.809198, -0.188757, 0.556322

-0.756828, -0.342998, 0.556322

0.000000, 0.000000, -1.000000

-0.819849, -0.135258, -0.556322

-0.830500, 0.027253, -0.556322

0.000000, 0.000000, 1.000000

-0.830500, -0.027253, 0.556322

-0.809198, -0.188757, 0.556322

0.000000, 0.000000, -1.000000

-0.830500, 0.027253, -0.556322

-0.809198, 0.188757, -0.556322

0.000000, 0.000000, 1.000000

-0.819849, 0.135258, 0.556322

-0.830500, -0.027253, 0.556322

0.000000, 0.000000, -1.000000

-0.809198, 0.188757, -0.556322

-0.756828, 0.342998, -0.556322

0.000000, 0.000000, 1.000000

-0.777703, 0.292611, 0.556322

-0.819849, 0.135258, 0.556322

0.000000, 0.000000, -1.000000

-0.756828, 0.342998, -0.556322

-0.675375, 0.484054, -0.556322

0.000000, 0.000000, 1.000000

-0.705679, 0.438704, 0.556322

-0.777703, 0.292611, 0.556322

0.000000, 0.000000, -1.000000

-0.675375, 0.484054, -0.556322

-0.567949, 0.606525, -0.556322

0.000000, 0.000000, 1.000000

-0.606525, 0.567949, 0.556322

-0.705679, 0.438704, 0.556322

0.000000, 0.000000, -1.000000

-0.567949, 0.606525, -0.556322

-0.438704, 0.705679, -0.556322

0.000000, 0.000000, 1.000000

-0.484054, 0.675375, 0.556322

-0.606525, 0.567949, 0.556322

0.000000, 0.000000, -1.000000

-0.438704, 0.705679, -0.556322

-0.292611, 0.777703, -0.556322

0.000000, 0.000000, 1.000000

-0.342998, 0.756828, 0.556322

-0.484054, 0.675375, 0.556322

0.000000, 0.000000, -1.000000

-0.292611, 0.777703, -0.556322

-0.135258, 0.819849, -0.556322

0.000000, 0.000000, 1.000000

-0.188757, 0.809198, 0.556322

-0.342998, 0.756828, 0.556322

0.000000, 0.000000, -1.000000

-0.135258, 0.819849, -0.556322

0.027253, 0.830500, -0.556322

0.000000, 0.000000, 1.000000

-0.027253, 0.830500, 0.556322

-0.188757, 0.809198, 0.556322

0.000000, 0.000000, -1.000000

0.027253, 0.830500, -0.556322

0.188757, 0.809198, -0.556322

0.000000, 0.000000, 1.000000

0.135258, 0.819849, 0.556322

-0.027253, 0.830500, 0.556322

0.000000, 0.000000, -1.000000

0.188757, 0.809198, -0.556322

0.342998, 0.756828, -0.556322

0.000000, 0.000000, 1.000000

0.292611, 0.777703, 0.556322

0.135258, 0.819849, 0.556322

0.000000, 0.000000, -1.000000

0.342998, 0.756828, -0.556322

0.484054, 0.675375, -0.556322

0.000000, 0.000000, 1.000000

0.438704, 0.705679, 0.556322

0.292611, 0.777703, 0.556322

0.484054, 0.675375, -0.556322

0.498764, 0.498764, -0.708792

0.000000, 0.000000, -1.000000

0.000000, 0.000000, 1.000000

0.631825, 0.631825, 0.448927

0.438704, 0.705679, 0.556322

0.631825, 0.631825, 0.448927

0.498764, 0.498764, -0.708792

0.484054, 0.675375, -0.556322

0.631825, 0.631825, 0.448927

0.484054, 0.675375, -0.556322

0.438704, 0.705679, 0.556322

0.342998, 0.756828, -0.556322

0.292611, 0.777703, 0.556322

0.438704, 0.705679, 0.556322

0.342998, 0.756828, -0.556322

0.438704, 0.705679, 0.556322

0.484054, 0.675375, -0.556322

0.188757, 0.809198, -0.556322

0.135258, 0.819849, 0.556322

0.292611, 0.777703, 0.556322

0.188757, 0.809198, -0.556322

0.292611, 0.777703, 0.556322

0.342998, 0.756828, -0.556322

0.027253, 0.830500, -0.556322

-0.027253, 0.830500, 0.556322

0.135258, 0.819849, 0.556322

0.027253, 0.830500, -0.556322

0.135258, 0.819849, 0.556322

0.188757, 0.809198, -0.556322

-0.135258, 0.819849, -0.556322

-0.188757, 0.809198, 0.556322

-0.027253, 0.830500, 0.556322

-0.135258, 0.819849, -0.556322

-0.027253, 0.830500, 0.556322

0.027253, 0.830500, -0.556322

-0.292611, 0.777703, -0.556322

-0.342998, 0.756828, 0.556322

-0.188757, 0.809198, 0.556322

-0.292611, 0.777703, -0.556322

-0.188757, 0.809198, 0.556322

-0.135258, 0.819849, -0.556322

-0.438704, 0.705679, -0.556322

-0.484054, 0.675375, 0.556322

-0.342998, 0.756828, 0.556322

-0.438704, 0.705679, -0.556322

-0.342998, 0.756828, 0.556322

-0.292611, 0.777703, -0.556322

-0.567949, 0.606525, -0.556322

-0.606525, 0.567949, 0.556322

-0.484054, 0.675375, 0.556322

-0.567949, 0.606525, -0.556322

-0.484054, 0.675375, 0.556322

-0.438704, 0.705679, -0.556322

-0.675375, 0.484054, -0.556322

-0.705679, 0.438704, 0.556322

-0.606525, 0.567949, 0.556322

-0.675375, 0.484054, -0.556322

-0.606525, 0.567949, 0.556322

-0.567949, 0.606525, -0.556322

-0.756828, 0.342998, -0.556322

-0.777703, 0.292611, 0.556322

-0.705679, 0.438704, 0.556322

-0.756828, 0.342998, -0.556322

-0.705679, 0.438704, 0.556322

-0.675375, 0.484054, -0.556322

-0.809198, 0.188757, -0.556322

-0.819849, 0.135258, 0.556322

-0.777703, 0.292611, 0.556322

-0.809198, 0.188757, -0.556322

-0.777703, 0.292611, 0.556322

-0.756828, 0.342998, -0.556322

-0.830500, 0.027253, -0.556322

-0.830500, -0.027253, 0.556322

-0.819849, 0.135258, 0.556322

-0.830500, 0.027253, -0.556322

-0.819849, 0.135258, 0.556322

-0.809198, 0.188757, -0.556322

-0.819849, -0.135258, -0.556322

-0.809198, -0.188757, 0.556322

-0.830500, -0.027253, 0.556322

-0.819849, -0.135258, -0.556322

-0.830500, -0.027253, 0.556322

-0.830500, 0.027253, -0.556322

-0.777703, -0.292611, -0.556322

-0.756828, -0.342998, 0.556322

-0.809198, -0.188757, 0.556322

-0.777703, -0.292611, -0.556322

-0.809198, -0.188757, 0.556322

-0.819849, -0.135258, -0.556322

-0.705679, -0.438704, -0.556322

-0.675375, -0.484054, 0.556322

-0.756828, -0.342998, 0.556322

-0.705679, -0.438704, -0.556322

-0.756828, -0.342998, 0.556322

-0.777703, -0.292611, -0.556322

-0.606525, -0.567949, -0.556322

-0.567949, -0.606525, 0.556322

-0.675375, -0.484054, 0.556322

-0.606525, -0.567949, -0.556322

-0.675375, -0.484054, 0.556322

-0.705679, -0.438704, -0.556322

-0.484054, -0.675375, -0.556322

-0.438704, -0.705679, 0.556322

-0.567949, -0.606525, 0.556322

-0.484054, -0.675375, -0.556322

-0.567949, -0.606525, 0.556322

-0.606525, -0.567949, -0.556322

-0.342998, -0.756828, -0.556322

-0.292611, -0.777703, 0.556322

-0.438704, -0.705679, 0.556322

-0.342998, -0.756828, -0.556322

-0.438704, -0.705679, 0.556322

-0.484054, -0.675375, -0.556322

-0.188757, -0.809198, -0.556322

-0.135258, -0.819849, 0.556322

-0.292611, -0.777703, 0.556322

-0.188757, -0.809198, -0.556322

-0.292611, -0.777703, 0.556322

-0.342998, -0.756828, -0.556322

-0.027253, -0.830500, -0.556322

0.027253, -0.830500, 0.556322

-0.135258, -0.819849, 0.556322

-0.027253, -0.830500, -0.556322

-0.135258, -0.819849, 0.556322

-0.188757, -0.809198, -0.556322

0.135258, -0.819849, -0.556322

0.188757, -0.809198, 0.556322

0.027253, -0.830500, 0.556322

0.135258, -0.819849, -0.556322

0.027253, -0.830500, 0.556322

-0.027253, -0.830500, -0.556322

0.292611, -0.777703, -0.556322

0.342998, -0.756828, 0.556322

0.188757, -0.809198, 0.556322

0.292611, -0.777703, -0.556322

0.188757, -0.809198, 0.556322

0.135258, -0.819849, -0.556322

0.438704, -0.705679, -0.556322

0.484054, -0.675375, 0.556322

0.342998, -0.756828, 0.556322

0.438704, -0.705679, -0.556322

0.342998, -0.756828, 0.556322

0.292611, -0.777703, -0.556322

0.631825, -0.631825, -0.448927

0.498764, -0.498764, 0.708792

0.484054, -0.675375, 0.556322

0.631825, -0.631825, -0.448927

0.484054, -0.675375, 0.556322

0.438704, -0.705679, -0.556322

0.705679, -0.438704, -0.556322

0.675375, -0.484054, 0.556322

0.631825, -0.631825, -0.448927

0.675375, -0.484054, 0.556322

0.498764, -0.498764, 0.708792

0.631825, -0.631825, -0.448927

0.777703, -0.292611, -0.556322

0.756828, -0.342998, 0.556322

0.705679, -0.438704, -0.556322

0.756828, -0.342998, 0.556322

0.675375, -0.484054, 0.556322

0.705679, -0.438704, -0.556322

0.819849, -0.135258, -0.556322

0.809198, -0.188757, 0.556322

0.777703, -0.292611, -0.556322

0.809198, -0.188757, 0.556322

0.756828, -0.342998, 0.556322

0.777703, -0.292611, -0.556322

0.830500, 0.027253, -0.556322

0.830500, -0.027253, 0.556322

0.819849, -0.135258, -0.556322

0.830500, -0.027253, 0.556322

0.809198, -0.188757, 0.556322

0.819849, -0.135258, -0.556322

0.809198, 0.188757, -0.556322

0.819849, 0.135258, 0.556322

0.830500, 0.027253, -0.556322

0.819849, 0.135258, 0.556322

0.830500, -0.027253, 0.556322

0.830500, 0.027253, -0.556322

0.756828, 0.342998, -0.556322

0.777703, 0.292611, 0.556322

0.809198, 0.188757, -0.556322

0.777703, 0.292611, 0.556322

0.819849, 0.135258, 0.556322

0.809198, 0.188757, -0.556322

0.675375, 0.484054, -0.556322

0.705679, 0.438704, 0.556322

0.756828, 0.342998, -0.556322

0.705679, 0.438704, 0.556322

0.777703, 0.292611, 0.556322

0.756828, 0.342998, -0.556322

0.498764, 0.498764, -0.708792

0.631825, 0.631825, 0.448927

0.675375, 0.484054, -0.556322

0.631825, 0.631825, 0.448927

0.705679, 0.438704, 0.556322

0.675375, 0.484054, -0.556322

};


UV value 

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

0.000000, 0.000000,

1.000000, 0.000000,

1.000000, 1.000000,

};


#define kCylinder.001NumberOfVertices 384

// Drawing Code:

// glEnableClientState(GL_VERTEX_ARRAY);

// glEnableClientState(GL_TEXTURE_COORD_ARRAY);

// glEnableClientState(GL_NORMAL_ARRAY);

// glVertexPointer(3, GL_FLOAT, sizeof(TexturedVertexData3D), &Cylinder.001VertexData[0].vertex);

// glNormalPointer(GL_FLOAT, sizeof(TexturedVertexData3D), &Cylinder.001VertexData[0].normal);

// glTexCoordPointer(2, GL_FLOAT, sizeof(TexturedVertexData3D), &Cylinder.001VertexData[0].texCoord);

// glDrawArrays(GL_TRIANGLES, 0, kCylinder.001NumberOfVertices);

// glDisableClientState(GL_VERTEX_ARRAY);

// glDisableClientState(GL_TEXTURE_COORD_ARRAY);

// glDisableClientState(GL_NORMAL_ARRAY);






Blender 로 3D 도형 만들기 .. 1

  Blender 로 3D 도형을 만들고 

  아이폰에서 OpenGL 로 보이는 것을 쓰겠다고 

  해놓고선 한참지났네요.

  앱의 마케팅을 하느라 해봤지만, 역시나

  8만개나 되는 앱들에 묻혀서 다운수가 늘지가 않는군요..^^;

  지금의 Blender 로 만드는 도형의 방법은 안드로이드에서도 

  동일하게 적용하시면 됩니다. 단, 출력된 값을 정수형으로 변경해야

  하는 것만 유념하면 될 것 같습니다. 아직 시험은 안해봤지만요...

  Blender 는 무료 공개 소프트웨어로 검색하시면 쉽게 다운로드 받을 수 있습니다.

  실행하면 아래와 같습니다.


  기본으로 정육면체가 만들어져 있습니다.
  Blender 웹페이지에 사용법이 있으니 여기서는 자세한 사용법보다는 아이폰에서 사용하기 위한
  용도위주로 설명해보겠습니다.
  Blender 의 사용법은 약간 기존의 마우스와 키보드 사용법과 다르기 때문에 생소할 수 있습니다.
  스페이스바를 누르면 메뉴가 나오게 되고 "Add"를 선택하면 기본 도형을 만들 수 있습니다.
  원통을 만들어 보기로 하죠. Add>Cylinder 를 선택합니다.


  cylinder 를 선택하고 나면 아래와 같이 추가메뉴가 나오는데 반경과 높이 등을 설정하고 나면 도형이 생성됩니다.


도형은 수직에서 쳐도보도록 되어 있는데, 마우스의 볼을 누르고 움직이면 좌표가 회전되는 것을 볼 수 있습니다.


여기서 Edit 모드를 선택하면 꼭지점과 모서리가 선택되어 보여집니다.
아래에서 보듯이 원통에서 원부분은 삼각형으로 나누어져 있고, 통부분은 사각형으로 만들어져 있습니다.
이렇게 되어 있으면 도형의 값을 추출했을때 OpenGL 로 변경하면 이상한 모양으로 변경됩니다.
OpenGL에서 도형을 만들때는 삼각형을 이용하기 때문입니다.
그래서 삼각형으로 도형을 다시 잘라내야 합니다.
Edit>Faces>Convert to Triangles 를 선택하면 도형이 삼각형으로 다시 잘라집니다.


아래를 보시면 도형의 모양이 삼각형으로 되어 있는 것을 볼 수 있습니다.
  


  다음 편에서는 이렇게 만든 도형을 데이터로 뽑는 과정을 정리해 보겠습니다.