|
|
Subject:
Conversion of a point in 3d space to a local 2d representation
Category: Science > Math Asked by: charltonian-ga List Price: $30.00 |
Posted:
23 May 2005 00:54 PDT
Expires: 24 May 2005 10:48 PDT Question ID: 524534 |
|
There is no answer at this time. |
|
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 09:39 PDT |
I'm probably missing something non-obvious... X is by definition on the 2D plane defined by ABC. Unless my geometry fails my mind, there can be no such thing as a 3D plane -- it is defined by three points. ("I need to convert the 3d plane into a separate 2D representation of the plane. (like a map)") ... O is not relevant, etc. X is the same distance from A as it is from A', and from B as it is from B', and on the same plane, etc... If X (a point) was not on ABC, then you could use pythagorean theorem to get your visual representation of X on ABC. A right triangle can be gathered with known information of the delta between A and X , and B and X. The imaginary perpendicular to the ABC plane, intersecting at X' on ABC, is at this point rather trivial to obtain, once Az', Bz', and Cz' are adjusted to z'=0 This is a free comment. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 11:03 PDT |
Yes, sorry, probably a bad explanation. X is not the same distance from A, as X' is to A' although they would be proportional. It is important to point out that they are not the same thing, the 2d version is a representation of the plane in 3d space. O probably isn't relevant to any calculation, but is given as background info. The plane exists in 3d space (as opposed to being 3 dimensional) and can be at any angle. I have the data for all the points listed (A,B,C,fC,X), but my 'camera' view could be as the first diagram, it also could be as below. fC X .________.____.__. A/C B/D essentially the only difference in the points now is in the Z axis. What I need is way to convert it to the 2d map version however the points are oriented in 3d space. I really hope it is, or there is, a trivial solution, as I would love to see it (wit h a full working though). |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 11:47 PDT |
May I ask again if X is on plane ABC? and A'B'C' is simply an orientation of ABC? Um. wait a sec. You already know what ABC is, and can transform it, right? How do you do that? Why is that any different than transforming X? |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 11:54 PDT |
Yes, I transform the plane, unfortunately the transformations are handled incrementally (and there are lots of them), and then they are adjusted for floating point errors, so I never have one reverse transform to move the plane back to perpendicular to the camera. It is conceivable that I could calculate a reverse transform from some other data, but it seemed to become fiendishly complex very quickly I was hoping for some kind of pythagorean solution. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 11:58 PDT |
ALSO... X isn't on the plane, it is an intersection of the plane. So it doesn't transform when the plane is moved. However (referring to my last post), I could take the current position of X, and then transform it to perpendicualr to the 'camera' position, and then convert the scale. (Like I say tho, this becomes complex quite quickly - for me at any rate.) |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 12:08 PDT |
I'm so confused. How in the world can an intersection not be a part of the plane? That is its definition. The intersection of a cylinder and a plane is an elipse *on*/in? the plane. The intersection of a line and a plane is a point on the plane. The intersection of two planes is a line segment on the plane. If you can transform ABC, then certainly you can transform ABX. It's the same plane. If you're trying to transform the "rest" of whatever X is... A_______B | X | |Y___.--|---Z | | |_______| C __ (Let's say line segment YZ passes through plane ABC at point X), then what we need to do is render visible stuff outside of plane ABC, which is not what you asked. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 12:25 PDT |
Also, you said both "point X = (Xx,Xy,Xz) -- this is the point on the plane." and "The point X actually represents an intersection of the plane" Let's go to some fundamental questions ... what is intersecting with the plane? a point, a line(segment), a plane, a cylinder, what? Is the problem that we don't know (Xx, Xy, Xz)? or is it that we can calculate where it is relative to (Ax, Ay, Az) and (Bx, By, Bz) ... do we know or need to know distance or location? Is there anything that is known absolutely about X relative to A and B? Well, sure ... X intersects ABC. Do we know if X is merely a point or a point on a geometric object that we might know a trajectory or something? Do we need to render anything but this point on the plane? |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 12:58 PDT |
Ok, it seems I'm trying your patience, so I'll try to explain. You actually have grasped completely what the problem is, X is the point of intersection of a line (that goes from an arbitrary point P to the origin, I do have the coordinates of P) I have calculated the point Xx,Xy,Xz, which is on the plane. And from this using any of the the other points we know (A,B,C,fC) I need to create some function which I can use to calculate where X' is in relation ot A',B'...etc In answer to your questions: the plane is a face of a cube, but if I can calculate point X' for one plane I can do it for the rest of them (I would just use different values of A,B,C etc.) Not sure about the trajectory part. And no, we don't need to render anything but this point on the plane. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 12:59 PDT |
I should have added the line from PO does not move, it is fixed. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 12:59 PDT |
I should have added the line PO does not move, it is fixed. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 13:52 PDT |
ok, but ... let me clarify a few more things. and, I'm still not sure why X, a point, cannot itself be transformed ... we'll get back to that in a sec. <--> Line OP passes through plane ABC at point X, which is able to be calculated. This calculation gives a point in space at (Xx,Xy,Xz). Line OP is fixed. By definition, all points A, B, C are equidistant from O. I'd gather that perhaps ABC is fixed as well. We certainly don't want X to move relative to ABC, do we? So, that brings us to a camera view. I still am having trouble understanding how you have the math to transform A and not X. It appears that either by rounding or not trusting the results, X no longer appears on plane ABC. So, let's start with an orthogonal camera view of the square, effectively making your first diagram: A?_______B? | .X?| | | | .fC?| | | C?|_______| Now, apparently, I think I understand that A, B, C aren't really orthogonal to the x and y axes, so to get the A', B', C' drawing requires rotating ABC. Assuming that z=0, X is still on the same plane as ABC... http://mathworld.wolfram.com/Distance.html tells us the distance between A and X is d=sqrt((Ax-Xx)^2+(Ay-Xy)^2))... This is sorta interesting. I suppose what'd be more interesting is the distance from X to AB and X to AC ... http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html This would give us the approximate (rotated) position of X, assuming A'B' and A'C' are orthogonal to the axes. (then, you can use this distance to But still, if you can transform ABC, you can transform ABX, and frankly you should be able to transform the point easier than the plane. I assume you know how to transform Fc as well? What formula do you use to do that? (Well, I take distance AB and distance CD and make it 1/2 the way ...) ok. So if we can determine the X-AB distance and divide it by 2s, and then X-AC distance and divide by 2S, we have a ratio ... if we learn the new ratio of the distance (A'B' to C'D')/2S , we can apply that distance to X's location, relative to AB and AC. oh, but what if we have a parallelogram type thing? ... Well, somehow you know how to place Fc in the right place. I'm certain you can figure out how to shift X. It's simply the relative position, shifted the direction and amount that the parallelogram is shifted This is more painful than simply figuring out that if you know how the camera looks at point A, it'll look at point X the same way it looks at point Fc, and it really doesn't care that X is a point on ABC. The only reason that it might is if you're considering ABC to be opaque, and rounding errors make X *under* the opaqueness. BTW... did I mention this is a free comment? :) This just seemed interesting to me, is all. |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 13:59 PDT |
OH, btw :) I think you might be interested in www.blender.org ... Oh, no reason, really :). |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: charltonian-ga on 23 May 2005 14:20 PDT |
Ah I can see where the confusion lies, because I feel confident that you understand what I am talking about. The first problem is: the cube/face is not rotated about the global axes but its internal axes. I worked out a method of rotating a point about an arbitrary axis (which essentially tends to be rotating the points about fC - bear in mind this is a cube in the real project not just one plane, and through some fairly simple calculations I decide which axis is which.) However, I really don't think it's possible for me to transform it back (I have tried, the results were not very impressive, but the main problem is, it's hard to see where some of the strange results come from, so I have no way to improve from them.) Yes, I was looking at some kind of proportional transform, and got a little stuck at the parallelogram stage, but it doeas appear that there should be enough information there to calculate it (well except that I couldn't of course.) To be honest if there were rounding errors, they probably wouldn't be too noticable - so I would be ok with that. Yes, I am aware that this is free, but I'm hoping that maybe between us we will get to a solution and then you can take the reward. I had a quick look at www.blender.org, is it something you work on/for? (and I will have a proper look tomorrow) I must got to bed now it's late here, and tomorrow is another day at the coal face. But beleive me when I say that the fact you even understand my little puzzle is quite reassuring... |
Subject:
Re: Conversion of a point in 3d space to a local 2d representation
From: crythias-ga on 23 May 2005 15:58 PDT |
Yes! That is why I was confused! I assumed that you were *only* talking about a square plane with points equidistant from O, and you were panning a camera around this plane and wanted to view the dot X on the square ... Well, you didn't say anything about a cube... Now I think about a laser pointer centered at O and pointing at P shining through a rotating? clear cube that needs to show a point on a plane that varies as the cube rotates. Which, again, isn't the same thing as the question, but let's go with it. I think the question is now: Where is the red laser dot on the external plane (furthest from O) as the cube rotates? Indeed, how do you describe the shape of the plane and the location of the dot in that plane given the location of A, B, C and X ... The camera, I hope, is centered viewing the x and y axes in orthogonal viewpoints. Hold on. The cube can't rotate about its own axes *AND* the surface being equidistant from O. Unless of course we're talking about a camera view observing the cube. Well, that's where we need to talk. Is the cube centered on O? That helps. ... The cube, centered on O, rotating strangely, has a laser pointer pointing at point P. As the cube rotates, its front view changes from a square to a trapezoid and other geometric formations. The laser pointer, fixed, intersects this floating plane at a point, and you're trying to describe in 2D space the position of the intersection as well as the shape of the plane that it intersects. How am I doing? And, of course, the intersection makes (could make?) the dot vary a bit in location, even though OP is fixed. Can I fix the camera to look at x and y axes being east-west and north-south respectively, or is the camera position still random as well? I don't necessarily care, but the math is easier... Somehow, if z'=0, and we also assume that there is no refraction because of the glass we're using in our cube ... if we've been able to calculate (Xx,Xy,Xz), then I'd have to say that Xz doesn't matter ... I'm still back to if you can transform A, you can transform X. What am I missing? PS: No, I don't work on blender. It's a 3D modeling software that's Open Source (read: free to use and free to modify) and certainly can help with observing this as you want. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |