Javascript Formula Script to generate SPhere Structure points

bernardo's picture

hi everyone
i would like to ask for a script that generates a structure from the positions of the vertex of a sphere.

thank you

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

dust's picture
Re: Javascript Formula Script to generate SPhere Structure ...

i made a program to do this with a sphere i haven't tested it yet cause SL came out yesterday and well im trying to get my iphone development certificate to work but its not and its pissing me off.

go to http://si02.info

if you get a memory error just refresh the page my server is still in beta so i got to migrate upgrade etc.. it will work just refresh the page.

it seems to be the most read of my blogs converting a GL header file to CL vertexes etc... i would like to test it maybe i will today let me know if it works for you. it is a generator. it fills up some structures of vertex normal and uv info. it can be used for any shape and you can use the value historian to output the structures to text file so you can copy and past them into java script that way they will compile at runtime.

just post in here if you need help or if you have bugs.

bernardo's picture
Re: Javascript Formula Script to generate SPhere Structure ...

thanks dust will try it for now i am using this xml file e got from a sphere in 3dsmax:

and the script for the Max users here:

PreviewAttachmentSize
VERTEX_XMLPOS - MESH.pdf4.58 KB
Object.txt37.89 KB

dust's picture
Re: Javascript Formula Script to generate SPhere Structure ...

if you want i will convert my program for your max text file. i have been testing some things today. you need uv and normal ifo as well.

now someone that is a little more knowledgeable of open CL or GL for that matter can chime in here but the structure that the mesh creator is expecting has an index of [3] 0=x 1=y 2=z and the forth is 1.0. not entirely sure what the forth is for im just getting into the code of glsl and cl instead of relying on the kineme gl tools until there update.

making a max converter would be good. it is a more excepted and professional 3d program. im more of a mudbox maya guy but found out about cheetah 3d and well was using their gl header file to port/ convert 2 gles for iphone. so i thought i would get ready before sl to make one for cl. it seems i have parsed out my structures individually when they need to be bundled as i stated above.

you can look in the repository at the mesh files and see the actual open cl implementations of a sphere but that is not inherently the java script.

the ribbon file has a javascript que set up like my example that turns the mouse positions into structures for mesh files.

i got to finish those calculus and discreet math videos i downloaded because i would say parametrically you just take f= clVertex.xy * twoPi then insert that into your radius cos( f.y)sin(f.y) function for the x range all right off the top of my head but i would have to look up the exact code. im sure in a couple days someone will surface with the code or it actually exists search parametric in kineme.

being able to do it from a max / maya or what ever file is the way to go because then you can just plug in any model. the java script is all their i just got to tweak my file writer a bit and i will have it for you.

got to make a few posts then i will get to work on that.

bernardo's picture
Re: Javascript Formula Script to generate SPhere Structure ...

well i can write an exporter from max to xml that has face information but i get alot of errors from the gl quad patch ad cube patch. allthough my xml file get to read fine by the gl point structure patch. there are some really strange behavirours here. will keep at it.