Creating a spiral shape from 3d cubes - javafx -


i lot of confused how create complex 3d model in javafx. more specifically, want create spiral or helix group of many cubes.

i have mathematical type create points mesh:

for (int = 0; < 20; i++) {         v1=math.sin(pi*i*0.125)*150;         v2=i*50;         v3=math.cos(pi*i*0.125)*150;                    mesh.getpoints().addall((float)v1,(float) v2,(float) v3);          mesh.getpoints().addall((float)v1,(float) v2,(float) - v3);         mesh.getpoints().addall((float)v1,(float) -v2,(float) v3);         mesh.getpoints().addall((float)v1,(float) -v2,(float)- v3);          mesh.getpoints().addall((float)-v1,(float) v2,(float) v3);         mesh.getpoints().addall((float)-v1,(float) v2,(float) -v3);         mesh.getpoints().addall((float)-v1,(float) -v2,(float) v3);         mesh.getpoints().addall((float)-v1,(float) -v2,(float) -v3);      } 

but when try write faces , output awful. how faces must written?

what have shown points. faces? have here: https://github.com/fxyz/fxyz may going.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -