|
|
"Kima" <nomail@nomail> wrote:
> I want to draw the biggest sphere with the centre of <0,0,0> which can fit
> within the inner part of the prism
> Is there a direct way to do so?
This would be the inscribed circle, or the inscribed sphere.
You might be able to do it with a matrix, but I'm guessing.
You could do it numerically / computationally / algorithmically by taking sets
of adjacent vertices, calculating the coordinates of the midpoint, and measuring
the distance from the origin. The minimum distance would give you what you
want.
> I need the CONDITION.
Do you just want to do an insidedness test?
#if (inside (prism, point)) ....
If you want to have each sphere be fully inside the prism, construct a smaller
test prism where the edges are closer to the origin by the radius of the
spheres. Test against that, and then render the spheres in the actual prism.
Post a reply to this message
|
|