Thread: RE: [Algorithms] Rendering (a portion of) a Plane
Brought to you by:
vexxed72
From: Steve W. <Ste...@im...> - 2000-07-21 19:31:28
|
Hmm, Your equation: Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 is defining 3D space as an infinite number of parallel planes with the same Normal as in the equation: Normal[0] * X + Normal[1] * y + Normal[2] * z = 0 using an index of distance to determine which parallel plane you are referencing. Normal[0] * X + Normal[1] * y + Normal[2] * z = -distance Correct me if I'm wrong, but it sounds like you want to find points ON the plane...if you are trying to describe a circle on the plane then you want all points (x,y,z) which lie on the plane and which are the same distance from your point of origin (x',y',z'). If you like matrices and transformations then perhaps use the 2D (x,y) coordinate plane to find your points x^2 + y^2 = distance, then translate and rotate them onto your plane. R&R > -----Original Message----- > From: Jeremy Bake [mailto:Jer...@in...] > Sent: Friday, July 21, 2000 6:57 AM > To: 'gda...@li...' > Subject: [Algorithms] Rendering (a portion of) a Plane > > > I've been working on my viewport culling and I just wanted to > test something > out > I was wondering if anyone could tell me how to render a > portion of a plane > around > a particular point using the > Normal + distance version of a plane. > I think it relates to > Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 > but I can't seem to get my head around how I could draw this function > over a specific range... any help would be Greatly appreciated > > Jeremy Bake > RtroActiv > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |
From: Jeremy B. <Jer...@in...> - 2000-07-21 20:00:00
|
Actually what I'm more after is all these frustum culling routines I've seen lately that extract the clipping planes from the modelview and projection matrices I'd like to be able to extract these draw them (at least a portion since a plane goes to infinity) and move my eye position elsewhere to test if things really are getting culled outside (I learn better when I can observe what's happening visually, dunno I just have a hard time trusting my code... I'd lie to know I'm going in the right direction before getting in too deep) even an example of how to draw a few points on the plane so I can see it visually would be great... is that a better description of what I'm going for? Jeremy Bake RtroActiv > Hmm, > > Your equation: > Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 > > is defining 3D space as an infinite number of parallel planes with the same > Normal as in the equation: > Normal[0] * X + Normal[1] * y + Normal[2] * z = 0 > > using an index of distance to determine which parallel plane you are > referencing. > Normal[0] * X + Normal[1] * y + Normal[2] * z = -distance > > Correct me if I'm wrong, but it sounds like you want to find points ON the > plane...if you are trying to describe a circle on the plane then you want > all points (x,y,z) which lie on the plane and which are the same distance > from your point of origin (x',y',z'). If you like matrices and > transformations then perhaps use the 2D (x,y) coordinate plane to find your > points x^2 + y^2 = distance, then translate and rotate them onto your plane. > > R&R > > > > -----Original Message----- > > From: Jeremy Bake [mailto:Jer...@in...] > > Sent: Friday, July 21, 2000 6:57 AM > > To: 'gda...@li...' > > Subject: [Algorithms] Rendering (a portion of) a Plane > > > > > > I've been working on my viewport culling and I just wanted to > > test something > > out > > I was wondering if anyone could tell me how to render a > > portion of a plane > > around > > a particular point using the > > Normal + distance version of a plane. > > I think it relates to > > Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 > > but I can't seem to get my head around how I could draw this function > > over a specific range... any help would be Greatly appreciated > > > > Jeremy Bake > > RtroActiv > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list thanks!!!!!!! mauro _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Steve W. <Ste...@im...> - 2000-07-21 22:03:32
|
Oh...then set up a culling rectangle that is smaller than your viewport. Where did you see the extraction of clipping planes so you can see around them? What you saw may not be used in the way you want it to be implemented...but there is always a first. R&R > From: Jeremy Bake [mailto:Jer...@in...] > > Actually what I'm more after is all these frustum culling routines > I've seen lately that extract the clipping planes from the > modelview and projection matrices I'd like to be able to extract these > draw them (at least a portion since a plane goes to infinity) > and move my eye position elsewhere to test if things really > are getting > culled outside (I learn better when I can observe what's happening > visually, dunno I just have a hard time trusting my code... > I'd lie to know > I'm going in the right direction before getting in too deep) > even an example of how to draw a few points on the plane so I > can see it > visually would be great... is that a better description of > what I'm going for? > |
From: Steve W. <Ste...@im...> - 2000-07-22 00:24:35
|
I'm sorry if this doesn't make sense today...being a programmer from MSDOS days, but when I needed a timer I looked at the Real Time Clock (RTC) memory addresses. I don't remember the exact memory locations, but it's in the same place on all PC's, and is the most stable and detailed (.1 millisecond ticks). Is there some security reason that we can't access it now? (Forgive me for not being able to test it, but since Microsoft removed support for MASM I haven't been able to code anything with assembler). It just doesn't make any sense that "reading" the RTC would be sooooo buggy. R&R > -----Original Message----- > From: Steve Wood > Sent: Friday, July 21, 2000 2:58 PM > To: 'gda...@li...' > Subject: RE: [Algorithms] Rendering (a portion of) a Plane > > > Oh...then set up a culling rectangle that is smaller than > your viewport. > Where did you see the extraction of clipping planes so you > can see around > them? What you saw may not be used in the way you want it to be > implemented...but there is always a first. > > R&R > > > From: Jeremy Bake [mailto:Jer...@in...] > > > > Actually what I'm more after is all these frustum culling routines > > I've seen lately that extract the clipping planes from the > > modelview and projection matrices I'd like to be able to > extract these > > draw them (at least a portion since a plane goes to infinity) > > and move my eye position elsewhere to test if things really > > are getting > > culled outside (I learn better when I can observe what's happening > > visually, dunno I just have a hard time trusting my code... > > I'd lie to know > > I'm going in the right direction before getting in too deep) > > even an example of how to draw a few points on the plane so I > > can see it > > visually would be great... is that a better description of > > what I'm going for? > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |
From: Steve W. <Ste...@im...> - 2000-07-22 00:26:00
|
Ignore my last post...cross-list bleed > -----Original Message----- > From: Steve Wood > Sent: Friday, July 21, 2000 2:58 PM > To: 'gda...@li...' > Subject: RE: [Algorithms] Rendering (a portion of) a Plane > > > Oh...then set up a culling rectangle that is smaller than > your viewport. > Where did you see the extraction of clipping planes so you > can see around > them? What you saw may not be used in the way you want it to be > implemented...but there is always a first. > > R&R > > > From: Jeremy Bake [mailto:Jer...@in...] > > > > Actually what I'm more after is all these frustum culling routines > > I've seen lately that extract the clipping planes from the > > modelview and projection matrices I'd like to be able to > extract these > > draw them (at least a portion since a plane goes to infinity) > > and move my eye position elsewhere to test if things really > > are getting > > culled outside (I learn better when I can observe what's happening > > visually, dunno I just have a hard time trusting my code... > > I'd lie to know > > I'm going in the right direction before getting in too deep) > > even an example of how to draw a few points on the plane so I > > can see it > > visually would be great... is that a better description of > > what I'm going for? > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |
From: Jeremy B. <Jer...@in...> - 2000-07-25 02:09:22
|
thanks Angel Popov exactly what I was looking for and just to clarify... the extraction of clipping planes I was referring to was the code that's been going around (posts I remember are from Gil Grib) where you get the final transformation matrix then row[3] + row[0] row[3] - row[0] row[3] + row[1] row[3] - row[1] row[3] + row[2] row[3] - row[2] each of these resulting 4Vectors represent normalX, normalY, normalZ, dist and seem to work great I just wanted to visualize them externally. Jeremy Bake RtroActiv |
From: Anceschi M. <anc...@li...> - 2000-07-21 19:44:38
|
----- Original Message ----- From: "Steve Wood" <Ste...@im...> To: <gda...@li...> Sent: Friday, July 21, 2000 9:25 PM Subject: RE: [Algorithms] Rendering (a portion of) a Plane > Hmm, > > Your equation: > Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 > > is defining 3D space as an infinite number of parallel planes with the same > Normal as in the equation: > Normal[0] * X + Normal[1] * y + Normal[2] * z = 0 > > using an index of distance to determine which parallel plane you are > referencing. > Normal[0] * X + Normal[1] * y + Normal[2] * z = -distance > > Correct me if I'm wrong, but it sounds like you want to find points ON the > plane...if you are trying to describe a circle on the plane then you want > all points (x,y,z) which lie on the plane and which are the same distance > from your point of origin (x',y',z'). If you like matrices and > transformations then perhaps use the 2D (x,y) coordinate plane to find your > points x^2 + y^2 = distance, then translate and rotate them onto your plane. > > R&R > > > > -----Original Message----- > > From: Jeremy Bake [mailto:Jer...@in...] > > Sent: Friday, July 21, 2000 6:57 AM > > To: 'gda...@li...' > > Subject: [Algorithms] Rendering (a portion of) a Plane > > > > > > I've been working on my viewport culling and I just wanted to > > test something > > out > > I was wondering if anyone could tell me how to render a > > portion of a plane > > around > > a particular point using the > > Normal + distance version of a plane. > > I think it relates to > > Normal[0] * X + Normal[1] * y + Normal[2] * z + distance = 0 > > but I can't seem to get my head around how I could draw this function > > over a specific range... any help would be Greatly appreciated > > > > Jeremy Bake > > RtroActiv > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list thanks!!!!!!! mauro |