Addon. Produces almost infinite many time-varying geometries with functions

I understand and agree. With modeling tools or an addon :slight_smile:
I could possibly still think hemispheres as clearly distinguishable?


Since my circularly connected variant has no extra vertices, and I do not want to recreate the algorithm, I started with non indexed. But with a different procedure than to make the thing completely new! This works with identical code for Geometry and BufferGeometry.

I ask isBufferGeometry and then add the missing arrays as with Geometry (same name, internal use). Then add .addAttribute (‘position’, … etc.
After the calculation I write the values into the buffers, for example:

for ( var f = 0, p = 0; f < faceCount; f ++, p += 9 ) {		
		g.positions[ p ] =  g.vertices[ g.faces[ f ].a ].x; 
		g.positions[ p + 1 ] = g.vertices[ g.faces[ f ].a ].y; 
		g.positions[ p + 2 ] = g.vertices[ g.faces[ f ].a ].z; 			
		g.positions[ p + 3 ] = g.vertices[ g.faces[ f ].b ].x; 
		g.positions[ p + 4 ] = g.vertices[ g.faces[ f ].b ].y; 
		g.positions[ p + 5 ] = g.vertices[ g.faces[ f ].b ].z; 			
		g.positions[ p + 6 ] = g.vertices[ g.faces[ f ].c ].x; 
		g.positions[ p + 7 ] = g.vertices[ g.faces[ f ].c ].y; 
		g.positions[ p + 8 ] = g.vertices[ g.faces[ f ].c ].z; ...

This works quite well, see test: http://threejs.hofk.de/sandbox/nonIndexedFlat/

You can switch between Geometry and BufferGeometry.

The BufferGeometry is always flat shaded. I have read some posts and looked at the three.js code to Geometry, DirectGeometry, BufferGeometry and (from …, .groups) intensively. Because non indexed is a “triangle soup”, smooth shading does not work. There is no information about the common points / connections - right?

If I have understood correctly, this is processed with Geometry in the renderer / shader.

If I try now indexed-BufferGeometry, I have to create (because of uv’s) extra vertices and the construction changes considerably, since I have no simple fixed geometry. The many functions must play together.

On the other hand, with the triangle soup, I can very easily create an exploded representation of the geometry.

How is the opinion :question: