Calculating Perspective Precedence in 3D Space

  • Context: Undergrad 
  • Thread starter Thread starter ricardoainati
  • Start date Start date
  • Tags Tags
    Perspective
Click For Summary
SUMMARY

This discussion focuses on calculating perspective precedence in 3D space, specifically for a Rubik's Cube composed of 27 smaller cubes. The user seeks to determine the sequence of the nearest cubes from an observer's viewpoint, given the cubes can rotate in any direction. The initial approach using a distance formula proved inadequate due to the complexities introduced by the cubes' rotations. The recommended solutions include utilizing Z-buffering or S-buffer techniques instead of the Painter's algorithm, which is limited and typically used with binary space partitioning.

PREREQUISITES
  • Understanding of 3D coordinate systems and observer positioning
  • Familiarity with the concepts of Z-buffering and S-buffer techniques
  • Basic knowledge of geometric transformations, particularly rotations
  • Experience with algorithms related to rendering and visibility determination
NEXT STEPS
  • Research Z-buffering techniques for depth sorting in 3D graphics
  • Explore S-buffer methods for handling complex visibility scenarios
  • Study geometric transformations, focusing on rotation matrices
  • Learn about binary space partitioning and its applications in rendering
USEFUL FOR

This discussion is beneficial for 3D graphics developers, game developers, and computer graphics enthusiasts who are working on rendering techniques and visibility determination in complex 3D environments.

ricardoainati
Messages
1
Reaction score
0
Hello!

I don't know if this is the right forum to post this doubt, but here it goes:

I would like to know how to calculate perspective precedence in 3D space. (I'm not a mathematician, so I don't know if it's the correct term, but I will try to explain what I need).

I have an observer in space (px, py, pz).

I also have a Rubik’s Cube, with 27 "little cubes". Rubik’s Cube can rotate any direction.

I have to calculate the sequence of the nearer cubes, from observer's perspective.

I tried to use the distance's formula to calculate this precedence between the 27 little cubes, but it doesn't help when I have some cubes rotated. I believe that there is something else to calculate, but I don't know what it is. The problem is shown in the figure below, when I try to rotate the cubes with gray faces vertically.

cuboMagico.png


The distance formula I use is in http://www.flashandmath.com/flashcs4/zsort/sortpic.jpg

Thanks, and sorry if I wasn't so clear.
 
Physics news on Phys.org
You're using the Painter's algorithm. It is severely limited so it's only ever used in conjunction with binary space partitioning. Look into using a http://en.wikipedia.org/wiki/Z-buffering" or S-buffer instead.
 
Last edited by a moderator:

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K