Article View: comp.graphics.algorithms
Article #57BSP Question
From: Tim Wendt
Date: Mon, 30 Oct 1995 15:44
Date: Mon, 30 Oct 1995 15:44
34 lines
1786 bytes
1786 bytes
I'm having trouble with my 2D BSP tree creation. When my function to
determine if a wall lies to the right or left of the partition wall returned
unexpected results I began to question my understanding of the dot product
test. It is my understanding that observing the signs using simple dot
products on the endpoints will indicate to which side of the partition the
test wall lies. Here is the problem.
Given 3 walls
W0 = (4,9) (3,6)
W1 = (1,2) (2,4)
W2 = (1,5) (2,6)
Choose W0 as the partition plane. If you draw these on graph paper
both W1 and W2 appear to be to the left or behind W0. Yet using the
dot product test this does not seem to be the case.
testA = [4 9] testB = [3 6]
[1 2] [2 4]
testA = 4*2 - 9*1 = -1
testB = 3*4 - 6*2 = 0
testA = [4 9] testB = [3 6]
[1 5] [2 6]
testA = 4*5 - 9*1 = 18
testB = 3*6 - 6*2 = 6
These two walls appear to be on different sides according to the dot product
test. What am I not understanding here? Thanks!
--------------------------------------------------------
| "Hmm...beer!" - Homer Simpson
---tim.wendt@daytonoh.attgis.com---------A1200/030/33---
Technical Details
Message-ID:
<DH9qEw.Fos@corsair.daytonoh.attgis.com>Path:
arc1-ca.pugleaf.net!ncrgw2.ncr.com!ncrhub6!daynews!corsair!newsShow Full Headers
Complete Article Headers
Newsgroups: comp.graphics.algorithms,comp.sys.amiga.programmer,rec.games.programmer Path: arc1-ca.pugleaf.net!ncrgw2.ncr.com!ncrhub6!daynews!corsair!news From: Tim Wendt <tim.wendt@daytonoh.ncr.com> Subject: BSP Question X-Nntp-Posting-Host: 153.80.24.43 Message-ID: <DH9qEw.Fos@corsair.daytonoh.attgis.com> Sender: news@corsair.daytonoh.attgis.com (News administrative Login) Reply-To: tim.wendt@daytonoh.ncr.com (WENDTT) Organization: AT&T Global Information Solutions X-Newsreader: DiscussIT 2.0.1.3 for MS Windows [AT&T Software Products Division] Date: Mon, 30 Oct 1995 15:44:55 GMT