Geometry construction on an inclined plane

Started by
19 comments, last by Zakwayda 13 years, 5 months ago
Pardon my question - which may sound quite obvious to pros - math is not my string subject and I am new to all this.

I am required to construct geometrical objects on an inclined plane - mostly points, lines and polygons. For example, I need to construct a regular grid by defining lines at regular intervals on this inclined plane. For the plane definition, I have been given a point on this inclined plane and a normal vector to this plane. How can I do this? One thing I can think of is to construct the geometries on XY plane and then somehow transforming them to "move" to the plane - but I could be wrong or totally off. Can someone guide me on how to accomplish this or suggest a better way? Thanks!
Advertisement
Essentially what you'll need to do is create a coordinate frame for your plane and then create and manipulate the objects relative to that frame.

There's an infinite number of suitable frames, but a relatively straightforward way to generate a frame would be to compute the position from the plane normal and distance, and build the orientation using billboarding techniques (which are discussed frequently on these forums).

That's fairly cursory, but post back if you need more info.
Quote:Original post by jyk
Essentially what you'll need to do is create a coordinate frame for your plane and then create and manipulate the objects relative to that frame.

There's an infinite number of suitable frames, but a relatively straightforward way to generate a frame would be to compute the position from the plane normal and distance, and build the orientation using billboarding techniques (which are discussed frequently on these forums).

That's fairly cursory, but post back if you need more info.

Thanks for the response. I think I understand - except I am not clear on the billboarding - which I had to look up. But it is indeed very cursory for me to get going.

I think a little background will help clarify what I want to do. Imagine a house standing on a ground with its base on XY plane. I call this house in WCS - World Coordinate Space. Now I want to work on the inclined roof - so I define another coordinate space which is UCS - User-defined Coordinate Space - it will have its own origin and X,Y,Z axis. For construction purposes, all the coordinates will be in this UCS - so that they will be created in that space.

I think what I need is a means to transform points to and fro between above two coordinate systems - WCS and UCS. Does this help any better?

Thanks!

Quote:I think what I need is a means to transform points to and fro between above two coordinate systems - WCS and UCS.
A simple matrix transform should do the trick (the transform itself being based on the coordinate frame I mentioned earlier).

I suspect that's not that helpful though. Do you have the information you need at this point? If not, can clarify what part you're still unclear on?
Quote:Original post by jyk
A simple matrix transform should do the trick (the transform itself being based on the coordinate frame I mentioned earlier).

I suspect that's not that helpful though. Do you have the information you need at this point? If not, can clarify what part you're still unclear on?

Unfortunately I don't know what I don't know. The question is what would be the transformation matrix and how it would be defined? I need a generic way of transforming points from one coordinate system to the other. I have the vector and matrix library that will let me do the necessary operations on them - but I am clueless to applying it to solve this problem. Can you point out any literature or tutorial or pseudo-code that shows how to do this?

Quote:The question is what would be the transformation matrix and how it would be defined?
It would be the transform I described earlier. But, it sounds like you need more than just an arbitrary coordinate frame for a plane, right? If you're working on an 'inclined roof' (presumably consisting of one or more polygons), you probably need something more specific.
Quote:I need a generic way of transforming points from one coordinate system to the other.
That would be a transform matrix.
Quote:Can you point out any literature or tutorial or pseudo-code that shows how to do this?
Probably not without having a better understanding of the problem. What is the application exactly? What's the user interface like? Can you post a screenshot?

Generally speaking, I still think 'billboarding' is probably what you're looking for, more or less. But, it's hard to say for sure.
Quote:Original post by jyk
Probably not without having a better understanding of the problem. What is the application exactly? What's the user interface like? Can you post a screenshot

Here are all the details of this application. I am implementing a software component packaged as a web service, which receives information about a roof, and performs certain operations on it and returns BOM - or Bill of Materials. The information about the roof includes, among other things, its geometry. Following geometric information is passed to this web service:

(1) Size of the rectangular roof in terms of its length and width
(2) Normal vector to this roof, and
(3) A 3D point on this roof which represents the center point of the roof

One of the operations on the roof involves its tiling, and the output is the geometry of each tile, and some other numerical information such as load on the roof, and the counts of various parts (BOM), etc. In future, there will be more operations on a roof.

As you see, there is no graphical component in this set up, hence no screenshots. The caller to this web service is responsible for the rendering aspects.

Above functionality is already implemented in AutoCAD - where there are very convenient ways of defining and working on different coordinate systems - or reference frames - and transformations thereof. I have decided to move this functionality out of AutoCAD so that it can be consumed by any client.

I hope this explains it all -

(1) Given the center point of the roof in 3D, normal to the roof, and the length and width of the roof, how can I construct a 3D polygonal geometry that represents the boundary of the roof?
(2) How can I make this polygon as my working XY plane where the given 3D point is the origin, X axis is parallel to the length, Y axis is parallel to the width?
(3) Finally, how can I transform points from such a plane back to the WCS?

Thank you for your patience and help - even if I can accomplish 91) above, it would be a valuable help.
Quote:(1) Given the center point of the roof in 3D, normal to the roof, and the length and width of the roof, how can I construct a 3D polygonal geometry that represents the boundary of the roof?

I just realized that just having a normal and a point on the roof could give me the roof-plane, but not the boundary of the roof even if its dimensions are given. I think that actual 3D coordinates of the roof would be required to be given.

Nice explanation :)

I think you hit on the crux of the problem here:
Quote:I just realized that just having a normal and a point on the roof could give me the roof-plane, but not the boundary of the roof even if its dimensions are given. I think that actual 3D coordinates of the roof would be required to be given.
A problem with this:
Quote:(1) Given the center point of the roof in 3D, normal to the roof, and the length and width of the roof, how can I construct a 3D polygonal geometry that represents the boundary of the roof?
Is that it doesn't give you enough information to construct a representation of the roof surface.

Now, most roof surfaces have characteristics that would allow us to make a reasonable guess as to the orientation of the surface, but a good example of a problem case would be a 'flat' roof surface (that is, one for which the normal points straight upwards). In this case, even if we assume the building is 'axis aligned', we still don't know which way the surface is oriented.

So, it seems to me you probably need some additional information (such as the corners of the roof or some other piece of information you can use to uniquely determine the orientation).
Quote:Original post by jyk
So, it seems to me you probably need some additional information (such as the corners of the roof or some other piece of information you can use to uniquely determine the orientation).

Yes, the caller can pass the actual corner coordinates of the roof - in addition to the normal and the center point. I think that should take care of the roof orientation. This roof-plane would be my construction plane on which my code would be performing operations to layout tiles, etc. I believe the main problem, in general, is how to transform points from one coordinate space to another - and defining appropriate transformation definition for that - this is what I remember from my high school math - but don't know how to do that. Is there a way to attach graphics to the messages in this forum?

This topic is closed to new replies.

Advertisement