Forums > Jitter

incomplete sphere with [jit.gl.mesh]


Mar 12 2017 | 11:09 am

I am trying to render a pattern of dots with [jit.gl.mesh]. I have several points in a 2d space. For each of the points I want to create a square, so I add a delta value so that for each x, y coordinate I get this:
vertex(x, y)
vertex(x+∂, y)
vertex(x+∂, y+∂)
vertex(x, y+∂)
vertex(x, y)
If I store these values into [jit.matrix] and render it with [jit.gl.mesh] I should be getting squares instead of points (I need to render these points in a single mesh rather and multiple objects as it should be clear from what follows)
Once I have the 2D squares represented correctly I need to have them projected onto a sphere. This will result ideally into a 3D shape of an incomplete sphere, i.e. a sphere with holes in it. I devised a patch to make a 2D set of points into projections onto a sphere and that should do the trick once I have all the points organized correctly.
My question is if I am going about this problem the correct way. Is [mesh] the right object? what should the order of the vertexes be? which primitive is best suited for this task?

I have done some work with OpenGL mainly in Processing and I am not too familiar with the OpenGL jitter objects but my hunch is that [mesh] is the way to go. Alternatively I was thinking a [gridshape] object @matrixoutput 1 and then filtering some values through some [jit.op]

Mar 12 2017 | 6:21 pm

… I figured a pretty satisfactory solution to my problem: map a [jit.gl.texture] of the 2D set of points onto a {jit.gl.gridshape @shape sphere].

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Jitter