Thread: [Algorithms] Projecting a point on a plane
Brought to you by:
vexxed72
From: Aldo S. <al...@ho...> - 2000-09-01 17:39:50
|
Hi! I can't remember how to project a point (p2) on a plane (n, p1). I need this to finish the 3D sound system of my engine(this afternoon!) and my math book is in my home! Someone could, please, help me? I don't wanna use DirectSound3D, for now. Again, thanks in advance. Aldo _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. |
From: Jeff L. <je...@di...> - 2000-09-01 18:23:03
|
That is the same problem that I described how I solve it for 2D IK. Using your notation, I assume for the plane, n is the normal and p1 is a point on the plane. v = p2 - p1 p3 = p2 - n ( n dot v) That should do it for you. -Jeff At 05:39 PM 9/1/2000 +0000, you wrote: >Hi! > >I can't remember how to project a point (p2) on a plane (n, p1). I need this to finish the 3D sound system of my engine(this afternoon!) and my math book is in my home! > >Someone could, please, help me? > >I don't wanna use DirectSound3D, for now. > > >Again, thanks in advance. > >Aldo > > >_________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > >Share information about yourself, create your own public profile at http://profiles.msn.com. > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Ron L. <ro...@do...> - 2000-09-01 18:30:38
|
Aldo Spanghero > > I can't remember how to project a point (p2) on a plane (n, p1). I need this > to finish the 3D sound system of my engine(this afternoon!) and my math book > is in my home! > > Someone could, please, help me? > > I don't wanna use DirectSound3D, for now. > > > Again, thanks in advance. > Why would you need your math book? Line through p2 perpendicular to plane is described parametrically by p2 + t n This hits plane when the vector from this point to p1 is perpendicular to n so ((p2 + tn) - p1) dot n = 0 Use elementary algebraic properties of dot product to rearrange terms and solve for t: t = (p1 - p2) dot n In which I also used the fact that n dot n = 1 (unit normal vector). So the projection is p2 + ((p1 - p2) dot n)n |
From: Pierre T. <p.t...@wa...> - 2000-09-01 18:33:55
|
P = point to project N = unit plane normal | = dot product Projected point = P - (D + P | N)N, ----- Original Message ----- From: Aldo Spanghero <al...@ho...> To: <gda...@li...> Sent: Friday, September 01, 2000 7:39 PM Subject: [Algorithms] Projecting a point on a plane > > > Hi! > > I can't remember how to project a point (p2) on a plane (n, p1). I need this > to finish the 3D sound system of my engine(this afternoon!) and my math book > is in my home! > > Someone could, please, help me? > > I don't wanna use DirectSound3D, for now. > > > Again, thanks in advance. > > Aldo > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Mats L. <ma...@al...> - 2000-09-01 19:44:35
|
Witch curve-algho "should" you use for a simple terrain rendering? Bezier or Nurb:s?? or maybe something else... Which is more efficient when storing the terrain info and then rendering it?? pros - cons... |
From: Dave S. <Dav...@sd...> - 2000-09-01 20:45:53
|
Mats Lundberg wrote: > > Witch curve-algho "should" you use for a simple terrain rendering? That's "Which". Not the story book child-eating type. ;-) > Bezier or Nurb:s?? or maybe something else... If you want smooth looking terrains, both are good. If not, then you will have to do some bump or displacement mapping to get nice pits, valleys, and such. > Which is more efficient when storing the terrain info and then rendering it?? There are fast algo's for rendering Bezier patches. (via forward differencing). NURBS are usually broken down into Bezier and then rendered. > pros - cons... > pros: Bezier patches are easy to render. Few samples(control points) can yeild large surface areas. cons: Gotta watch for cracks between boundaries. (Look at Excitebike64 on Nintendo, especially the Desert course). Too smooth to be realistic. -DaveS |
From: Akbar A. <sye...@ea...> - 2000-09-01 22:02:19
|
>Bezier patches are easy to render. opinion: imho patches are horrible, after talking with a whole lot of people (i used to like patches) writing some code... there are just to many problems with patches, it's not worth the effort. they get split back to triangles, artists can do more with a higher mesh of triangles. there are "so" many problems with patches that people don't see when starting out :| someone should really right an article on the downsides of patch rendering. sigh, this will probably start a debate why patches are good, if only i had the energy to discuss more about this. i think i might have already written a few points about this in a previous e-mail. peace. akbar A. isn't it ironic, in the paper "A Characterization of Ten Hidden-Surface Algorithms", by sutherland, sproull and schumacker that we use the eleventh algorithm ;) makes you really think -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Dave Smith Sent: Friday, September 01, 2000 3:46 PM To: gda...@li... Subject: Re: [Algorithms] Curves... Mats Lundberg wrote: > > Witch curve-algho "should" you use for a simple terrain rendering? That's "Which". Not the story book child-eating type. ;-) > Bezier or Nurb:s?? or maybe something else... If you want smooth looking terrains, both are good. If not, then you will have to do some bump or displacement mapping to get nice pits, valleys, and such. > Which is more efficient when storing the terrain info and then rendering it?? There are fast algo's for rendering Bezier patches. (via forward differencing). NURBS are usually broken down into Bezier and then rendered. > pros - cons... > pros: Bezier patches are easy to render. Few samples(control points) can yeild large surface areas. cons: Gotta watch for cracks between boundaries. (Look at Excitebike64 on Nintendo, especially the Desert course). Too smooth to be realistic. -DaveS _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Conor S. <cs...@tp...> - 2000-09-02 05:22:41
|
> >Bezier patches are easy to render. > opinion: > imho patches are horrible, after talking with a whole lot of people (i used > to like patches) writing some code... They aren't horrible - They do have their disadvantages. But they also have their advantages. > > there are just to many problems with patches, it's not worth the effort. > they get split back to triangles, artists can do more with a higher mesh of > triangles. > there are "so" many problems with patches that people don't see when > starting out :| > someone should really right an article on the downsides of patch rendering. Most are solvable problems. Easily solvable. Arstist can get a higher mesh yes, but it costs a lot more in terms of memory. Especially when you do animations. If you think beziers into the design of your engine/feature set, you can do very well and not have a single problem. > > sigh, this will probably start a debate why patches are good, if only i had > the energy to discuss more about this. i think i might have already written > a few points about this in a previous e-mail. > I think they are good, but only when used right, and when you have a good solution to handle them. Bicubic bezier patches can be rendered blindingly quick (If you used a bivariate forwards differencing scheme, and make sure you can collapse the algo all the way down to adds in both the S and the T loop), they are low memory for the look they can provide and they are biparametric which makes them perfect to map lightmaps etc to. One of the things I'm doing at the moment is a biparametric geometry composite pipeline. Beziers (both curves and patches) fit well into the scheme, and I think I'm going to have to make regular use of them. I think the system is a big success so far - I've gotta implement some more functions, and clean some stuff up though before I see the true worth of the system. Conor Stokes |