# Box3 Bounding Box

I am trying to understand this and I do but I need to understand it better from a mathematical point, is there any article or video about this subject I could not find anything concrete.

Thank you!

@Tibi any chance you can formulate your question as to what you’re trying to understand?

Yes of course.

I don’t understand completely how the bounding box works, I understand the concept but I need to know more, for example, I don’t understand completely the x,y, and also min and max.

In a project that I am making to position an object under another object that was scaled, I am using this approach to get the first object size and adding y/2 to the object that I want under the first object but I thought the y-axis starts from the center so why I have to divide it by 2 makes no sense to me, it is really unclear to me how it works…

Heres a 1 minute MS Paint job. The box gets wrapped around to the smallest values of the model local coordinate. So for example in this picture, the minimum in x is one very ear tip and maximum of x is the end of the other ear tip. So if you want the length of the model in the x, its x=xmax-xmin. Same for the rest of the axis. The axis is set to three js standards. Im having a hard time trying to understand about your project tho.

I understand now… so the origin is in the center… thank you is clear I have this piece of code to position a shadow under a model…

// Calculate the size of the group’s bounding box
const groupBoundingBox = new THREE.Box3();
groupBoundingBox.setFromObject(this.group, true);
const groupSize = new THREE.Vector3();
groupBoundingBox.getSize(groupSize);

// Determine the position of this.group.
const groupPosition = this.group.position.clone();

// Calculate the yOffset to align this.shadowGroup under this.group