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

Nov 27, 2011 at 1:35pm

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

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. –
#60280
Nov 27, 2011 at 3:24pm

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. –

#216977
Nov 27, 2011 at 5:40pm

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

#216978
Nov 28, 2011 at 11:45am

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

#216979
Nov 28, 2011 at 5:58pm

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. –
#216980
Nov 28, 2011 at 7:17pm

wow thank you!! i am excited

#216981

You must be logged in to reply to this topic.