0
$\begingroup$

I am given an irregular geometry shape with its vertices, bounding box information.

How to draw a smooth mesh equal distance from that irregular geometry shape's bounding box?

Please refer to the image here: Smooth mesh equal distance from irregular shape

My attempt: 1) I have tried to create 8 spheres at 8 corners of a bounding box and a box for X, Y, Z direction. The result looks very ugly and not smooth like this: My attempt

Is there any algorithm or formula I can utilise to draw mesh around a bounding box?

Thank you

$\endgroup$
2
  • $\begingroup$ You're almost there, just add cylinders along each edge of the bounding box as well. If you then want to render it transparent and not see all the intersections between the spheres, cylinders, and boxes, there is a simple way to do that too, but it is too long for this comment box. $\endgroup$
    – user106
    Commented May 4, 2018 at 15:40
  • $\begingroup$ @Rahul, how to render the intersections between spheres, cylinders, boxes to be transparent? You can write it as an answer if you wish. Thanks. $\endgroup$ Commented May 4, 2018 at 19:56

1 Answer 1

1
$\begingroup$

One way to visualize an object's bounding box would be like this:

$\hskip2.5in$Bounding box

As Rahul mentioned in a comment, you can achieve this by adding a total of 12 cylinders at the edges of the bounding box, connecting the spheres at the corners.

If you want to render the bounding box transparently, I don't see an easy way to hide the intersections of the spheres and cylinders without knowing what program you are using. You could try to use partial spheres for the corners and see if that helps, i.e.

$\hskip2.5in$Partial sphere

Maybe this is already sufficient for your purpose. (This is exactly 1/8th of a full sphere.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.