Forums > Jitter

making a cube with jit.gl.isosurf/jit.expr

November 27, 2011 | 1:35 pm

Hello all

I being use a old nesa patch metaballs, but i what to make a cube in jit.gl.isosurf, and not a sphere

the sphere is being generated from maths in jit.expr, can show me how to make a cube from it instead or give me some points?

thanks Ben

– Pasted Max Patch, click to expand. –

November 27, 2011 | 3:24 pm

sorry, i’ve re-read my post and it did not make lots of sense here was the question:

I’ve been using an old Nesa patch, Metaballs, and I want to make a cube in jit.gl.isosurf, not a sphere.

The sphere is being generated from maths in jit.expr. Can someone show me how to make a cube from it instead, or give me some pointers?

thanks Ben

– Pasted Max 5 Patch, click to expand. –


November 27, 2011 | 5:40 pm

A cube is trickier. You’ll need to come up with a distance function for a cube. Have a look at this page:

http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm


November 28, 2011 | 11:45 am

thanks for the answer, however i am struggling to understand how to implement the code from the page into jit.expr,
do i understand this right?
for making a cube in jit.gl.isosurf you would use a multi plane image with the xy being on the same plane and the z would be the plane number
any more help would be fab!

thanks
Ben


November 28, 2011 | 5:58 pm

It’ll be tricky to do with jit.expr because you need a length function. With jit.gen it’s trivial:

– Pasted Max Patch, click to expand. –

November 28, 2011 | 7:17 pm

wow thank you!! i am excited


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