Questions tagged [bounding-box]

A Bounding Box is the smallest box that encloses a geometry. There are two common classes of Bounding Boxes that are employed: Oriented Bounding Boxes (OBB), and an Axis-Aligned Bounding Boxes (AABB). Bounding boxes are commonly employed as a cheap way to approximate more complex geometries in a range of applications, including collision detection.

A Bounding Box is the smallest box that encloses a geometry. There are two common classes of Bounding Boxes that are employed: Oriented Bounding Boxes (OBB) and an Axis-Aligned Bounding Boxes (AABB). Bounding boxes are commonly employed as a cheap way to approximate more complex geometries in a range of applications, including collision detection.

A minimum Bounding Box can also be referred to as the minimum bounding or minimum enclosing box.

Reference Books

External References:

Related Tags:

1096 questions
17
votes
4 answers

Fill Bounding Boxes in 2D array

I have a 2D numpy array which looks like array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], …
a_parida
  • 606
  • 1
  • 7
  • 26
16
votes
2 answers

How to detect if a point is contained within a bounding rect - opecv & python

I have a set of points [(x0,y0), (x1,y1), .. ] And a set of bounding rectangles produced using the cv2.boundingRect(someContour) function. Where each bounding box is an iterable object with four coordinates (a,b,c,d). My questions are: what is the…
Nimrodshn
  • 859
  • 3
  • 13
  • 29
14
votes
6 answers

Dirty Rectangles

Where may one find references on implementing an algorithm for calculating a "dirty rectangle" for minimizing frame buffer updates? A display model that permits arbitrary edits and computes the minimal set of "bit blit" operations required to…
Foo bar
14
votes
4 answers

Using jQuery to keep scrolling object within visible window

I was in the middle of writing up a long description of what I wanted to do, when I realized that the "How To Ask / Format" sidebar box on this very same "Ask A Question" page does exactly what I want. Basically, it scrolls up and down in unison…
Laurent Stanevich
  • 285
  • 1
  • 3
  • 8
14
votes
3 answers

How to roll a fast BVH representation in Haskell

I'm playing with a Haskell Raytracer and currently use a BVH implementation which stresses a naive binary tree to store the hierarchy, data TreeBvh = Node Dimension TreeBvh TreeBvh AABB | Leaf AnyPrim AABB where Dimension is either X, Y or Z…
Waldheinz
  • 10,399
  • 3
  • 31
  • 61
13
votes
1 answer

Can someone explain the rotating calipers to me?

I'm struggling with calculating the smallest enclosing rectangle (arbitrarily aligned) of a set of points. I was able to calculate the convex hull using graham's algorithm. Where I'm stuck is the next step. I thought about using the rotating…
mish
  • 1,055
  • 10
  • 29
13
votes
3 answers

Bounding box in D3.js

I think a many of you, who worked with D3.js, already experienced the same thing: your network or whatever moveable elements you took keep flying out of the svg-element if they are pushed to hard. If my network is to large the outer nodes disappear,…
David
  • 335
  • 3
  • 16
12
votes
1 answer

Find bounding box fitting in a path

Say we have this path: How do we find the bounds of the box that fits inside? Yes I know that paths can be arbitrarily complex and must not be closed. Still curious about suggestions for how to solve this problem.
Johan Larsson
  • 17,112
  • 9
  • 74
  • 88
11
votes
1 answer

numpy filter points within bounding box

I have a list of 2d points [(x1,y1),(x2,y2),...,(xn,yn)] in numpy, how do I get a list of points within the bounding box specified by the corners ((bx1,by1),(bx2,by2))? If this were C++ I would use the OGC "within" specification in boost geometry to…
Andrew Hundt
  • 2,551
  • 2
  • 32
  • 64
11
votes
4 answers

Efficiently finding the largest surrounding square in 2D grid

In a game with a 2D grid map I'm facing the following situation: I need to find the largest bounding square that surrounds the player position (the red dot). Or at least a bounding square of maximum size, as there could be more. Note: square, not…
RocketNuts
  • 9,958
  • 11
  • 47
  • 88
11
votes
2 answers

How can I display the bounding box for a CCNode in cocos2d?

As a follow-on question to my previous question about displaying the anchor point, I subclassed CCSprite and changed its draw method as follows: [super draw]; ccDrawColor4F(0, 1, 0, 1); ccDrawCircle(self.anchorPointInPoints, 20, 0, 8, YES); This…
Dylan
  • 2,315
  • 2
  • 20
  • 33
10
votes
3 answers

Getting the bounding box of a vector of points?

I have a vector of points stored in a std::vector instance. I want to calculate the bounding box of these points. I've tried with this code: bool _compare1(ofPoint const &p1, ofPoint const &p2) { return p1.x < p2.x && p1.y < p2.y; } bool…
nkint
  • 11,513
  • 31
  • 103
  • 174
10
votes
4 answers

Customizing shape of bounding rect

I am drawing a line using mouse clicks. The line is drawn using paint function as: painter->drawLine(start_p, end_p); The bounding rect of line is defined as: QRectF Line::boundingRect() const { // bounding rectangle for line return…
Kamalpreet Grewal
  • 822
  • 1
  • 13
  • 28
9
votes
1 answer

Prawn: Is there a way for vertical alignment of all content in a box?

I'm trying to position some content vertically centered in a bounding_box. With a single text this is no problem: bounding_box([0, bounds.top], :width => pdf.bounds.right, :height => pdf.bounds.top) do text "vertically aligned in the surrounding…
Chris Crown
  • 304
  • 2
  • 13
9
votes
1 answer

Traversal of Bounding Volume Hierachy in Shaders

I am working on a path tracer using vulkan compute shaders. I implemented a tree representing a bounding volume hierachy. The idea of the BVH is to minimize the amount of objects a ray intersection test needs to be performed on. #1 Naive…
jns
  • 1,250
  • 1
  • 13
  • 29
1
2
3
73 74